private void DeleteCache() { var flag = MessageBox.Ask(LanguageManager.GetString("message_deleteCache")); if (flag == System.Windows.MessageBoxResult.OK) { var launcher = @"..\Launcher.exe"; if (File.Exists(launcher)) { DeleteCacheViaLauncher(launcher); } else { DeleteCacheViaBat(); } } }
private void Close_But_Click(object sender, System.Windows.RoutedEventArgs e) { var val = MessageBox.Ask("Shutting down in 3 2 1....", "End"); //System.Windows.MessageBoxResult.OK; // MessageBox.Show(val.ToString(), "The Val"); // MessageBox.Show(val.GetType().ToString(), "The Val"); if (val == MessageBoxResult.OK) { System.Windows.Application.Current.Shutdown(); } GC.Collect(); /* * MessageBox.Show("This is great","Show"); * var val = MessageBox.Ask("This is great", "Ask"); * * //System.Windows.MessageBoxResult.OK; * * MessageBox.Show(val.ToString(), "The Val"); * MessageBox.Show(val.GetType().ToString(), "The Val"); * if(val==MessageBoxResult.OK) * { * MessageBox.Show("It Was OK"); * } * if (val==MessageBoxResult.Cancel) * { * MessageBox.Show("It Was Cancel"); * } * MessageBox.Error("This is great", "Error"); * MessageBox.Info("This is great", "Info"); * MessageBox.Fatal("This is great", "Fatal"); * MessageBox.Warning("This is great", "Warning"); * MessageBox.Success("This is great", "Success"); */ }