AmandaInterface.FileEditorTab.AskToSaveFile C# (CSharp) Метод

AskToSaveFile() публичный Метод

public AskToSaveFile ( ) : void
Результат void
        public void AskToSaveFile()
        {
            if (!IsEdited) return;

            String file = (FileLocation == "") ? "Untitled" : FileLocation;

            DialogResult result = MessageBox.Show("Save File " + file + "?",
                                                    "Save File",
                                                    MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                Save();
            }
        }

Usage Example

Пример #1
0
        public void CloseFile(FileEditorTab fileTab)
        {
            // TODO: Make AskToSaveFile so that it also has a CANCEL button
            //
            fileTab.AskToSaveFile();
            TabPages.Remove(fileTab);

            if (TabCount == 0)
            {
                this.AddNewFile();
            }
        }
All Usage Examples Of AmandaInterface.FileEditorTab::AskToSaveFile