private void Main_FormClosing(object sender, FormClosingEventArgs e) { var closeCommand = new Commands.CloseApplication(); ProcessControllerCommand(closeCommand); if (closeCommand.Cancel == false) { ProjectModel.SaveSettings(); } else { e.Cancel = true; } }
private void Main_FormClosing(object sender, FormClosingEventArgs e) { var closeCommand = new Commands.CloseApplication(); ProcessControllerCommand(closeCommand); if (closeCommand.Cancel == false) { ProjectModel.SaveSettings(); dockPanel.SaveAsXml(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BleckiTreeWriter\\dock.txt"); } else { e.Cancel = true; } }