Exemple #1
0
        public void LoadSetting()
        {
            checkBox_FontBoldReplacePattern_Click(null, null);
            checkBox_ReplacePatternEditFontShare_Click(null, null);
            checkbox_EpgChangeBorderWatch_Click(null, null);
            checkbox_TunerChangeBorderWatch_Click(null, null);

            //番組表
            epgPopupRadioBtns = new RadioBtnSelect(panel_epgPopup, settings.EpgPopupMode);

            int    epgArcHour = IniFileHandler.GetPrivateProfileInt("SET", "EpgArchivePeriodHour", 0, SettingPath.TimerSrvIniPath);
            double epgArcDay  = IniFileHandler.GetPrivateProfileDouble("SET", "EpgArchivePeriodDay", 0, SettingPath.TimerSrvIniPath);

            epgArcDay = (int)(epgArcDay * 24) == epgArcHour ? epgArcDay : epgArcHour / 24d;
            textBox_epgArchivePeriod.Text = Math.Min(Math.Max(epgArcDay, 0), 14).ToString();

            listBox_tab.Items.Clear();
            listBox_tab.Items.AddItems(settings.CustomEpgTabList.Select(info => new CustomEpgTabInfoView(info)));
            listBox_tab.SelectedIndex = 0;

            //チューナー画面
            tunerPopupRadioBtns   = new RadioBtnSelect(panel_tunerPopup, settings.TunerPopupMode);
            tunerToolTipRadioBtns = new RadioBtnSelect(panel_tunerTooltip, settings.TunerToolTipMode);

            //録画済み一覧画面
            textBox_RecInfoDropExcept.Text = string.Join(", ", settings.RecInfoDropExcept);

            //予約一覧・共通画面
            textBox_LaterTimeHour.Text       = (settings.LaterTimeHour + 24).ToString();
            checkBox_picUpCustom.DataContext = settings.PicUpTitleWork;
        }
Exemple #2
0
        public void LoadSetting()
        {
            checkBox_FontBoldReplacePattern_Click(null, null);
            checkBox_ReplacePatternEditFontShare_Click(null, null);
            checkbox_EpgChangeBorderWatch_Click(null, null);
            checkbox_TunerChangeBorderWatch_Click(null, null);

            //番組表
            epgPopupRadioBtns = new RadioBtnSelect(panel_epgPopup, settings.EpgPopupMode);

            int    epgArcHour = IniFileHandler.GetPrivateProfileInt("SET", "EpgArchivePeriodHour", 0, SettingPath.TimerSrvIniPath);
            double epgArcDay  = IniFileHandler.GetPrivateProfileDouble("SET", "EpgArchivePeriodDay", 0, SettingPath.TimerSrvIniPath);

            epgArcDay = (int)(epgArcDay * 24) == epgArcHour ? epgArcDay : epgArcHour / 24d;
            textBox_epgArchivePeriod.Text = Math.Min(Math.Max(epgArcDay, 0), 14).ToString();

            listBox_tab.Items.Clear();
            listBox_tab.Items.AddItems(settings.CustomEpgTabList.Select(info => new CustomEpgTabInfoView(info)));
            listBox_tab.SelectedIndex = 0;

            //チューナー画面
            tunerPopupRadioBtns   = new RadioBtnSelect(panel_tunerPopup, settings.TunerPopupMode);
            tunerToolTipRadioBtns = new RadioBtnSelect(panel_tunerTooltip, settings.TunerToolTipMode);

            //録画済み一覧画面
            textBox_RecInfoDropExcept.Text = string.Join(", ", settings.RecInfoDropExcept);

            //予約一覧・共通画面
            textBox_LaterTimeHour.Text       = (settings.LaterTimeHour + 24).ToString();
            checkBox_picUpCustom.DataContext = settings.PicUpTitleWork;

            wrapPanel_StartTab.Children.Clear();
            foreach (var item in new Dictionary <CtxmCode, string> {
                { CtxmCode.ReserveView, "予約一覧" }, { CtxmCode.TunerReserveView, "使用予定チューナー" },
                { CtxmCode.RecInfoView, "録画済み一覧" }, { CtxmCode.EpgAutoAddView, "キーワード予約登録" },
                { CtxmCode.ManualAutoAddView, "プログラム予約登録" }, { CtxmCode.EpgView, "番組表" }
            })
            {
                var rbtn = new RadioButton {
                    Tag = item.Key, Content = item.Value, IsChecked = item.Key == settings.StartTab
                };
                rbtn.Checked += (sender, e) => settings.StartTab = (CtxmCode)(sender as RadioButton).Tag;
                wrapPanel_StartTab.Children.Add(rbtn);
            }
            wrapPanel_MainViewButtonsDock.Children.Clear();
            foreach (var item in new Dictionary <Dock, string> {
                { Dock.Bottom, "下" }, { Dock.Top, "上" }, { Dock.Left, "左" }, { Dock.Right, "右" }
            })
            {
                var rbtn = new RadioButton {
                    Tag = item.Key, Content = item.Value, IsChecked = item.Key == settings.MainViewButtonsDock
                };
                rbtn.Checked += (sender, e) => settings.MainViewButtonsDock = (Dock)(sender as RadioButton).Tag;
                wrapPanel_MainViewButtonsDock.Children.Add(rbtn);
            }
        }
