本文整理汇总了C#中DeactivatedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# DeactivatedEventArgs类的具体用法?C# DeactivatedEventArgs怎么用?C# DeactivatedEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DeactivatedEventArgs类属于命名空间,在下文中一共展示了DeactivatedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
if (wasLocked & ((e.Reason == DeactivationReason.ApplicationAction) | (e.Reason == DeactivationReason.UserAction)))
{
this.Terminate();
}
}
示例2: Deactivated
public void Deactivated(object sender, DeactivatedEventArgs e)
{
// save state
double vscroll = ListBoxOne.GetVerticalScrollOffset();
Configuration.SaveStateSetting<object>("DataContext", DataContext);
Configuration.SaveStateSetting<double>("VScrollPosition", vscroll);
}
示例3: appService_Deactivated
void appService_Deactivated(object sender, DeactivatedEventArgs e)
{
string key = "pause";
if (appService.State.ContainsKey(key))
appService.State[key] = Manager.manager.pause;
else
appService.State.Add(key,Manager.manager.pause);
}
示例4: Application_Deactivated
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
if (_vm != null)
{
var phoneApplicationPage = RootFrame.Content as PhoneApplicationPage;
if (phoneApplicationPage != null)
_vm = (VMBase)phoneApplicationPage.DataContext;
}
}
示例5: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
// get a tombstonedata item...
TombstoneData data = TombstoneData.GetTombstoneItem("UserToken", true);
if (data == null)
throw new InvalidOperationException("'data' is null.");
data.Value = RestServiceProxy.Token;
data.SaveChanges();
}
示例6: Application_Deactivated
// Código para ejecutar cuando la aplicación se desactiva (se envía a segundo plano)
// Este código no se ejecutará cuando la aplicación se cierre
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
var viewModelLocatorService = Current.Resources["ViewModelLocator"] as ViewModelLocator;
if (viewModelLocatorService != null)
{
viewModelLocatorService.MainViewModel.SaveRecipesToIs();
viewModelLocatorService.MainViewModel.UpdateTile();
}
}
示例7: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
CameraExplorer.DataContext d = CameraExplorer.DataContext.Singleton;
if (d.Device != null)
{
d.Device.Dispose();
d.Device = null;
}
}
示例8: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
Debug.WriteLine("App is deactivating");
if (OnNewTilePinned != null)
{
OnNewTilePinned();
OnNewTilePinned = null;
}
}
示例9: Deactivated
public void Deactivated(object sender, DeactivatedEventArgs e)
{
Configuration.SaveStateSetting<int>("SelectedPivot", pivot.SelectedIndex);
if (pivot.SelectedItem != null && pivot.SelectedItem is PivotItem)
{
PivotItem selectedItem = (PivotItem)pivot.SelectedItem;
if (selectedItem.Content != null && selectedItem.Content is NavigationPanel)
{
((NavigationPanel)selectedItem.Content).Deactivated(sender, e);
}
}
}
示例10: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
// Ensure that required application state is persisted here.
// If there is data in the application member variable...
if (!string.IsNullOrEmpty(ApplicationDataObject))
{
// Store it in the State dictionary.
PhoneApplicationService.Current.State["ApplicationDataObject"] = ApplicationDataObject;
// Also store it in isolated storage, in case the application is never reactivated.
SaveDataToIsolatedStorage("Quran360DataFile.txt", ApplicationDataObject);
}
}
示例11: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
// Ensure that required application state is persisted here.
}
示例12: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
UnityPlayer.UnityApp.Deactivate();
}
示例13: ApplicationDeactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void ApplicationDeactivated(object sender, DeactivatedEventArgs e)
{
SaveSettings();
}
示例14: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
BlobCache.UserAccount.Flush().Wait();
}
示例15: Application_Deactivated
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
Countly.EndSession();
}