示例#1
0
  { 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();
    }
示例#2
0
文件: IO_Save.CS 项目: HumMod/editor
  { public static void Save()
    {
        TabData Data = TabManager.GetSelectedTabData();

        Save(Data);
        State.RefreshSaves();
    }
示例#3
0
文件: IO_Close.CS 项目: HumMod/editor
  { 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();
        }
    }