Exemple #3
0
        public void LoadSetting()
        {
            //0 全般
            int residentMode = IniFileHandler.GetPrivateProfileInt("SET", "ResidentMode", 2, SettingPath.TimerSrvIniPath);

            checkBox_srvResident.IsChecked    = residentMode >= 1;
            checkBox_srvShowTray.IsChecked    = residentMode >= 2;
            checkBox_NotifyTipStyle.IsChecked = IniFileHandler.GetPrivateProfileBool("SET", "NotifyTipStyle", false, SettingPath.TimerSrvIniPath);
            checkBox_blinkPreRec.IsChecked    = IniFileHandler.GetPrivateProfileBool("SET", "BlinkPreRec", false, SettingPath.TimerSrvIniPath);
            int NoBalloonTip = IniFileHandler.GetPrivateProfileInt("SET", "NoBalloonTip", 0, SettingPath.TimerSrvIniPath);

            checkBox_srvBalloonTip.IsChecked         = NoBalloonTip != 1;
            checkBox_srvBalloonTipRealtime.IsChecked = NoBalloonTip == 2;

            checkBox_srvSaveNotifyLog.IsChecked = IniFileHandler.GetPrivateProfileBool("SET", "SaveNotifyLog", false, SettingPath.TimerSrvIniPath);
            checkBox_srvSaveDebugLog.IsChecked  = IniFileHandler.GetPrivateProfileBool("SET", "SaveDebugLog", false, SettingPath.TimerSrvIniPath);
            textBox_tsExt.Text = SettingPath.CheckTSExtension(IniFileHandler.GetPrivateProfileString("SET", "TSExt", ".ts", SettingPath.TimerSrvIniPath));

            //1 録画動作
            textBox_pcWakeTime.Text = IniFileHandler.GetPrivateProfileInt("SET", "WakeTime", 5, SettingPath.TimerSrvIniPath).ToString();

            listBox_process.Items.Clear();
            int ngCount = IniFileHandler.GetPrivateProfileInt("NO_SUSPEND", "Count", int.MaxValue, SettingPath.TimerSrvIniPath);

            if (ngCount == int.MaxValue)
            {
                listBox_process.Items.Add("EpgDataCap_Bon");
            }
            else
            {
                for (int i = 0; i < ngCount; i++)
                {
                    listBox_process.Items.Add(IniFileHandler.GetPrivateProfileString("NO_SUSPEND", i.ToString(), "", SettingPath.TimerSrvIniPath));
                }
            }
            textBox_ng_min.Text                 = IniFileHandler.GetPrivateProfileString("NO_SUSPEND", "NoStandbyTime", "10", SettingPath.TimerSrvIniPath);
            checkBox_ng_usePC.IsChecked         = IniFileHandler.GetPrivateProfileBool("NO_SUSPEND", "NoUsePC", false, SettingPath.TimerSrvIniPath);
            textBox_ng_usePC_min.Text           = IniFileHandler.GetPrivateProfileString("NO_SUSPEND", "NoUsePCTime", "3", SettingPath.TimerSrvIniPath);
            checkBox_ng_fileStreaming.IsChecked = IniFileHandler.GetPrivateProfileBool("NO_SUSPEND", "NoFileStreaming", false, SettingPath.TimerSrvIniPath);
            checkBox_ng_shareFile.IsChecked     = IniFileHandler.GetPrivateProfileBool("NO_SUSPEND", "NoShareFile", false, SettingPath.TimerSrvIniPath);

            checkBox_appMin.IsChecked          = IniFileHandler.GetPrivateProfileBool("SET", "RecMinWake", true, SettingPath.TimerSrvIniPath);
            checkBox_appView.IsChecked         = IniFileHandler.GetPrivateProfileBool("SET", "RecView", true, SettingPath.TimerSrvIniPath);
            checkBox_appDrop.IsChecked         = IniFileHandler.GetPrivateProfileBool("SET", "DropLog", true, SettingPath.TimerSrvIniPath);
            checkBox_addPgInfo.IsChecked       = IniFileHandler.GetPrivateProfileBool("SET", "PgInfoLog", true, SettingPath.TimerSrvIniPath);
            checkBox_PgInfoLogAsUtf8.IsChecked = IniFileHandler.GetPrivateProfileBool("SET", "PgInfoLogAsUtf8", false, SettingPath.TimerSrvIniPath);
            checkBox_appNW.IsChecked           = IniFileHandler.GetPrivateProfileBool("SET", "RecNW", false, SettingPath.TimerSrvIniPath);
            checkBox_appKeepDisk.IsChecked     = IniFileHandler.GetPrivateProfileBool("SET", "KeepDisk", true, SettingPath.TimerSrvIniPath);
            checkBox_appOverWrite.IsChecked    = IniFileHandler.GetPrivateProfileBool("SET", "RecOverWrite", false, SettingPath.TimerSrvIniPath);
            comboBox_process.SelectedIndex     = IniFileHandler.GetPrivateProfileInt("SET", "ProcessPriority", 3, SettingPath.TimerSrvIniPath);

            //2 予約管理情報
            checkBox_back_priority.IsChecked      = IniFileHandler.GetPrivateProfileBool("SET", "BackPriority", true, SettingPath.TimerSrvIniPath);
            checkBox_fixedTunerPriority.IsChecked = IniFileHandler.GetPrivateProfileBool("SET", "FixedTunerPriority", true, SettingPath.TimerSrvIniPath);
            text_RecInfo2RegExp.Text                 = IniFileHandler.GetPrivateProfileString("SET", "RecInfo2RegExp", "", SettingPath.TimerSrvIniPath);
            checkBox_RetryOtherTuners.IsChecked      = IniFileHandler.GetPrivateProfileBool("SET", "RetryOtherTuners", false, SettingPath.TimerSrvIniPath);
            checkBox_CommentAutoAdd.IsChecked        = IniFileHandler.GetPrivateProfileBool("SET", "CommentAutoAdd", false, SettingPath.TimerSrvIniPath);
            checkBox_FixNoRecToServiceOnly.IsChecked = IniFileHandler.GetPrivateProfileBool("SET", "FixNoRecToServiceOnly", false, SettingPath.TimerSrvIniPath);
            checkBox_recInfoFolderOnly.IsChecked     = IniFileHandler.GetPrivateProfileBool("SET", "RecInfoFolderOnly", true, SettingPath.TimerSrvIniPath);
            checkBox_autoDelRecInfo.IsChecked        = IniFileHandler.GetPrivateProfileBool("SET", "AutoDelRecInfo", false, SettingPath.TimerSrvIniPath);
            textBox_autoDelRecInfo.Text              = IniFileHandler.GetPrivateProfileInt("SET", "AutoDelRecInfoNum", 100, SettingPath.TimerSrvIniPath).ToString();
            checkBox_recInfoDelFile.IsChecked        = IniFileHandler.GetPrivateProfileBool("SET", "RecInfoDelFile", false, SettingPath.CommonIniPath);
            checkBox_applyExtTo.IsChecked            = IniFileHandler.GetPrivateProfileBool("SET", "ApplyExtToRecInfoDel", false, SettingPath.TimerSrvIniPath);
            checkBox_autoDel.IsChecked               = IniFileHandler.GetPrivateProfileBool("SET", "AutoDel", false, SettingPath.TimerSrvIniPath);

            listBox_ext.Items.Clear();
            int count;

            count = IniFileHandler.GetPrivateProfileInt("DEL_EXT", "Count", int.MaxValue, SettingPath.TimerSrvIniPath);
            if (count == int.MaxValue)
            {
                button_ext_def_Click(null, null);
            }
            else
            {
                for (int i = 0; i < count; i++)
                {
                    listBox_ext.Items.Add(IniFileHandler.GetPrivateProfileString("DEL_EXT", i.ToString(), "", SettingPath.TimerSrvIniPath));
                }
            }
            listBox_chk_folder.Items.Clear();
            count = IniFileHandler.GetPrivateProfileInt("DEL_CHK", "Count", 0, SettingPath.TimerSrvIniPath);
            for (int i = 0; i < count; i++)
            {
                listBox_chk_folder.Items.Add(IniFileHandler.GetPrivateProfileFolder("DEL_CHK", i.ToString(), SettingPath.TimerSrvIniPath));
            }

            checkBox_recname.IsChecked = IniFileHandler.GetPrivateProfileBool("SET", "RecNamePlugIn", false, SettingPath.TimerSrvIniPath);
            if (CommonManager.Instance.IsConnected == true)
            {
                CommonManager.Instance.DB.ReloadPlugInFile();
            }
            comboBox_recname.ItemsSource  = CommonManager.Instance.DB.RecNamePlugInList;
            comboBox_recname.SelectedItem = IniFileHandler.GetPrivateProfileString("SET", "RecNamePlugInFile", "", SettingPath.TimerSrvIniPath);
            if (comboBox_recname.SelectedIndex < 0)
            {
                comboBox_recname.SelectedIndex = 0;
            }

            checkBox_noChkYen.IsChecked   = IniFileHandler.GetPrivateProfileBool("SET", "NoChkYen", false, SettingPath.TimerSrvIniPath);
            delReserveModeRadioBtns       = new RadioBtnSelect(grid_delReserve);
            delReserveModeRadioBtns.Value = IniFileHandler.GetPrivateProfileInt("SET", "DelReserveMode", 2, SettingPath.TimerSrvIniPath);

            checkBox_autoDel_Click(null, null);

            //3 ボタン表示
            listBox_viewBtn.Items.Clear();
            listBox_viewBtn.Items.AddItems(StringItem.Items(settings.ViewButtonList.Where(item => buttonItem.Contains(item) == true)));
            reLoadButtonItem(bxb, buttonItem);

            listBox_viewTask.Items.Clear();
            listBox_viewTask.Items.AddItems(StringItem.Items(settings.TaskMenuList.Where(item => taskItem.Contains(item) == true)));
            reLoadButtonItem(bxt, taskItem);

            //5 iEpg
            listBox_service.ItemsSource = ChSet5.ChListSelected.Select(info => new ServiceViewItem(info));
        }