windows phone 7はじめました

31
Community for Learning and Research in Hokkaido Windows Phone 7 はははははは 2011/4/16 初初初

Upload: akira-hatsune

Post on 28-May-2015

1.089 views

Category:

Technology


1 download

DESCRIPTION

CLR/H#56資料

TRANSCRIPT

Page 1: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

Windows Phone 7 はじめました

2011/4/16 初音玲

Page 2: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

自己紹介

Microsoft MVP for Visual Basic

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

2

Page 3: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

アジェンダ

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

3

Page 4: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

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

4

Page 5: Windows Phone 7はじめました

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

Page 6: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

実機について

DEMO

6

Page 7: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

Windows Phone 7 の操作名

7

Windows Phone 7 UI ガイド

タップ

ダブルタップ

パン

フリック

ピンチ

ストレッチ

タッチアンドフォールド

Page 8: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

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

8

Page 9: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

開発環境の構築

9

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

Windows Phone Developer Tools の入手– 無料

Page 10: Windows Phone 7はじめました

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

Page 11: Windows Phone 7はじめました

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 アセンブリ

配置

デバッグ実行

Page 12: 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 が入っていてはダメ

Page 13: Windows Phone 7はじめました

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 インスト

Page 14: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

完成

14

Page 15: Windows Phone 7はじめました

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# のみ

Page 16: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

Expression Blend 4

16

言語欄

Page 17: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

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

17

Page 18: Windows Phone 7はじめました

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 アセンブリ

配置

デバッグ実行

Page 19: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

標準的なアイコンも付属

19

Page 20: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

HiraganaTwit の UI

20

Page 21: Windows Phone 7はじめました

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

Page 22: Windows Phone 7はじめました

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" />

Page 23: Windows Phone 7はじめました

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)

Page 24: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

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

24

Page 25: Windows Phone 7はじめました

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 アセンブリ

配置

デバッグ実行

Page 26: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

開発デバッグ

Page 27: Windows Phone 7はじめました

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 アセンブリ

配置

デバッグ実行

Page 28: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

実機デバッグ

Page 29: Windows Phone 7はじめました

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 ツールで登録

改善されたようです

Page 30: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

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

30

Page 31: Windows Phone 7はじめました

Community for Learning and Research in Hokkaido

まとめ

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

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

31