private void SaveUserSettings() { Properties.Settings userSettings = new KeyMapper.Properties.Settings(); userSettings.ShowHelpFormAtStartup = chkShowHelpAtStartup.Checked; userSettings.HelpFormLocation = Location; userSettings.Save(); }
private static void CascadeColourEditorForms() { int i = 0; Point startingPosition = Point.Empty; foreach (ColourEditor ce in editorForms.Values) { if (ce != null) { if (startingPosition.IsEmpty) { startingPosition = GetColourEditorFormStartingPosition(ce); } i++; int offset = SystemInformation.CaptionHeight * (i - 1); ce.Location = new Point(startingPosition.X + offset, startingPosition.Y + offset); ce.BringToFront(); // This means bringing all to the front in turn, so they display in correct order. // (or, at least, with the latest one on top) } } if (i == 0) { // There were no open forms: reset the default position instead. Properties.Settings userSettings = new KeyMapper.Properties.Settings(); userSettings.ColourEditorLocation = Point.Empty; userSettings.Save(); } }
private void arrangeWindowsMenuItemClick(object sender, EventArgs e) { FormsManager.ArrangeAllOpenForms(); // Also, delete the saved position for the Add/Edit mapping form so it's in it's default location // next time it's shown. Properties.Settings userSettings = new KeyMapper.Properties.Settings(); userSettings.EditMappingFormLocation = Point.Empty; userSettings.Save(); }
private static void CascadeColourEditorForms() { int i = 0; Point startingPosition = Point.Empty; foreach (ColourEditor ce in editorForms.Values) { if (ce != null) { if (startingPosition.IsEmpty) startingPosition = GetColourEditorFormStartingPosition(ce); i++; int offset = SystemInformation.CaptionHeight * (i - 1); ce.Location = new Point(startingPosition.X + offset, startingPosition.Y + offset); ce.BringToFront(); // This means bringing all to the front in turn, so they display in correct order. // (or, at least, with the latest one on top) } } if (i == 0) { // There were no open forms: reset the default position instead. Properties.Settings userSettings = new KeyMapper.Properties.Settings(); userSettings.ColourEditorLocation = Point.Empty; userSettings.Save(); } }
private void LoadUserSettings() { Properties.Settings userSettings = new KeyMapper.Properties.Settings(); chkShowHelpAtStartup.Checked = userSettings.ShowHelpFormAtStartup; }