private void EditorClosing(object sender, FormClosingEventArgs e) { foreach (var doc in DocumentManager.Documents.ToArray()) { if (!PromptForChanges(doc)) { e.Cancel = true; return; } } SidebarManager.SaveLayout(); ViewportManager.SaveLayout(); SettingsManager.SaveSession(DocumentManager.Documents.Select(x => Tuple.Create(x.MapFile, x.Game))); SettingsManager.Write(); }
private void EditorClosing(object sender, FormClosingEventArgs e) { foreach (var doc in DocumentManager.Documents.ToArray()) { if (!PromptForChanges(doc)) { e.Cancel = true; return; } } SidebarManager.SaveLayout(); ViewportManager.SaveLayout(); SettingsManager.SaveSession(DocumentManager.Documents.Select(x => Tuple.Create(x.MapFile, x.Game))); SettingsManager.Write(); if (_updateExecutable != null && File.Exists(_updateExecutable)) { var loc = Path.GetDirectoryName(typeof(Editor).Assembly.Location); Process.Start(_updateExecutable, "/S" + (loc != null ? " /D=" + loc : "")); } }