Citizen s skill in 2010s: Programming the Windowsphone Kai Lindgren, Industrial Production/Metropolia
Paikka: Metropolia Ammattikorkeakoulu, Helsinki, Bulevardi 31. Sali Engel (P317) Ohjelma 9.00 9.15 Tervetuloa! - v.s. vararehtori Juha Lindfors, Metropolia Ammattikorkeakoulu 9.15 9.30 Sulautuvasta oppimisesta näkymättömään oppimiseen - Terhi-Maija Itkonen-Isakov, Koulutuksen kehittämispalvelut 9.30 9.45 Kasvokkain verkossa: Connect Pro opetuksessa - Elina Hotanen, Terveys- ja hoitoalan osaamisklusteri 9.45 10 Innovaatioprojekti Facebookin tuella - Jouni Pousi, Terveys- ja hoitoalan osaamisklusteri 10 10.30 Kahvia ja sosetta 10.30 10.45 Facebook ja muut verkon yhteisöpalvelut oppimisen ja projektiviestinnän tukena - Petri Silmälä, Tietohallinto 10.45 11 Oppimispäiväkirja wikissä, YAMK-opiskelijan näkökulma - Jussi Linkola, Kulttuuri ja Luova ala - klusteri 11-11.30 Moodle 2:n uudet ominaisuudet - Maarit Hynninen-Ojala 11.30 11.45 2010-luvun kansalaistaito: Windows-puhelimen ohjelmointi Kai Lindgren, Teollisen tuotannon osaamisklusteri 11.54 12.00 Oppimateriaalit avoimiksi: Open Courseware- esittely - Vesa Linja-aho, Teollisen tuotannon osaamisklusteri 12 13 Tauko 13 16 Workshopit valitse a), b) tai c) a) Oppimateriaalit avoimiksi Open Courseware - Vesa Linja-aho (ATK-luokka V312) b) Osaaminen näkyväksi Maharan avulla - Timo Raatikainen ja Terhi-Maija Itkonen-Isakov (ATKluokka V313) c) Oman työtilan rakentaminen Moodle 2:ssa - Maarit Hynninen-Ojala ja Pekka Schering (ATKluokka P411) Täynnä! Esitykset nauhoitetaan ja linkki tallenteeseen tulee tälle sivulle. Jos tulet paikalle klo 9 jälkeen, pyri tulemaan esitysten välissä. Pienet muutokset ohjelmaan ovat mahdollisia. Pictures from safety cam
In the future every device has the net connection and many have net cam. In a shop you may ask from your fridge, what is missing or what is becoming obsolete? You can control your washers with your smartphone from everywhere, and your lights and air-condition and your TVs and your radios Your devices negotiate with each other and organize things for you. Your devices make purchases for you and organize deliveries for you and organize all kind of your matters.
CITIZEN S PROGRAMMING Citizens can download tools for Windows Phone programming from internet. Everything as a complete package. You need not to collect pieces from here and there. http://create.msdn.com/en-us/
Push the button: get to listen to recorded lessons:, and you
You make your first program in couple of hours Visual Studio 2010 Visual Studio 2010 Ultimate for Technology/Metropolia Click for new application => Choose Windows Phone => Choose program type
and voilà: The code above is born automatically. Red/blue/green/brown/ code above is of XAML (is pronounced as zamul ) and describes the properties of the visual elements.
Pick the visual elements from the Toolbox. Page 10
TextBlock blckinstructions TextBox txtvalue Button btnincrement TextBox txtoutput Double click the button, and you can write the code you want: Page 11
The code below is of C#: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using Microsoft.Phone.Controls; namespace PhoneApp1 { public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); } private void btnincrement_click(object sender, RoutedEventArgs e) { String buffer; bool flag; int Panos = 0; int Kerroin = 0; int Tulos = 0; buffer = "Incremented value is:" + Environment.NewLine + Environment.NewLine; flag = int.tryparse(txtvalue.text, out Panos); if (flag == false) { MessageBox.Show("Enter a whole number, Input Error"); txtvalue.focus(); return; } Tulos = Panos + 1; buffer = buffer + Tulos.ToString(); Panos = Tulos; txtvalue.text = Panos.ToString(); txtoutput.text = buffer; Page 12
} } } Expression Blend for designers (artists). The definitions made or the changes are shown immediately as XAML code. XAML code is in principle ONLY lists of visual elements and their properties and grouping (as HTML). Page 13
Final words You can test your program with an emulator (PC program), which starts with button F5. You do not need a real phone for testing! It IS EASY to make programs of given models. More ready-made programs are rapidly coming. More program models are probably coming. There is Visual Basic for citizens. There is C# for professionals. There is XAML for designers (artists) for creating the graphical appearance. The graphical tools are in use (Expression Blend). The programming on professional level IS DEMANDING! The solutions you developed are protected. You can sell your programs easily through Microsoft. Page 14