private void RulerForm_Load(object sender, EventArgs e) { // Set some items of the context menu foreach (Enum item in Enum.GetValues(typeof(MeasuringUnit))) { comUnits.Items.Add(item.GetDescription()); } foreach (Enum item in Enum.GetValues(typeof(HypotenuseMode))) { conHypotenuse.DropDownItems.Add( new ToolStripMenuItem(item.GetDescription(), null, conHypotenuse_Click) { Tag = item, Checked = Settings.HypotenuseMode == (HypotenuseMode)item } ); } // Reset the currently selected theme to avoid inconsistencies // caused by manual edits in the settings file. Settings.SelectedTheme = Settings.SelectedTheme; switch (this.Opacity * 100) { case 100: conHigh.Checked = true; break; case 80: conDefault.Checked = true; break; case 60: conLow.Checked = true; break; case 40: conVeryLow.Checked = true; break; } // apply other loaded settings applySettings(); applyCLIOptions(); // Check for updates updateChecker.CheckForUpdates(UpdateNotifyMode.Auto); // Start tracking mouse mouseTracker.Start(); // Set the minimum size this.SetRestrictSize(Settings.SlimMode ? RulerPainter.RULER_WIDTH_SLIM : RulerPainter.RULER_WIDTH_WIDE); }
private void RulerForm_Load(object sender, EventArgs e) { // Set some items of the context menu foreach (Enum item in Enum.GetValues(typeof(MeasuringUnit))) { comUnits.Items.Add(item.GetDescription()); } // Reset the currently selected theme to avoid inconsistencies // caused by manual edits in the settings file. Settings.SelectedTheme = Settings.SelectedTheme; switch (this.Opacity * 100) { case 100: conHigh.Checked = true; break; case 80: conDefault.Checked = true; break; case 60: conLow.Checked = true; break; case 40: conVeryLow.Checked = true; break; } // Set the marker limit CustomMarkers.Limit = Settings.MultiMarking ? int.MaxValue : 1; // Set the minimum size RestrictSize = Settings.SlimMode ? RulerPainter.RULER_WIDTH_SLIM : RulerPainter.RULER_WIDTH_WIDE; // apply other loaded settings applySettings(); // Check for updates updateChecker.CheckForUpdates(); // Start tracking mouse mouseTracker.Start(); }