Microsoft Windows Mobile Dae-Ki Kang
차례 소개 설치 Hello, Smartphone! etc. in MFC of C++ 배포 (Deployment) ( 프로그램을스마트디바이스에업로드하는것 ) GUI Programming in C#
소개 SmartPhone? http://en.wikipedia.org/wiki/smartphone 일반모바일폰이상의, PC 와비슷한고급기능을제공하는모바일폰 Windows Mobile http://en.wikipedia.org/wiki/windows_mobile 마이크로소프트 Win32 API 에근거한모바일디바이스를위한기본어플리케이션들의세트로구성된컴팩트한운영체제
새로운 컴퓨팅 환경
완벽한기업환경으로의통합 ASP.NET Mobile Control Media Player on Pocket PC/ Smartphone SQL Server CE SQL Server Notification Services Exchange Active Sync Outlook Mobile Access Outlook Web Access
새로운디바이스들 다기능디지털디바이스 네트워크서비스로의확장
XML Web Service 이동성의장점 경량분산컴퓨팅환경 모바일클라이언트로쉽게확장 네트워크경계안에서의사용 방화벽을통해외부시스템사용 표준에대한광범위한서포트 간결하지만다양한모바일환경 공통의기본구조 IT 산업계에기존의시스템 (Legacy system) 들활용
.NET 기반개발의장점 웹서비스기반프로그래밍 다양한언어들 최적의도구들 호환성을위한표준 운영체제와의통합 다양한산업응용에적용
VS.NET.NET 프레임워크 (Framework) ASP.NET WinForm Data & XML Base Classes Common Language Runtime
VS.NET.NET Compact Framework.NET CF ASP.NET WinForm Data & XML Base Classes Common Language Runtime
.NET 컴팩트프레임워크 (.NET Compact Framework) Services Description Discovery Protocols System.Web UI HtmlControls WebControls Caching Security Configuration SessionState System.WinForms Design ComponentModel System.Drawing Drawing2D Printing Imaging Text System.Data System.Xml ADO.NET Design SqlClient SqlServerCe XmlDocument Xslt/XPath Serialization Reader/Writers System Collections Security Text Globalization IO Net Reflection Resources Configuration ServiceProcess Diagnostics Threading Runtime InteropServices Remoting Serialization
.NET 컴팩트프레임워크 스마트디바이스를위한.NET 프레임워크 경량의구조 데스크탑플랫폼과호환가능함 Visual Studio.NET 및다른회사들의도구들 다양한범위의사용 다중 CPU 다양한운영체제 다양한디바이스
.NET CF 설계및구조 XML Web Service 지원 다양한데이터처리.NET 코드들 디바이스함수를쉽게확장
스마트디바이스를위한.NET 개발 환경.NET Framework Web Program in a Server ASP.NET Web Pages Local Codes Windows Environment as a Client Mobile Web Browser.NET Compact Framework
ASP.NET 모바일콘트롤.NET Framework ASP.NET Web Pages Local Codes Mobile Web Browser.NET Compact Framework
스마트디바이스를위한.NET XML Web Services Visual Studio.NET VB C++ C# Perl Python SOAP Web Services User Interface ASP.NET, Mobile Control Data and XML Mobile Web Pages Base Framework Common Language Runtime (CLR) Mobile Web Browser Windows Device OS
스마트디바이스응용프로그램.NET Framework ASP.NET Web Pages Local Codes Mobile Web Browser.NET Compact Framework
디바이스들을위한.NET Visual Studio.NET.NET Compact Framework Window XML Web Services SOAP Local Code.NET Compact Framework Device OS
스마트디바이스프로그램개 발 마법사 (Wizard) 함수 Visual Basic and Visual C# Windows CE.NET and Pocket PC 템플릿들 윈도우응용프로그램 클래스라이브러리 윈도우콘트롤라이브러리 GUI 기반이아닌응용프로그램
스마트디바이스프로그램개 발 각디바이스마다서로다른 IDE 사양 툴박스, 레퍼런스, 프라퍼티 인텔리센스 (IntelliSense), 컨텍스트에민감한도움말 데스크탑용코드를아주약간변경하면오케이 동일한코드에디터 IDE 에에러메시지출력 Visual Studio.NET 통합도구들 XML 웹서비스 웹레퍼런스 UDDI 디렉토리, 자동화된프락시코드생성
디바이스커스터마이징 디바이스특성에맞는프로젝트컨피규레이션 디바이스특성에맞는콘트롤세트들 디바이스컨피규레이션과연결셋업
에뮬레이터 외국어를지원하는디바이스에뮬레이션 ( 즉한국어도지원 ) 윈도우 XP 호스트에서윈도우 CE 운영체제작동 다양한윈도우 CE 이미지들 다양한디바이스스킨들
디바이스컨트롤 Windows Forms 디자이너 Drag & Drop, Property 기반 데스크탑컨트롤들의부분집합 사용자인터페이스 데이터입력 디스플레이 RAD 콘트롤 Organizational controls Helper controls
Device Control Data Entry Check Box Combo Box Command Button Domain Up/Down List Box Numeric Up/Down Radio Button Text Box Track Bar Display Label Picture Box Progress Bar Status Bar Organizational List View Panel Tab Control Not Supported Checked List Box Data Grid DateTime Picker Group Box Month Calendar Tree View Helper Context Menu Scroll Bars Image List Main Menu Open & Save File Dialogs Timer Tool Bar Splitter
호환성 Pinvoke 로 Native 코드호출 관리코드 (Managed Program) 에서도네이티브코드호출가능 데스크탑프로그래밍과동일 Windows CE API 호출지원 기본데이터타입의자동화된 Marshalling 과 UnMarshalling 고성능및저자원사용
호환성 COM 사용 Wrapper 가필요함 개발자들이기존널리사용되던콘트롤들사용가능 Managed Classes 들을통해가능함 실행엔진의초기화가필요함
ASP.NET 모바일콘트롤 모바일응용개발분야로 ASP.NET 확장.NET Framework 모든개발환경을 Visual Studio.NET 으로통합 ASP.NET Web Forms Mobile Web Forms Web Services Windows Forms &.NET Compact Framework 다양한디바이스들과마크업언어들 Mobile Web Form Services Framework Base Data Debug Common Language Runtime System Services
웹폼 (Web Form) 대모바일폼 (Mobile Form) 웹폼 (Web Form) <Form runat="server"> <asp asp:label runat= server"> Hello, World </asp asp:label> </Form> 모바일웹폼 (Mobile Web Form) <mobile mobile:form runat="server"> <mobile mobile:label runat= server"> Hello, Mobile World </mobile mobile:label> </mobile mobile:form>
ASP.NET 과 IIS ASP.NET and IIS Return WML with the WTAI tag Get Device Adapter Mobile WML Capabilities Select Device Adapter Get Browser and Device WAP HTTP Request Page instantiates control PhoneCall Get Device Adapter chtml HTML Return HTML with alternative text Mobile.ASPX
차례 소개 설치 Hello, Smartphone! etc. in MFC of C++ 배포 (Deployment) ( 프로그램을스마트디바이스에업로드하는것 ) GUI Programming in C#
설치 (Microsoft Visual Studio 2005.NET) First Steps in Windows Mobile Programming (http://msdn.microsoft.com/en-us/library/aa457716.aspx) Visual Studio 2005 Standard, Professional, or Team System Editions 액티브싱크 (ActiveSync 4.1) (http://www.microsoft.com/window smobile/en-us/help/synchronize/default.mspx ) 포켓 PC 용 Windows Mobile 5.0 SDK (http://www.microsoft.com/downloads/details.aspx?familyid=8 3A52AF2-F524-4EC5-9155-717CBE5D25ED&displaylang=en) 스마트폰용 Windows Mobile 5.0 SDK (http://www.microsoft.com/downloads/details.aspx?familyid=d C6C00CB-738A-4B97-8910-5CD29AB5F8D9&displaylang=en)
설치 (embedded Visual C++ Stuites) First Steps in Windows Mobile Programming (http://msdn.microsoft.com/en-us/library/aa457716.aspx) embedded Visual C++ embedded Visual C++ 4.0 SP4 the SDK for Windows Mobile 2003-based Pocket PCs the SDK for Windows Mobile 2003-based Smartphones Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC Developer Resources for Windows Mobile 2003 Second Edition Where are Emulator Images for smartphone? Emulator Images for Windows Mobile 2003 Second Edition software for Smartphone (http://www.microsoft.com/downloads/details.aspx?familyid=791bae52 -b057-4d72-b263-105534825ca5) Localized Windows Mobile 5.0 Smartphone Emulator Images (http://www.microsoft.com/downloads/details.aspx?familyid=52fed581-8f8d-4c46-9966-4832098191b7)
차례 소개 설치 Hello, Smartphone! etc. in MFC of C++ 배포 (Deployment) ( 프로그램을스마트디바이스에업로드하는것 ) GUI Programming in C#
Hello, Smartphone! 새프로젝트 (New project) 프로젝트타입 스마트디바이스 (Project type smart device) 다음둘중선택 MFC Smart Device Application Win32 Smart Device Project 프로젝트이름선택 Hello1 MFC/Win32 스마트디바이스 (Smart Device) Project Wizard Smartphone 2003 또는 Pocket PC 2003 선택 기본설정따름 MFC Single document, Use MFC in a static library, Doc/View architecture support Win32 Windows application 종료선택
MessageBox Construct a MFC Smart device project named Hello1 In Hello1Doc.cpp, add one line inside OnNewDocument() method 1. BOOL CHello1Doc::OnNewDocument() { 2. if (!CDocument::OnNewDocument()) return FALSE; 3. MessageBox(NULL, TEXT("Hello, Smartphone"), TEXT("Hello1"), MB_OK); 4. return TRUE; 5. }
한가지중요한점 초기설정이끝나면, 윈도우모바일프로그래밍은일반윈도우프로그래밍과대부분동일함 따라서, 개발자가윈도우 API/MFC 프로그래밍에능하면, 별문제없음
DrawText In Hello1View.cpp, add three lines 1. void CHello1View::OnDraw(CDC* pdc) 2. { 3. CHello1Doc* pdoc = GetDocument(); 4. ASSERT_VALID(pDoc); 5. RECT rect; 6. GetClientRect(&rect); 7. DrawText(*pDC, TEXT("Hello, Oman Engineers!"), -1, &rect, DT_CENTER DT_VCENTER DT_SINGLELINE); 8. }
차례 소개 설치 Hello, Smartphone! etc. in MFC of C++ 배포 (Deployment) ( 프로그램을스마트디바이스에업로드하는것 ) GUI Programming in C#
프로그램배포 1. 컴파일하고배포 ( 디플로이 ; deploy) 함 빌드메뉴밑의구성관리자 (Configuration Manager) 실행 Solution Configuration Debug/Release 솔루션플랫폼 (Solution Platforms) Pocket PC 2003(ARMV4) / Smartphone 2003(ARMV4) 타겟디바이스 (Target Device) Pocket PC 2003 Device / Pocket PC 2003 SE Emulator Smartphone 2003 Device / Smartphone 2003 SE Emulator
어떻게프로그램을배포하는가? 2. Smart CAB 파일들생성 Click Solution Explorer Add New Project Check Project Type (left panel) Other Project Types Setup and Deployment Choose Smart Device CAB Project Name the project Hello1Cab Click Hello1Cab Project in Solution Explorer Add Project Output Project:Hello1,Primary Output, Active Configuration Build Hello1Cab
차례 소개 설치 Hello, Smartphone! etc. in MFC of C++ 배치 (Deployment) ( 프로그램을스마트디바이스에업로드하는것 ) GUI Programming in C#
C# 을이용한 WYSIWYG 기반개발
Button 입력 C# 용 Smartphone 2003 Device 응용생성 Form1.Text 를 Dongseo Univ. 로변경 Label 을화면중앙에붙임 label1.text 를 Hello, Mobile Systems 로변경 버튼을더블클릭하면 Form1_KeyDown 코드가열림 1. private void Form1_KeyDown(object sender, KeyEventArgs e) 2. { 3. if ((e.keycode == System.Windows.Forms.Keys.Up)) 4. { 5. // Up 6. this.label1.text = "Up"; 7. } 8. }
콘트롤 (Controls) 과메뉴 (Menus) Design 탭에서 mainmenu1 을선택 mainmenu1 의화살표를선택하여 Menu Task 를편집 두개의메뉴아이템을편집 HitMe and OK PictureBox 를화면의정면에놓음 오만 (Oman) 의오아시스이미지삽입