{ public static void SaveAs() { TabData Data = TabManager.GetSelectedTabData(); SaveFileDialog Dlg = new SaveFileDialog(); Dlg.Title = AppMain.AppName + " - Save As"; Dlg.Filter = "DESolver Files (*.DES) |*.DES| All Files (*.*) |*.*"; Dlg.FileName = Data.Filename; DialogResult Result = Dlg.ShowDialog(); if (Result != DialogResult.OK) { return; } IO_Writer.Write(Dlg.FileName, Data.Box.Text); TabManager.NewFilename(Data.Filename, Dlg.FileName); Data.Box.Modified = false; State.RefreshSaves(); FileTree.This.RefreshTree(); }
{ public static void Save() { TabData Data = TabManager.GetSelectedTabData(); Save(Data); State.RefreshSaves(); }
{ public static void Close() { TabData Data = TabManager.GetSelectedTabData(); DialogResult OK = IO_Save.SaveAskIfChanged(Data); if (OK == DialogResult.Cancel) { return; } TabManager.Remove(); if (!TabManager.HasTabs()) { State.NoFilesOpen(); } }