public void ToolsOptions() { using (var dlg = dlgFactory.CreateUserPreferencesDialog()) { uiSvc.ShowModalDialog(dlg); } }
public void ToolsOptions() { using (var dlg = dlgFactory.CreateUserPreferencesDialog()) { if (uiSvc.ShowModalDialog(dlg) == DialogResult.OK) { var uiPrefsSvc = Services.RequireService <IUiPreferencesService>(); uiPrefsSvc.WindowSize = form.Size; uiPrefsSvc.WindowState = form.WindowState; uiPrefsSvc.Save(); } } }