private void OnFormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; Form.Hide(); settings.Enabled = false; settings.Save(); }
private void SaveSettings() { tracker.UseDefaultPath = trackerUseDefault.Checked; tracker.CustomPath = trackerCustomSavesFolder.Text; tracker.AutoDetectVersion = trackerAutoVersion.Checked; tracker.RefreshInterval = (int)trackerRefreshDelay.Value; tracker.TrySetGameVersion(trackerGameVersion.Text); tracker.Save(); main.ShowBasic = mainShowBasic.Checked; main.RenderFancyCorners = mainFancyCorners.Checked; main.RenderCompletionGlow = mainCompletionGlow.Checked; main.LayoutDebug = mainLayoutDebug.Checked; main.RainbowMode = mainTheme.Text == "Pride Mode"; main.BackColor = ToXNAColor(mainBackColor.BackColor); main.TextColor = ToXNAColor(mainTextColor.BackColor); main.BorderColor = ToXNAColor(mainBorderColor.BackColor); main.Save(); overlay.Enabled = overlayEnabled.Checked; overlay.HideCompleted = overlayHideCompleted.Checked; overlay.OnlyShowFavorites = overlayOnlyShowFavorites.Checked; overlay.ShowLabels = overlayShowText.Checked; overlay.ShowCriteria = overlayShowCriteria.Checked; overlay.ShowCounts = overlayShowCounts.Checked; overlay.ShowOverview = overlayShowOverview.Checked; overlay.Speed = overlaySpeed.Value; overlay.RightToLeft = overlayDirection.SelectedIndex == 0; overlay.Width = (int)overlayWidth.Value; overlay.BackColor = ToXNAColor(overlayBackColor.BackColor); overlay.TextColor = ToXNAColor(overlayTextColor.BackColor); overlay.Save(); notes.Enabled = notesEnabled.Checked; notes.Save(); }