mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-30 17:24:11 -05:00
More ReSharper suggestions
This commit is contained in:
@@ -15,10 +15,10 @@ namespace FeedCenter.Options
|
||||
{
|
||||
base.LoadPanel(database);
|
||||
|
||||
lockWindowCheckBox.IsChecked = Settings.Default.WindowLocked;
|
||||
displayEmptyFeedsCheckBox.IsChecked = Settings.Default.DisplayEmptyFeeds;
|
||||
toolbarLocationComboBox.SelectedItem = toolbarLocationComboBox.Items.Cast<ComboBoxItem>().First(comboBoxItem => (Dock) comboBoxItem.Tag == Settings.Default.ToolbarLocation);
|
||||
multipleLineDisplayComboBox.SelectedItem = multipleLineDisplayComboBox.Items.Cast<ComboBoxItem>().First(comboBoxItem => (MultipleLineDisplay) comboBoxItem.Tag == Settings.Default.MultipleLineDisplay);
|
||||
LockWindowCheckBox.IsChecked = Settings.Default.WindowLocked;
|
||||
DisplayEmptyFeedsCheckBox.IsChecked = Settings.Default.DisplayEmptyFeeds;
|
||||
ToolbarLocationComboBox.SelectedItem = ToolbarLocationComboBox.Items.Cast<ComboBoxItem>().First(comboBoxItem => (Dock) comboBoxItem.Tag == Settings.Default.ToolbarLocation);
|
||||
MultipleLineDisplayComboBox.SelectedItem = MultipleLineDisplayComboBox.Items.Cast<ComboBoxItem>().First(comboBoxItem => (MultipleLineDisplay) comboBoxItem.Tag == Settings.Default.MultipleLineDisplay);
|
||||
}
|
||||
|
||||
public override bool ValidatePanel()
|
||||
@@ -28,22 +28,19 @@ namespace FeedCenter.Options
|
||||
|
||||
public override void SavePanel()
|
||||
{
|
||||
if (lockWindowCheckBox.IsChecked.HasValue && Settings.Default.WindowLocked != lockWindowCheckBox.IsChecked.Value)
|
||||
Settings.Default.WindowLocked = lockWindowCheckBox.IsChecked.Value;
|
||||
if (LockWindowCheckBox.IsChecked.HasValue && Settings.Default.WindowLocked != LockWindowCheckBox.IsChecked.Value)
|
||||
Settings.Default.WindowLocked = LockWindowCheckBox.IsChecked.Value;
|
||||
|
||||
if (displayEmptyFeedsCheckBox.IsChecked.HasValue && Settings.Default.DisplayEmptyFeeds != displayEmptyFeedsCheckBox.IsChecked.Value)
|
||||
Settings.Default.DisplayEmptyFeeds = displayEmptyFeedsCheckBox.IsChecked.Value;
|
||||
if (DisplayEmptyFeedsCheckBox.IsChecked.HasValue && Settings.Default.DisplayEmptyFeeds != DisplayEmptyFeedsCheckBox.IsChecked.Value)
|
||||
Settings.Default.DisplayEmptyFeeds = DisplayEmptyFeedsCheckBox.IsChecked.Value;
|
||||
|
||||
var dock = (Dock) ((ComboBoxItem) toolbarLocationComboBox.SelectedItem).Tag;
|
||||
var dock = (Dock) ((ComboBoxItem) ToolbarLocationComboBox.SelectedItem).Tag;
|
||||
Settings.Default.ToolbarLocation = dock;
|
||||
|
||||
var multipleLineDisplay = (MultipleLineDisplay) ((ComboBoxItem) multipleLineDisplayComboBox.SelectedItem).Tag;
|
||||
var multipleLineDisplay = (MultipleLineDisplay) ((ComboBoxItem) MultipleLineDisplayComboBox.SelectedItem).Tag;
|
||||
Settings.Default.MultipleLineDisplay = multipleLineDisplay;
|
||||
}
|
||||
|
||||
public override string CategoryName
|
||||
{
|
||||
get { return Properties.Resources.optionCategoryDisplay; }
|
||||
}
|
||||
public override string CategoryName => Properties.Resources.optionCategoryDisplay;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user