private void CreateNew(object sender, RoutedEventArgs e) { if (file.SaveCheck()) { file = new TxtFile(); this.DataContext = file; } }
private void Application_Exit(object sender, ExitEventArgs e) { file.SaveCheck(); }