/// <summary> /// Handler for Quit Menu Item. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void QuitProject_Quit(object sender, StateEventArgs e) { if (e.Wanto == StateEventArgs.WantTo.Save) { SaveProject.Save(this.projectstate, this.framesContainer); } else if (e.Wanto == StateEventArgs.WantTo.Dispose) { return; } Environment.Exit(0); }
/// <summary> /// Eventhandler for close project that gets injected to handle the users input. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CloseProject_Close(object sender, StateEventArgs e) { if (e.Wanto == StateEventArgs.WantTo.Save) { SaveProject.Save(this.projectstate, this.framesContainer); } else if (e.Wanto == StateEventArgs.WantTo.Dispose) { return; } CloseProject(); }