Windows Phone 7はじめました

Post on 28-May-2015

1.089 views 1 download

description

CLR/H#56資料

Transcript of Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

Windows Phone 7 はじめました

2011/4/16 初音玲

Community for Learning and Research in Hokkaido

自己紹介

Microsoft MVP for Visual Basic

Oracle ACE ハンドヘルド機→ Palm→ スマホ 痛 IDE とか作りました

2

Community for Learning and Research in Hokkaido

アジェンダ

実機について開発環境の構築開発実機デバッグまとめ

3

Community for Learning and Research in Hokkaido

実機について開発環境の構築開発実機デバッグまとめ

4

Community for Learning and Research in Hokkaido

実機について

2010/11/11 注文(予約してたのに ...) 2010/11/15 入手 2010/11/16 液晶剥離発見 2010/11/17 初期不良報告 2010/11/18 返品 2010/11/29 修理返送→状況変わらず 2010/12/01 交換希望で返品 2010/12/08 やっと入手

レアケースなので参考にしちゃダメで

5

Community for Learning and Research in Hokkaido

実機について

DEMO

6

Community for Learning and Research in Hokkaido

Windows Phone 7 の操作名

7

Windows Phone 7 UI ガイド

タップ

ダブルタップ

パン

フリック

ピンチ

ストレッチ

タッチアンドフォールド

Community for Learning and Research in Hokkaido

実機について開発環境の構築開発実機デバッグまとめ

8

Community for Learning and Research in Hokkaido

開発環境の構築

9

http://create.msdn.com/ja-JP

Windows Phone Developer Tools の入手– 無料

Community for Learning and Research in Hokkaido

Windows Phone Developer Tools

10

略称は WPDT

Visual Studio 2010 Express for Windows PhoneWindows Phone Emulator Resources

Silverlight 4 Tools for Visual Studio

XNA Game Studio 4.0

Microsoft Expression Blend for Windows Phone

Community for Learning and Research in Hokkaido

開発スタイル

11

Visual Studio 2010 Expressfor Windows Phone

Silverlight 4 Tools for Visual Studio

Windows Phone Emulator Resources

Windows Phone 7 アプリコード

Windows Phone 7 アセンブリ

配置

デバッグ実行

Community for Learning and Research in Hokkaido

WPDT インストール時の注意点

12

日本語 VS にテンプレートがインストールされない

1. \Common7\IDE\ProjectTemplates\CSharp\Silverlight for Windows Phone フォルダ配下の1033 フォルダをコピーして 1041 フォルダにリネーム

2. \Common7\IDE\ItemTemplates\CSharp\Silverlight for Windows Phone フォルダ配下の1033 フォルダをコピーして 1041 フォルダにリネーム

3. コマンドラインで devenv /setup 実行

日本語 Expression Blend 4 が入っていてはダメ

Community for Learning and Research in Hokkaido

最短インストール手順

13

Visual Studio 2010 インストール Windows Phone Developer Tools インスト 英語版 Expression Blend 4 アンインスト 日本語版 Expression Blend 4 インスト 日本語版 Expression Blend 4 SP1 インスト

Community for Learning and Research in Hokkaido

完成

14

Community for Learning and Research in Hokkaido

Visual Basic で書きたい!

15

Visual Studio 2010 Express for Windows Phone は C# のみ

WPDT + VB for WPDT + Express 以外

これだけ苦労していれてもExpression Blend 4 での対応はC# のみ

Community for Learning and Research in Hokkaido

Expression Blend 4

16

言語欄

Community for Learning and Research in Hokkaido

実機について開発環境の構築開発実機デバッグまとめ

17

Community for Learning and Research in Hokkaido

開発スタイル

18

Visual Studio 2010 Expressfor Windows Phone

Silverlight 4 Tools for Visual Studio

Windows Phone Emulator Resources

Windows Phone 7 アプリコード

Windows Phone 7 アセンブリ

配置

デバッグ実行

Community for Learning and Research in Hokkaido

標準的なアイコンも付属

19

Community for Learning and Research in Hokkaido

