private void ClearAll_Click(object sender, RoutedEventArgs e) { CommClearCombatTable commClr = new CommClearCombatTable(listi); commClr.Execute(); }
private void Load_Click(object sender, RoutedEventArgs e) { try { Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog(); Nullable<bool> result = ofd.ShowDialog(); string temps; if (result == true) { temps = ofd.FileName; } else return; this.loadedFile = temps; this.loadedFileDir = Environment.CurrentDirectory; CommClearCombatTable commClr = new CommClearCombatTable(listi); commClr.Execute(); this.Title = "TableTop Manager" + temps; System.IO.StreamReader SR; SR = System.IO.File.OpenText(temps); String combatantString = SR.ReadToEnd(); JsonExporter.combatTableFromJsonFile(listi, combatantString); } catch { MessageBox.Show("Invalid File"); } }