當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。