public void SetColors(OverlayColorData[] CurrentColors) { List <SharedColorDef> newColors = new List <SharedColorDef>(); foreach (var col in CurrentColors) { SharedColorDef scd = new SharedColorDef(col.name, col.channelCount); List <ColorDef> colorchannels = new List <ColorDef>(); for (int i = 0; i < col.channelCount; i++) { if (col.isDefault(i)) { continue; } Color Mask = col.channelMask[i]; Color Additive = col.channelAdditiveMask[i]; colorchannels.Add(new ColorDef(i, ColorDef.ToUInt(Mask), ColorDef.ToUInt(Additive))); } if (colorchannels.Count > 0) { scd.SetChannels(colorchannels.ToArray()); newColors.Add(scd); } } Colors = newColors.ToArray(); }
private void OnUpdateColor() { var epgSetting = (EpgSetting)grid_basic.DataContext; if (epgSetting != null && initializingColor == false) { epgSetting.TitleColor1 = ((KeyValuePair <string, SolidColorBrush>)comboBox_colorTitle1.SelectedItem).Key; epgSetting.TitleColor2 = ((KeyValuePair <string, SolidColorBrush>)comboBox_colorTitle2.SelectedItem).Key; epgSetting.TitleCustColor1 = ColorDef.ToUInt(((SolidColorBrush)button_colorTitle1.Background).Color); epgSetting.TitleCustColor2 = ColorDef.ToUInt(((SolidColorBrush)button_colorTitle2.Background).Color); } epgSetting = (EpgSetting)grid_color.DataContext; if (epgSetting != null && initializingColor == false) { epgSetting.ContentColorList[0x00] = ((KeyValuePair <string, SolidColorBrush>)comboBox0.SelectedItem).Key; epgSetting.ContentColorList[0x01] = ((KeyValuePair <string, SolidColorBrush>)comboBox1.SelectedItem).Key; epgSetting.ContentColorList[0x02] = ((KeyValuePair <string, SolidColorBrush>)comboBox2.SelectedItem).Key; epgSetting.ContentColorList[0x03] = ((KeyValuePair <string, SolidColorBrush>)comboBox3.SelectedItem).Key; epgSetting.ContentColorList[0x04] = ((KeyValuePair <string, SolidColorBrush>)comboBox4.SelectedItem).Key; epgSetting.ContentColorList[0x05] = ((KeyValuePair <string, SolidColorBrush>)comboBox5.SelectedItem).Key; epgSetting.ContentColorList[0x06] = ((KeyValuePair <string, SolidColorBrush>)comboBox6.SelectedItem).Key; epgSetting.ContentColorList[0x07] = ((KeyValuePair <string, SolidColorBrush>)comboBox7.SelectedItem).Key; epgSetting.ContentColorList[0x08] = ((KeyValuePair <string, SolidColorBrush>)comboBox8.SelectedItem).Key; epgSetting.ContentColorList[0x09] = ((KeyValuePair <string, SolidColorBrush>)comboBox9.SelectedItem).Key; epgSetting.ContentColorList[0x0A] = ((KeyValuePair <string, SolidColorBrush>)comboBox10.SelectedItem).Key; epgSetting.ContentColorList[0x0B] = ((KeyValuePair <string, SolidColorBrush>)comboBox11.SelectedItem).Key; epgSetting.ContentColorList[0x0F] = ((KeyValuePair <string, SolidColorBrush>)comboBox12.SelectedItem).Key; epgSetting.ContentColorList[0x10] = ((KeyValuePair <string, SolidColorBrush>)comboBox13.SelectedItem).Key; epgSetting.ServiceColor = ((KeyValuePair <string, SolidColorBrush>)comboBox_service.SelectedItem).Key; epgSetting.ReserveRectColorNormal = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveNormal.SelectedItem).Key; epgSetting.ReserveRectColorNo = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveNo.SelectedItem).Key; epgSetting.ReserveRectColorNoTuner = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveNoTuner.SelectedItem).Key; epgSetting.ReserveRectColorWarning = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveWarning.SelectedItem).Key; epgSetting.ContentCustColorList[0x00] = ColorDef.ToUInt(((SolidColorBrush)button0.Background).Color); epgSetting.ContentCustColorList[0x01] = ColorDef.ToUInt(((SolidColorBrush)button1.Background).Color); epgSetting.ContentCustColorList[0x02] = ColorDef.ToUInt(((SolidColorBrush)button2.Background).Color); epgSetting.ContentCustColorList[0x03] = ColorDef.ToUInt(((SolidColorBrush)button3.Background).Color); epgSetting.ContentCustColorList[0x04] = ColorDef.ToUInt(((SolidColorBrush)button4.Background).Color); epgSetting.ContentCustColorList[0x05] = ColorDef.ToUInt(((SolidColorBrush)button5.Background).Color); epgSetting.ContentCustColorList[0x06] = ColorDef.ToUInt(((SolidColorBrush)button6.Background).Color); epgSetting.ContentCustColorList[0x07] = ColorDef.ToUInt(((SolidColorBrush)button7.Background).Color); epgSetting.ContentCustColorList[0x08] = ColorDef.ToUInt(((SolidColorBrush)button8.Background).Color); epgSetting.ContentCustColorList[0x09] = ColorDef.ToUInt(((SolidColorBrush)button9.Background).Color); epgSetting.ContentCustColorList[0x0A] = ColorDef.ToUInt(((SolidColorBrush)button10.Background).Color); epgSetting.ContentCustColorList[0x0B] = ColorDef.ToUInt(((SolidColorBrush)button11.Background).Color); epgSetting.ContentCustColorList[0x0F] = ColorDef.ToUInt(((SolidColorBrush)button12.Background).Color); epgSetting.ContentCustColorList[0x10] = ColorDef.ToUInt(((SolidColorBrush)button13.Background).Color); epgSetting.ServiceCustColor = ColorDef.ToUInt(((SolidColorBrush)button_service.Background).Color); epgSetting.EpgBackColorA = ((SolidColorBrush)button_epgBack.Background).Color.A; epgSetting.EpgBackColorR = ((SolidColorBrush)button_epgBack.Background).Color.R; epgSetting.EpgBackColorG = ((SolidColorBrush)button_epgBack.Background).Color.G; epgSetting.EpgBackColorB = ((SolidColorBrush)button_epgBack.Background).Color.B; epgSetting.ContentCustColorList[0x11] = ColorDef.ToUInt(((SolidColorBrush)button14.Background).Color); epgSetting.ContentCustColorList[0x12] = ColorDef.ToUInt(((SolidColorBrush)button15.Background).Color); epgSetting.ContentCustColorList[0x13] = ColorDef.ToUInt(((SolidColorBrush)button16.Background).Color); epgSetting.ContentCustColorList[0x14] = ColorDef.ToUInt(((SolidColorBrush)button17.Background).Color); } }
private void OnUpdateColor() { var settings = (Settings)DataContext; if (settings != null && initializingColor == false) { settings.ContentColorList[0x00] = ((KeyValuePair <string, SolidColorBrush>)comboBox0.SelectedItem).Key; settings.ContentColorList[0x01] = ((KeyValuePair <string, SolidColorBrush>)comboBox1.SelectedItem).Key; settings.ContentColorList[0x02] = ((KeyValuePair <string, SolidColorBrush>)comboBox2.SelectedItem).Key; settings.ContentColorList[0x03] = ((KeyValuePair <string, SolidColorBrush>)comboBox3.SelectedItem).Key; settings.ContentColorList[0x04] = ((KeyValuePair <string, SolidColorBrush>)comboBox4.SelectedItem).Key; settings.ContentColorList[0x05] = ((KeyValuePair <string, SolidColorBrush>)comboBox5.SelectedItem).Key; settings.ContentColorList[0x06] = ((KeyValuePair <string, SolidColorBrush>)comboBox6.SelectedItem).Key; settings.ContentColorList[0x07] = ((KeyValuePair <string, SolidColorBrush>)comboBox7.SelectedItem).Key; settings.ContentColorList[0x08] = ((KeyValuePair <string, SolidColorBrush>)comboBox8.SelectedItem).Key; settings.ContentColorList[0x09] = ((KeyValuePair <string, SolidColorBrush>)comboBox9.SelectedItem).Key; settings.ContentColorList[0x0A] = ((KeyValuePair <string, SolidColorBrush>)comboBox10.SelectedItem).Key; settings.ContentColorList[0x0B] = ((KeyValuePair <string, SolidColorBrush>)comboBox11.SelectedItem).Key; settings.ContentColorList[0x0F] = ((KeyValuePair <string, SolidColorBrush>)comboBox12.SelectedItem).Key; settings.ContentColorList[0x10] = ((KeyValuePair <string, SolidColorBrush>)comboBox13.SelectedItem).Key; settings.ReserveRectColorNormal = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveNormal.SelectedItem).Key; settings.ReserveRectColorNo = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveNo.SelectedItem).Key; settings.ReserveRectColorNoTuner = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveNoTuner.SelectedItem).Key; settings.ReserveRectColorWarning = ((KeyValuePair <string, SolidColorBrush>)comboBox_reserveWarning.SelectedItem).Key; settings.TitleColor1 = ((KeyValuePair <string, SolidColorBrush>)comboBox_colorTitle1.SelectedItem).Key; settings.TitleColor2 = ((KeyValuePair <string, SolidColorBrush>)comboBox_colorTitle2.SelectedItem).Key; settings.ContentCustColorList[0x00] = ColorDef.ToUInt(((SolidColorBrush)button0.Background).Color); settings.ContentCustColorList[0x01] = ColorDef.ToUInt(((SolidColorBrush)button1.Background).Color); settings.ContentCustColorList[0x02] = ColorDef.ToUInt(((SolidColorBrush)button2.Background).Color); settings.ContentCustColorList[0x03] = ColorDef.ToUInt(((SolidColorBrush)button3.Background).Color); settings.ContentCustColorList[0x04] = ColorDef.ToUInt(((SolidColorBrush)button4.Background).Color); settings.ContentCustColorList[0x05] = ColorDef.ToUInt(((SolidColorBrush)button5.Background).Color); settings.ContentCustColorList[0x06] = ColorDef.ToUInt(((SolidColorBrush)button6.Background).Color); settings.ContentCustColorList[0x07] = ColorDef.ToUInt(((SolidColorBrush)button7.Background).Color); settings.ContentCustColorList[0x08] = ColorDef.ToUInt(((SolidColorBrush)button8.Background).Color); settings.ContentCustColorList[0x09] = ColorDef.ToUInt(((SolidColorBrush)button9.Background).Color); settings.ContentCustColorList[0x0A] = ColorDef.ToUInt(((SolidColorBrush)button10.Background).Color); settings.ContentCustColorList[0x0B] = ColorDef.ToUInt(((SolidColorBrush)button11.Background).Color); settings.ContentCustColorList[0x0F] = ColorDef.ToUInt(((SolidColorBrush)button12.Background).Color); settings.ContentCustColorList[0x10] = ColorDef.ToUInt(((SolidColorBrush)button13.Background).Color); settings.ContentCustColorList[0x11] = ColorDef.ToUInt(((SolidColorBrush)button14.Background).Color); settings.ContentCustColorList[0x12] = ColorDef.ToUInt(((SolidColorBrush)button15.Background).Color); settings.ContentCustColorList[0x13] = ColorDef.ToUInt(((SolidColorBrush)button16.Background).Color); settings.ContentCustColorList[0x14] = ColorDef.ToUInt(((SolidColorBrush)button17.Background).Color); settings.TitleCustColor1 = ColorDef.ToUInt(((SolidColorBrush)button_colorTitle1.Background).Color); settings.TitleCustColor2 = ColorDef.ToUInt(((SolidColorBrush)button_colorTitle2.Background).Color); } }
public virtual object ConvertBack(object v, Type t, object p, System.Globalization.CultureInfo c) { return(ColorDef.ToUInt((v as SolidColorBrush).Color)); }
public void SaveSetting() { try { Settings.Instance.ScrollSize = MenuUtil.MyToNumerical(textBox_mouse_scroll, Convert.ToDouble, 240); Settings.Instance.ServiceWidth = MenuUtil.MyToNumerical(textBox_service_width, Convert.ToDouble, double.MaxValue, 16, 16);//小さいと描画で落ちる Settings.Instance.MinHeight = MenuUtil.MyToNumerical(textBox_minHeight, Convert.ToDouble, double.MaxValue, 0.1, 2); Settings.Instance.MinimumHeight = MenuUtil.MyToNumerical(textBox_minimumHeight, Convert.ToDouble, double.MaxValue, 0, 0); Settings.Instance.DragScroll = MenuUtil.MyToNumerical(textBox_dragScroll, Convert.ToDouble, 1.5); Settings.Instance.EpgTitleIndent = (checkBox_title_indent.IsChecked == true); Settings.Instance.EpgPopup = (checkBox_epg_popup.IsChecked == true); Settings.Instance.EpgPopupResOnly = (checkBox_epg_popup_resOnly.IsChecked == true); Settings.Instance.EpgGradation = (checkBox_gradation.IsChecked == true); Settings.Instance.EpgGradationHeader = (checkBox_gradationHeader.IsChecked == true); Settings.Instance.EpgInfoSingleClick = (checkBox_singleOpen.IsChecked == true); Settings.Instance.EpgInfoOpenMode = (byte)(checkBox_openInfo.IsChecked == true ? 1 : 0); Settings.Instance.MouseScrollAuto = (checkBox_scrollAuto.IsChecked == true); Settings.Instance.DisplayNotifyEpgChange = (checkBox_displayNotifyChange.IsChecked == true); Settings.Instance.ReserveRectBackground = (checkBox_reserveBackground.IsChecked == true); Settings.Instance.TunerScrollSize = MenuUtil.MyToNumerical(textBox_tuner_mouse_scroll, Convert.ToDouble, 240); Settings.Instance.TunerWidth = MenuUtil.MyToNumerical(textBox_tuner_width, Convert.ToDouble, double.MaxValue, 16, 150);//小さいと描画で落ちる Settings.Instance.TunerMinHeight = MenuUtil.MyToNumerical(textBox_tuner_minHeight, Convert.ToDouble, double.MaxValue, 0.1, 2); Settings.Instance.TunerMinimumLine = MenuUtil.MyToNumerical(textBox_tunerMinLineHeight, Convert.ToDouble, double.MaxValue, 0, 0); Settings.Instance.TunerDragScroll = MenuUtil.MyToNumerical(textBox_tunerDdragScroll, Convert.ToDouble, 1.5); Settings.Instance.TunerMouseScrollAuto = (checkBox_tuner_scrollAuto.IsChecked == true); Settings.Instance.TunerServiceNoWrap = (checkBox_tuner_service_nowrap.IsChecked == true); Settings.Instance.TunerTitleIndent = (checkBox_tuner_title_indent.IsChecked == true); Settings.Instance.TunerPopup = (checkBox_tuner_popup.IsChecked == true); Settings.Instance.TunerPopupRecinfo = (checkBox_tuner_popup_recInfo.IsChecked == true); Settings.Instance.TunerInfoSingleClick = (checkBox_tunerSingleOpen.IsChecked == true); Settings.Instance.TunerColorModeUse = (checkBox_tunerColorModeUse.IsChecked == true); Settings.Instance.TunerDisplayOffReserve = (checkBox_tuner_display_offres.IsChecked == true); if (comboBox_font.SelectedItem != null) { Settings.Instance.FontName = comboBox_font.SelectedItem as string; } Settings.Instance.FontSize = MenuUtil.MyToNumerical(textBox_fontSize, Convert.ToDouble, 72, 1, 12); if (comboBox_fontTitle.SelectedItem != null) { Settings.Instance.FontNameTitle = comboBox_fontTitle.SelectedItem as string; } Settings.Instance.FontSizeTitle = MenuUtil.MyToNumerical(textBox_fontSizeTitle, Convert.ToDouble, 72, 1, 12); Settings.Instance.FontBoldTitle = (checkBox_fontBoldTitle.IsChecked == true); #if false Settings.Instance.UseCustomEpgView = (radioButton_1_cust.IsChecked == true); Settings.Instance.CustomEpgTabList.Clear(); foreach (CustomEpgTabInfo info in listBox_tab.Items) { Settings.Instance.CustomEpgTabList.Add(info); } if (CommonManager.Instance.NWMode == false) { string iniValue = ""; iniValue = (radioButton_1_cust.IsChecked == true ? "1" : "0"); IniFileHandler.WritePrivateProfileString("HTTP", "HttpCustEpg", iniValue, SettingPath.TimerSrvIniPath); int custCount = listBox_tab.Items.Count; IniFileHandler.WritePrivateProfileString("HTTP", "HttpCustCount", custCount.ToString(), SettingPath.TimerSrvIniPath); custCount = 0; foreach (CustomEpgTabInfo info in listBox_tab.Items) { IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "Name", info.TabName, SettingPath.TimerSrvIniPath); IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "ViewServiceCount", info.ViewServiceList.Count.ToString(), SettingPath.TimerSrvIniPath); int serviceCount = 0; foreach (Int64 id in info.ViewServiceList) { IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "ViewService" + serviceCount.ToString(), id.ToString(), SettingPath.TimerSrvIniPath); serviceCount++; } IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "ContentCount", info.ViewContentKindList.Count.ToString(), SettingPath.TimerSrvIniPath); int contentCount = 0; foreach (UInt16 id in info.ViewContentKindList) { IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "Content" + contentCount.ToString(), id.ToString(), SettingPath.TimerSrvIniPath); contentCount++; } IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "ViewMode", info.ViewMode.ToString(), SettingPath.TimerSrvIniPath); iniValue = (info.NeedTimeOnlyBasic == true ? "1" : "0"); IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "NeedTimeOnlyBasic", iniValue, SettingPath.TimerSrvIniPath); iniValue = (info.NeedTimeOnlyWeek == true ? "1" : "0"); IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "NeedTimeOnlyWeek", iniValue, SettingPath.TimerSrvIniPath); iniValue = (info.SearchMode == true ? "1" : "0"); IniFileHandler.WritePrivateProfileString("HTTP_CUST" + custCount.ToString(), "SearchMode", iniValue, SettingPath.TimerSrvIniPath); custCount++; } } Settings.Instance.ContentCustColorList = custColorList.Select(c => ColorDef.ToUInt(c)).ToList(); Settings.Instance.TitleCustColor1 = ColorDef.ToUInt(custTitleColorList[0]); Settings.Instance.TitleCustColor2 = ColorDef.ToUInt(custTitleColorList[1]); #endif if (comboBox_fontTuner.SelectedItem != null) { Settings.Instance.TunerFontName = comboBox_fontTuner.SelectedItem as string; } Settings.Instance.TunerFontSize = MenuUtil.MyToNumerical(textBox_fontTunerSize, Convert.ToDouble, 72, 1, 12); if (comboBox_fontTunerService.SelectedItem != null) { Settings.Instance.TunerFontNameService = comboBox_fontTunerService.SelectedItem as string; } Settings.Instance.TunerFontSizeService = MenuUtil.MyToNumerical(textBox_fontTunerSizeService, Convert.ToDouble, 72, 1, 12); Settings.Instance.TunerFontBoldService = (checkBox_fontTunerBoldService.IsChecked == true); Settings.Instance.UseCustomEpgView = (radioButton_1_cust.IsChecked == true); Settings.Instance.CustomEpgTabList = listBox_tab.Items.OfType <CustomEpgTabInfo>().ToList(); Settings.SetCustomEpgTabInfoID(); var getComboColor1 = new Func <ComboBox, string>((cmb) => ((ColorReferenceViewItem)(cmb.SelectedItem)).ColorName); var getButtonColor1 = new Func <Button, uint>((btn) => ColorDef.ToUInt((btn.Background as SolidColorBrush).Color)); var getColors = new Action <UIElement, List <string>, List <uint> >((ui, stockColors, custColors) => { List <UIElement> uiList = new List <UIElement>(); uiList.Add(ui); for (int n = 0; n < uiList.Count; n++) { foreach (var child in LogicalTreeHelper.GetChildren(uiList[n])) { if (child is Control) { int index = int.Parse((string)(child as Control).Tag ?? "-1"); if (index >= 0) { if (child is ComboBox && index < stockColors.Count) { stockColors[index] = getComboColor1(child as ComboBox); } else if (child is Button && index < custColors.Count) { custColors[index] = getButtonColor1(child as Button); } } } else if (child is UIElement) { uiList.Add(child as UIElement); } } } }); // [番組表] - [基本] Settings.Instance.TitleColor1 = getComboColor1(comboBox_colorTitle1); Settings.Instance.TitleCustColor1 = getButtonColor1(button_colorTitle1); Settings.Instance.TitleColor2 = getComboColor1(comboBox_colorTitle2); Settings.Instance.TitleCustColor2 = getButtonColor1(button_colorTitle2); // [番組表] - [色1] getColors(groupEpgColors, Settings.Instance.ContentColorList, Settings.Instance.ContentCustColorList); Settings.Instance.ReserveRectColorNormal = getComboColor1(comboBox_reserveNormal); Settings.Instance.ReserveRectColorNo = getComboColor1(comboBox_reserveNo); Settings.Instance.ReserveRectColorNoTuner = getComboColor1(comboBox_reserveNoTuner); Settings.Instance.ReserveRectColorWarning = getComboColor1(comboBox_reserveWarning); Settings.Instance.ReserveRectColorAutoAddMissing = getComboColor1(comboBox_reserveAutoAddMissing); getColors(groupEpgColorsReserve, null, Settings.Instance.ContentCustColorList); // [番組表] - [色2] getColors(groupEpgTimeColors, Settings.Instance.EpgEtcColors, Settings.Instance.EpgEtcCustColors); getColors(groupEpgEtcColors, Settings.Instance.EpgEtcColors, Settings.Instance.EpgEtcCustColors); // [使用予定チューナー] - [基本] getColors(groupTunerFontColor, Settings.Instance.TunerServiceColors, Settings.Instance.TunerServiceCustColors); // [使用予定チューナー] - [色] getColors(groupTunerColors, Settings.Instance.TunerServiceColors, Settings.Instance.TunerServiceCustColors); // [録画済み一覧] Settings.Instance.PlayDClick = (checkBox_playDClick.IsChecked == true); Settings.Instance.RecInfoNoYear = (checkBox_recNoYear.IsChecked == true); Settings.Instance.RecInfoNoSecond = (checkBox_recNoSecond.IsChecked == true); Settings.Instance.RecInfoNoDurSecond = (checkBox_recNoDurSecond.IsChecked == true); Settings.Instance.RecInfoExtraDataCache = (checkBox_ChacheOn.IsChecked == true); Settings.Instance.RecInfoExtraDataCacheOptimize = (checkBox_CacheOptimize.IsChecked == true); if (checkBox_CacheKeepConnect.IsEnabled) { Settings.Instance.RecInfoExtraDataCacheKeepConnect = (checkBox_CacheKeepConnect.IsChecked == true); } Settings.Instance.RecInfoDropErrIgnore = MenuUtil.MyToNumerical(textBox_dropErrIgnore, Convert.ToInt64, Settings.Instance.RecInfoDropErrIgnore); Settings.Instance.RecInfoDropWrnIgnore = MenuUtil.MyToNumerical(textBox_dropWrnIgnore, Convert.ToInt64, Settings.Instance.RecInfoDropWrnIgnore); Settings.Instance.RecInfoScrambleIgnore = MenuUtil.MyToNumerical(textBox_scrambleIgnore, Convert.ToInt64, Settings.Instance.RecInfoScrambleIgnore); Settings.Instance.RecinfoErrCriticalDrops = (checkBox_recinfo_errCritical.IsChecked == true); getColors(groupRecInfoBackColors, Settings.Instance.RecEndColors, Settings.Instance.RecEndCustColors); // [予約一覧・共通] - [基本] Settings.Instance.MenuSet = this.ctxmSetInfo.Clone(); Settings.Instance.DisplayReserveAutoAddMissing = (checkBox_displayAutoAddMissing.IsChecked != false); Settings.Instance.DisplayNotifyJumpTime = MenuUtil.MyToNumerical(textBox_DisplayJumpTime, Convert.ToDouble, Double.MaxValue, 0, 3); Settings.Instance.ResInfoNoYear = (checkBox_resNoYear.IsChecked == true); Settings.Instance.ResInfoNoSecond = (checkBox_resNoSecond.IsChecked == true); Settings.Instance.ResInfoNoDurSecond = (checkBox_resNoDurSecond.IsChecked == true); Settings.Instance.LaterTimeUse = (checkBox_LaterTimeUse.IsChecked == true); Settings.Instance.LaterTimeHour = MenuUtil.MyToNumerical(textBox_LaterTimeHour, Convert.ToInt32, 36, 24, 28) - 24; Settings.Instance.DisplayPresetOnSearch = (checkBox_displayPresetOnSearch.IsChecked == true); Settings.Instance.RecItemToolTip = (checkBox_nekopandaToolTip.IsChecked == true); Settings.Instance.NoStyle = (checkBox_NotNoStyle.IsChecked == true ? 0 : 1); if (Settings.Instance.NoStyle == 0) { Settings.Instance.StyleXamlPath = (comboBox_Style.SelectedItem as ComboBoxItem).Tag as string; } Settings.Instance.DisplayStatus = (checkBox_displayStatus.IsChecked == true); Settings.Instance.DisplayStatusNotify = (checkBox_displayStatusNotify.IsChecked == true); Settings.Instance.IsVisibleReserveView = (checkBox_IsVisibleReserveView.IsChecked == true); Settings.Instance.IsVisibleRecInfoView = (checkBox_IsVisibleRecInfoView.IsChecked == true); Settings.Instance.IsVisibleAutoAddView = (checkBox_IsVisibleAutoAddView.IsChecked == true); Settings.Instance.IsVisibleAutoAddViewMoveOnly = (checkBox_IsVisibleAutoAddViewMoveOnly.IsChecked == true); CtxmCode?code = wrapPanel_StartTab.Children.OfType <RadioButton>() .Where(btn => btn.IsChecked == true).Select(btn => btn.Tag as CtxmCode?).FirstOrDefault(); if (code != null) { Settings.Instance.StartTab = (CtxmCode)code; } Dock?dock = wrapPanel_MainViewButtonsDock.Children.OfType <RadioButton>() .Where(btn => btn.IsChecked == true).Select(btn => btn.Tag as Dock?).FirstOrDefault(); if (dock != null) { Settings.Instance.MainViewButtonsDock = (Dock)dock; } // [予約一覧・共通] - [色] Settings.Instance.ListDefColor = getComboColor1(cmb_ListDefFontColor); Settings.Instance.ListDefCustColor = getButtonColor1(btn_ListDefFontColor); getColors(groupReserveRecModeColors, Settings.Instance.RecModeFontColors, Settings.Instance.RecModeFontCustColors); getColors(groupReserveBackColors, Settings.Instance.ResBackColors, Settings.Instance.ResBackCustColors); getColors(groupStatColors, Settings.Instance.StatColors, Settings.Instance.StatCustColors); // [予約簡易表示] Settings.Instance.InfoWindowRefreshInterval = MenuUtil.MyToNumerical(textBox_iw_refresh_interval, Convert.ToInt32, 60, 1, 10); Settings.Instance.InfoWindowBasedOnBroadcast = (radioButton_iw_based_on_bcst.IsChecked == true); string level = (string)new RadioButton[] { radioButton_Level1, radioButton_Level2, radioButton_Level3, radioButton_All, radioButton_TopN }.Where(x => x.IsChecked == true).Select(x => x.Tag).FirstOrDefault(); Settings.Instance.InfoWindowItemFilterLevel = level != null?int.Parse(level) : int.MaxValue; string progbar = (string)new RadioButton[] { radioButton_ProgressBarOff, radioButton_ProgressBarType1, radioButton_ProgressBarType2, }.Where(x => x.IsChecked == true).Select(x => x.Tag).FirstOrDefault(); Settings.Instance.InfoWindowItemProgressBarType = progbar != null?int.Parse(progbar) : 0; getColors(groupInfoWinItemProgressBarColors, Settings.Instance.InfoWindowItemProgressBarColors, Settings.Instance.InfoWindowItemProgressBarCustColors); Settings.Instance.InfoWindowItemProgressBarTransparent = checkBox_bgTransparent.IsChecked == true; Settings.Instance.InfoWindowItemTopN = MenuUtil.MyToNumerical(textBox_TopN, Convert.ToInt32, 10); Settings.Instance.InfoWindowItemLevel1Seconds = MenuUtil.MyToNumerical(textBox_iw_item_level1, Convert.ToInt32, 0) * 60; Settings.Instance.InfoWindowItemLevel2Seconds = MenuUtil.MyToNumerical(textBox_iw_item_level2, Convert.ToInt32, 15) * 60; Settings.Instance.InfoWindowItemLevel3Seconds = MenuUtil.MyToNumerical(textBox_iw_item_level3, Convert.ToInt32, 480) * 60; getColors(groupInfoWinItemBgColors, Settings.Instance.InfoWindowItemBgColors, Settings.Instance.InfoWindowItemBgCustColors); } catch (Exception ex) { MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); } }