HiraganaTwit の UI

20

Community for Learning and Research in Hokkaido

HiraganaTwit の構成

UI• MainPage.xaml• PrivatePage.xaml• TwitPage.xaml• AccountPage.xaml• AboutPage.xaml

基本画像• ApplicationIcon.png• Background.png• SplashScreenImage.jp

g

Community for Learning and Research in Hokkaido

ロジックの実装

Private Sub Home_Button_Click(sender As System.Object, e As System.EventArgs) Try If Not TimeLineMode = EnumTimelineMode.Home Then TimeLineMode = EnumTimelineMode.Home Me.Result_ListBox.ItemsSource = Nothing Me.Result_ListBox.ItemsSource = HomeTimeline Me.Result_ListBox.UpdateLayout() End If Call GetList() Catch ex As Exception End TryEnd Sub

<shell:ApplicationBarIconButton IconUri="/Icons/appbar.download.rest.png" Text="Home" Click="Home_Button_Click" />

Community for Learning and Research in Hokkaido

Reactive Extentions

client.GetResponseText() _ .Select(Function(s) Return XElement.Parse(s) End Function) _ .SelectMany(Function(xe) xe.Descendants("status") _ .Select(Function(x) Return New TItem With {.id = x.Element("id").Value } End Function).Reverse) _ .DistinctUntilChanged(Function(t) t.id) _ .ObserveOnDispatcher() _ .Subscribe(Sub(t) If timeline.Count = 0 Then timeline.Insert(0, t) ElseIf CType(timeline(0), TItem).id < t.id Then timeline.Insert(0, t) End If End Sub, _ Sub(ex) MessageBox.Show(ReadWebException(ex)) End Sub, _ Sub() Me.Result_ListBox.ItemsSource = Nothing Me.Result_ListBox.ItemsSource = timeline Me.Result_ListBox.UpdateLayout() End Sub)

Community for Learning and Research in Hokkaido

実機について開発環境の構築開発実機デバッグまとめ

24

Community for Learning and Research in Hokkaido

開発デバッグ

25

Visual Studio 2010 Expressfor Windows Phone

Silverlight 4 Tools for Visual Studio

Windows Phone Emulator Resources

Windows Phone 7 アプリコード

Windows Phone 7 アセンブリ

配置

デバッグ実行

Community for Learning and Research in Hokkaido

開発デバッグ

Community for Learning and Research in Hokkaido

実機デバッグ

27

Visual Studio 2010 Expressfor Windows Phone

Silverlight 4 Tools for Visual Studio

Windows Phone 7 実機

Windows Phone 7 アプリコード

Windows Phone 7 アセンブリ

配置

デバッグ実行

Community for Learning and Research in Hokkaido

実機デバッグ

Community for Learning and Research in Hokkaido

実機デバッグには App Hub 登録必須

29

2010/11/13:App Hub にアカウントを登録する 2010/11/13:App Hub の確認の電子メールを受信する 2010/11/13: メールアドレス確認後にメールを受信する 2010/11/13:GeoTrust に本人確認の手続き開始依頼をする

※ここで GetTrust と Chat で会話すると Chat 終わった直後に次のステップのための下記のメールを取得できます。

2010/11/27:GeoTrust から本人確認用証明書の送信依頼を受信する※ここで GetTrust と Chat で会話すると Chat 終わった直後に次のステップにいけます。

2010/12/06: 本人確認用証明書の内容について不備があったのを指摘されて訂正して送信する

2010/12/07:GeoTrust と Chat をする 2010/12/08:GeoTrust アジアサポートからのメールを受信する 2010/12/10:GeoTrust での本人確認完了 2010/12/11:Windows Marketplace account notification を

受信する Windows Phone Developer Registration ツールで登録

改善されたようです

Community for Learning and Research in Hokkaido

実機について開発環境の構築開発実機デバッグまとめ

30

Community for Learning and Research in Hokkaido

まとめ

アプリ開発は実機がなくても勉強可能

実機があってもデプロイには App Hub への登録が必要–有料→学生さんは無料–面倒→改善された?

31