private void UpdateSetting(SettingEnum setting) { switch (setting) { case SettingEnum.HeaderVisibility: HexEdit.HeaderVisibility = !Settings.Default.HeaderVisibility ? Visibility.Collapsed : Visibility.Visible; Settings.Default.HeaderVisibility = HexEdit.HeaderVisibility == Visibility.Visible; break; case SettingEnum.ReadOnly: HexEdit.ReadOnlyMode = Settings.Default.ReadOnly; HexEdit.ClearAllChange(); HexEdit.RefreshView(); break; case SettingEnum.StatusBarVisibility: HexEdit.StatusBarVisibility = !Settings.Default.StatusBarVisibility ? Visibility.Collapsed : Visibility.Visible; Settings.Default.StatusBarVisibility = HexEdit.StatusBarVisibility == Visibility.Visible; break; } }
private void UpdateSetting(SettingEnum setting) { switch (setting) { case SettingEnum.HeaderVisibility: if (!Settings.Default.HeaderVisibility) { HexEdit.HeaderVisibility = Visibility.Collapsed; } else { HexEdit.HeaderVisibility = Visibility.Visible; } Settings.Default.HeaderVisibility = HexEdit.HeaderVisibility == Visibility.Visible; break; case SettingEnum.ReadOnly: HexEdit.ReadOnlyMode = Settings.Default.ReadOnly; HexEdit.ClearAllChange(); HexEdit.RefreshView(); break; } }