private void EditText() { LogicText foo = (LogicText) this.Logic; EditPropertyWindow window = new EditPropertyTextBoxWindow (Constants.Text, foo.Text, null); if (window.ShowDialog (MainWindow.Instance) == System.Windows.Forms.DialogResult.OK) { string before = foo.Text; MainWindow.Instance.PushUndo (() => SetText (before)); SetText ((string) window.Value); } }
private void EditName() { EditPropertyWindow window = new EditPropertyTextBoxWindow (name, currentZone.Name, null); if (window.ShowDialog (MainWindow.Instance) == System.Windows.Forms.DialogResult.OK) { string before = currentZone.Name; MainWindow.Instance.PushUndo (() => SetName (before)); SetName ((string) window.Value); } }
private void EditDescription() { EditPropertyWindow window = new EditPropertyTextBoxWindow (description, MainWindow.Game.Description, null); window.SetSize (200, 200); if (window.ShowDialog (MainWindow.Instance) == System.Windows.Forms.DialogResult.OK) { string before = MainWindow.Game.Description; MainWindow.Instance.PushUndo (() => SetDescription (before)); SetDescription ((string) window.Value); } }
private void EditAuthor() { EditPropertyWindow window = new EditPropertyTextBoxWindow (author, MainWindow.Game.Author, null); window.SetSize (200, 0); if (window.ShowDialog (MainWindow.Instance) == System.Windows.Forms.DialogResult.OK) { string before = MainWindow.Game.Author; MainWindow.Instance.PushUndo (() => SetAuthor (before)); SetAuthor ((string) window.Value); } }