当前位置: 首页>>代码示例>>C#>>正文


C# ClosingEventArgs类代码示例

本文整理汇总了C#中ClosingEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ClosingEventArgs类的具体用法?C# ClosingEventArgs怎么用?C# ClosingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ClosingEventArgs类属于命名空间,在下文中一共展示了ClosingEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnServiceClosing

 void OnServiceClosing(object sender, ClosingEventArgs e)
 {
     using (IsolatedStorageFileStream file = new IsolatedStorageFileStream("debugOutput.txt", FileMode.Append, FileAccess.Write, IsolatedStorageFile.GetUserStoreForApplication()))
     {
         using (StreamWriter writeFile = new StreamWriter(file))
         {
             writeFile.WriteLine("EXIT");
             writeFile.Close();
         }
         file.Close();
     }
 }
开发者ID:nimbosa,项目名称:cordova-wp8,代码行数:12,代码来源:ConsoleHelper.cs

示例2: Application_Closing

        // Code to execute when the application is closing (eg, user hit Back)
        // This code will not execute when the application is deactivated
        private void Application_Closing(object sender, ClosingEventArgs e)
        {
            // Dispose ViewModels
            var viewModelLocator = this.Resources["ViewModelLocator"] as ViewModelLocator;
            if (viewModelLocator != null) viewModelLocator.Dispose();

            // Close connection to relay service
            //EveWindowsPhone.Pages.Main.MainView.client.CloseAsync();
        }
开发者ID:AleksandarDev,项目名称:Eve,代码行数:11,代码来源:App.xaml.cs

示例3: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     // The application will not be tombstoned, so save only to isolated storage.
     if (!string.IsNullOrEmpty(ApplicationDataObject))
     {
         SaveDataToIsolatedStorage("Quran360DataFile.txt", ApplicationDataObject);
     }
 }
开发者ID:hostrings,项目名称:Quran360WindowsPhone,代码行数:10,代码来源:App.xaml.cs

示例4: Application_Closing

 // Код для выполнения при закрытии приложения (например, при нажатии пользователем кнопки "Назад")
 // Этот код не будет выполняться при деактивации приложения
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     if (!Session.RememberSession)
         Session.CurrentSession = null;
 }
开发者ID:passick,项目名称:wp.fm,代码行数:7,代码来源:App.xaml.cs

示例5: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     UnityPlayer.UnityApp.Quit();
 }
开发者ID:Tinytoot,项目名称:SumoBlocks,代码行数:6,代码来源:App.xaml.cs

示例6: Application_Closing

 // 应用程序关闭(例如,用户点击“后退”)时执行的代码
 // 此代码在停用应用程序时不执行
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     SaveData();
     SaveSettings();
     update.UpdateTiles();
 }
开发者ID:serious198706,项目名称:ListBox2Demo,代码行数:8,代码来源:App.xaml.cs

示例7: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     BlobCache.UserAccount.Flush().Wait();
 }
开发者ID:journeyman,项目名称:PodcastReader,代码行数:6,代码来源:App.xaml.cs

示例8: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     Countly.EndSession();
 }
开发者ID:jvlstudio,项目名称:countly-sdk-windows-phone,代码行数:6,代码来源:App.xaml.cs

示例9: Application_Closing

        // Code to execute when the application is closing (eg, user hit Back)
        // This code will not execute when the application is deactivated
        private void Application_Closing(object sender, ClosingEventArgs e)
        {
            IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;

            String image = CustomBrush1.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if(settings.Contains("CustomBrush1"))
                {
                    settings["CustomBrush1"]=CustomBrush1;
                }
                else
                {
                    settings.Add("CustomBrush1", CustomBrush1);
                }
            }

            image = CustomBrush2.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush2"))
                {
                    settings["CustomBrush2"] = CustomBrush2;
                }
                else
                {
                    settings.Add("CustomBrush2", CustomBrush2);
                }
            }

            image = CustomBrush3.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush3"))
                {
                    settings["CustomBrush3"] = CustomBrush3;
                }
                else
                {
                    settings.Add("CustomBrush3", CustomBrush3);
                }
            }

            image = CustomBrush4.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush4"))
                {
                    settings["CustomBrush4"] = CustomBrush4;
                }
                else
                {
                    settings.Add("CustomBrush4", CustomBrush4);
                }
            }

            image = CustomBrush5.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush5"))
                {
                    settings["CustomBrush5"] = CustomBrush5;
                }
                else
                {
                    settings.Add("CustomBrush5", CustomBrush5);
                }
            }

            image = CustomBrush6.ToString();
            if (image != "System.Windows.Media.ImageBrush" && image != "#00000000")
            {
                if (settings.Contains("CustomBrush6"))
                {
                    settings["CustomBrush6"] = CustomBrush6;
                }
                else
                {
                    settings.Add("CustomBrush6", CustomBrush6);
                }
            }

            settings.Save();
        }
开发者ID:disbitski,项目名称:DoodlePad,代码行数:86,代码来源:App.xaml.cs

示例10: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     if (db != null)
     {
         db.closeDatabase();
     }
     App.ViewModel.SaveRecents();
 }
开发者ID:ujaiswal,项目名称:Sci_Time_Windows_Phone,代码行数:10,代码来源:App.xaml.cs

示例11: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     this.SaveCurrentPuzzleId();
 }
开发者ID:vyjayanthiraja,项目名称:PuzzleSource,代码行数:6,代码来源:App.xaml.cs

示例12: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication())
     {
         using (IsolatedStorageFileStream fs = storage.CreateFile(LogFile))
         {
             using (StreamWriter writer = new StreamWriter(fs))
             {
                 Logger.Save(writer);
             }
         }
     }
 }
开发者ID:vstrien,项目名称:KOCus,代码行数:15,代码来源:App.xaml.cs

示例13: Application_Closing

 // Code to execute when the application is closing (eg, user hit Back)
 // This code will not execute when the application is deactivated
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     // Ensure that required application state is persisted here.
     var vml = Resources["Locator"] as ViewModelLocator;
     vml.SaveState();
 }
开发者ID:kventin,项目名称:Windows-Phone-Starter-Kit-for-RSS,代码行数:8,代码来源:App.xaml.cs

示例14: Application_Closing

        // Code to execute when the application is closing (eg, user hit Back)
        // This code will not execute when the application is deactivated
        private void Application_Closing(object sender, ClosingEventArgs e)
        {
            Debug.WriteLine("App is closing");
            if (OnNewTilePinned != null)
            {
                OnNewTilePinned();
                OnNewTilePinned = null;
            }

        }
开发者ID:SoftwareFactoryUPC,项目名称:ProjectTemplates,代码行数:12,代码来源:App.xaml.cs

示例15: Application_Closing

 // 应用程序关闭(例如,用户点击“后退”)时执行的代码
 // 此代码在停用应用程序时不执行
 private void Application_Closing(object sender, ClosingEventArgs e)
 {
     // 确保所需的应用程序状态在此处保持不变。
 }
开发者ID:varx,项目名称:WP7-apps,代码行数:6,代码来源:App.xaml.cs


注:本文中的ClosingEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。