private void scenesTree_BeforeSelect(object sender, TreeViewCancelEventArgs e) { if (hasChanged) { var r = MessageBox.Show("Selecting a new node will undo any changes in the scene. Continue without saving?", "Change scene", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning); if (r == DialogResult.Cancel) { e.Cancel = true; } else if (r == DialogResult.No) { wrapper.Save(); } else { hasChanged = false; } } }
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { wrapper.Save(); statusLabelSaved.Visible = true; SavedTimer.Start(); }