22
Windows Phone 7 Li Jingnan / Wang Tao 2011-7-15 1

06 wp7 isolation storage

Embed Size (px)

Citation preview

Page 1: 06 wp7   isolation storage

Windows Phone 7

Li Jingnan / Wang Tao2011-7-15

1

Page 2: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.

2 days 9:00 Introduction Anytao

10:30 Build a Silverlight Application Jason

13:00 Application Bar Anytao

14:30 Panorama and Pivots Jason

16:00 Launcher and Chooser Jason

9:00 Isolation Storage Anytao

10:30 Application Lifecycle Jason

13:00 Push Notification Anytao

14:30 Multitasking Jason

16:00 Local Database Anytao

9:00 Design Apps Using Expression Blend and Metro Jason

10:30 Marketing your Windows Phone Application Jason

13:00 Working with Azure Anytao

2

Page 3: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.

about

anytao | Ethos

<ethos:Member id = “Wang Tao” msn = [email protected] weibo = http://weibo.com/anytao runat = “Senior System Architect”/>

Jason | Ethos

<ethos:Member id = “Li Jingnan” msn = [email protected] weibo = http://weibo.com/jn1981 runat = “SE”/>

Page 4: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.

abouthttp://book.anytao.net

Page 5: 06 wp7   isolation storage

06 isolated storage

Wang Tao / 2011-07-15

Page 6: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.

session outlineoverview

overview isolated storage

storage

isolatedstorage application settings misc

ATFile quota threading

Page 7: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.

data storage

Page 8: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.

isolated storage

Page 9: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.9

isolated storage classes

IsolatedStorageFile represents an isolated storage area containing files and directories

IsolatedStorageFileStream exposes a file stream access to a file stored within isolated storage

IsolatedStorageSettings Dictionary<Tkey, Tvalue> that stores key-value pairs in isolated storage

Page 10: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.10

isolated storage / save

Page 11: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.11

isolated storage / loading

Page 12: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.12

application setting

store settings like appsetting in web use ApplicationSettings object in isolated storage use it as you would use a dictionary then write object to persistent storage

When the user exits your application, Windows Phone automatically calls Save to save the IsolatedStorageSettings.

Page 13: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.13

application setting / add

Page 14: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.14

application setting / loading

Page 15: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.15

application setting / delete

Page 16: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.16

ATFile/ATDirectory

Page 17: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.17

quota management

there are no quotas on WP apps must make careful use of space manage app data

delete temporary data consider async or archiving data to the

cloud to reduce device storage

Page 18: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.18

serialization and threads

serialization complex object for saving and loading SettingHelper

multi-thread use new threading to perform saving

and loading

Page 19: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.19

demo03 auth context in isolated storage

/ isolated storage/ auth process/ ATFile/ isolated setting

Page 20: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.20

practicecustomized appsetting

Page 21: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.21

Click to add picturethank youthank youwww.anytao.com

Page 22: 06 wp7   isolation storage

Windows Phone Microsoft Corporation.

© 2011 Microsoft Corporation.

All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22