Subversion Repository Public Repository

Nextrek

Diff Revisions 42 vs 43 for /WindowsPhone/NotizieTL/NotizieTL/App.xaml.cs

Diff revisions: vs.
  @@ -14,6 +14,7 @@
14 14 using Microsoft.Phone.Shell;
15 15 using System.IO.IsolatedStorage;
16 16
17 +
17 18 namespace NotizieTL
18 19 {
19 20 public partial class App : Application
  @@ -81,14 +82,14 @@
81 82 // This code will not execute when the application is reactivated
82 83 private void Application_Launching(object sender, LaunchingEventArgs e)
83 84 {
84 - loadState();
85 + //loadState();
85 86 }
86 87
87 88 // Code to execute when the application is activated (brought to foreground)
88 89 // This code will not execute when the application is first launched
89 90 private void Application_Activated(object sender, ActivatedEventArgs e)
90 91 {
91 - loadState();
92 + //loadState();
92 93
93 94 // Ensure that application state is restored appropriately
94 95 if (!App.ViewModel.IsDataLoaded)
  @@ -101,7 +102,7 @@
101 102 // This code will not execute when the application is closing
102 103 private void Application_Deactivated(object sender, DeactivatedEventArgs e)
103 104 {
104 - saveState();
105 + //saveState();
105 106 }
106 107
107 108 // Code to execute when the application is closing (eg, user hit Back)
  @@ -109,7 +110,7 @@
109 110 private void Application_Closing(object sender, ClosingEventArgs e)
110 111 {
111 112 // Ensure that required application state is persisted here.
112 - saveState();
113 + //saveState();
113 114 }
114 115
115 116 // Code to execute if a navigation fails
  @@ -170,31 +171,32 @@
170 171
171 172 private void saveState()
172 173 {
173 - PhoneApplicationService phoneAppService = PhoneApplicationService.Current;
174 - IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
174 + //PhoneApplicationService phoneAppService = PhoneApplicationService.Current;
175 + //IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
175 176
176 - //Take whatever is in our temporary "state bag" and save it to
177 - //the phone's permanent flash memory
178 -
179 - settings["MyValue"] = phoneAppService.State["MyValue"];
177 + ////Take whatever is in our temporary "state bag" and save it to
178 + ////the phone's permanent flash memory
179 +
180 + //settings["MyValue"] = phoneAppService.State["MyValue"];
180 181
181 182 }
182 183
183 184 private void loadState()
184 185 {
185 - PhoneApplicationService phoneAppService = PhoneApplicationService.Current;
186 - IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
186 + //PhoneApplicationService phoneAppService = PhoneApplicationService.Current;
187 + //IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
187 188
188 - object myValue;
189 - if (settings.TryGetValue<object>("MyValue", out myValue))
190 - {
189 + //object myValue;
190 + //if (settings.TryGetValue<object>("MyValue", out myValue))
191 + //{
191 192
192 - phoneAppService.State["MyValue"] = myValue;
193 + // phoneAppService.State["MyValue"] = myValue;
193 194
194 - }
195 + //}
195 196
196 197
197 198 }
198 199
200 +
199 201 }
200 202 }