private void updateUI(Toggl.TogglSettingsView settings) { #region general this.idleDetectionCheckBox.IsChecked = settings.UseIdleDetection; this.idleDetectionDurationTextBox.Text = settings.IdleMinutes.ToString(); this.enablePomodoroCheckBox.IsChecked = settings.Pomodoro; this.pomodoroTimerDuration.Text = settings.PomodoroMinutes.ToString(); this.recordTimelineCheckBox.IsChecked = settings.RecordTimeline; this.onTopCheckBox.IsChecked = settings.OnTop; this.keepEndTimeFixedCheckbox.IsChecked = Toggl.GetKeepEndTimeFixed(); #endregion #region proxy this.useNoProxyRadioButton.IsChecked = true; this.useSystemProxySettingsCheckBox.IsChecked = settings.AutodetectProxy; this.useProxyCheckBox.IsChecked = settings.UseProxy; this.proxyHostTextBox.Text = settings.ProxyHost; this.proxyPortTextBox.Text = settings.ProxyPort.ToString(); this.proxyUsernameTextBox.Text = settings.ProxyUsername; this.proxyPasswordBox.Password = settings.ProxyPassword; #endregion #region reminder this.remindToTrackCheckBox.IsChecked = settings.Reminder; this.remindToTrackIntervalTextBox.Text = settings.ReminderMinutes.ToString(); this.reminderStartTimeTextBox.Text = settings.RemindStarts; this.reminderEndTimeTextBox.Text = settings.RemindEnds; this.remindOnMondayTextBox.IsChecked = settings.RemindMon; this.remindOnTuesdayTextBox.IsChecked = settings.RemindTue; this.remindOnWednesdayTextBox.IsChecked = settings.RemindWed; this.remindOnThursdayTextBox.IsChecked = settings.RemindThu; this.remindOnFridayTextBox.IsChecked = settings.RemindFri; this.remindOnSaturdayTextBox.IsChecked = settings.RemindSat; this.remindOnSundayTextBox.IsChecked = settings.RemindSun; #endregion #region auto tracker this.enableAutotrackerCheckbox.IsChecked = settings.Autotrack; #endregion #region global shortcuts trySetHotKey( Toggl.GetKeyShow, Toggl.GetKeyModifierShow, this.showHideShortcutRecorder ); trySetHotKey( Toggl.GetKeyStart, Toggl.GetKeyModifierStart, this.continueStopShortcutRecorder ); this.shortcutErrorText.Text = ""; #endregion }