Exemple #1
0
 private void ReLoadStation()
 {
     listBox_iEPG.Items.Clear();
     if (listBox_service.SelectedItem != null)
     {
         ServiceViewItem item = listBox_service.SelectedItem as ServiceViewItem;
         foreach (IEPGStationInfo info in stationList)
         {
             if (info.Key == item.Key)
             {
                 listBox_iEPG.Items.Add(info);
             }
         }
     }
 }
Exemple #2
0
        private void button_add_iepg_Click(object sender, RoutedEventArgs e)
        {
            if (listBox_service.SelectedItem != null)
            {
                ServiceViewItem item = listBox_service.SelectedItem as ServiceViewItem;
                foreach (IEPGStationInfo info in stationList)
                {
                    if (String.Compare(info.StationName, textBox_station.Text) == 0)
                    {
                        MessageBox.Show("すでに登録済みです");
                        return;
                    }
                }
                IEPGStationInfo addItem = new IEPGStationInfo();
                addItem.StationName = textBox_station.Text;
                addItem.Key         = item.Key;

                stationList.Add(addItem);

                ReLoadStation();
            }
        }
Exemple #3
0
        private void button_add_iepg_Click(object sender, RoutedEventArgs e)
        {
            if (listBox_service.SelectedItem != null)
            {
                ServiceViewItem item = listBox_service.SelectedItem as ServiceViewItem;
                foreach (IEPGStationInfo info in ((Settings)DataContext).IEpgStationList)
                {
                    if (string.Compare(info.StationName, textBox_station.Text, new System.Globalization.CultureInfo("ja-JP"),
                                       System.Globalization.CompareOptions.IgnoreWidth | System.Globalization.CompareOptions.IgnoreCase) == 0)
                    {
                        MessageBox.Show("すでに登録済みです");
                        return;
                    }
                }
                IEPGStationInfo addItem = new IEPGStationInfo();
                addItem.StationName = textBox_station.Text;
                addItem.Key         = item.Key;

                ((Settings)DataContext).IEpgStationList.Add(addItem);

                ReLoadStation();
            }
        }
Exemple #4
0
        public SetAppView()
        {
            InitializeComponent();

            try
            {
                if (Settings.Instance.NoStyle == 1)
                {
                    button_standbyCtrl.Style = null;
                    button_autoDel.Style = null;
                    button_recname.Style = null;
                    button_btnUp.Style = null;
                    button_btnDown.Style = null;
                    button_btnDel.Style = null;
                    button_btnAdd.Style = null;
                    button_taskUp.Style = null;
                    button_taskDown.Style = null;
                    button_taskDel.Style = null;
                    button_taskAdd.Style = null;
                    button_searchDef.Style = null;
                    button_recDef.Style = null;
                    button_add_srvcoop.Style = null;
                    button_del_srvcoop.Style = null;
                    button_exe1.Style = null;
                    button_exe2.Style = null;
                    button_add.Style = null;
                    button_del.Style = null;
                    button_inst.Style = null;
                    button_uninst.Style = null;
                    button_stop.Style = null;

                }

                StringBuilder buff = new StringBuilder(512);
                buff.Clear();
                int recEndMode = IniFileHandler.GetPrivateProfileInt("SET", "RecEndMode", 2, SettingPath.TimerSrvIniPath);
                switch (recEndMode)
                {
                    case 0:
                        radioButton_none.IsChecked = true;
                        break;
                    case 1:
                        radioButton_standby.IsChecked = true;
                        break;
                    case 2:
                        radioButton_suspend.IsChecked = true;
                        break;
                    case 3:
                        radioButton_shutdown.IsChecked = true;
                        break;
                    default:
                        break;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "Reboot", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_reboot.IsChecked = true;
                }
                else
                {
                    checkBox_reboot.IsChecked = false;
                }
                textBox_pcWakeTime.Text = IniFileHandler.GetPrivateProfileInt("SET", "WakeTime", 5, SettingPath.TimerSrvIniPath).ToString();
                textBox_batWait.Text = IniFileHandler.GetPrivateProfileInt("SET", "BatMargin", 10, SettingPath.TimerSrvIniPath).ToString();

                textBox_megine_start.Text = IniFileHandler.GetPrivateProfileInt("SET", "StartMargin", 5, SettingPath.TimerSrvIniPath).ToString();
                textBox_margine_end.Text = IniFileHandler.GetPrivateProfileInt("SET", "EndMargin", 2, SettingPath.TimerSrvIniPath).ToString();
                textBox_appWakeTime.Text = IniFileHandler.GetPrivateProfileInt("SET", "RecAppWakeTime", 2, SettingPath.TimerSrvIniPath).ToString();

                if (IniFileHandler.GetPrivateProfileInt("SET", "RecMinWake", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appMin.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecView", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appView.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "DropLog", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appDrop.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "PgInfoLog", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_addPgInfo.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecNW", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appNW.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecOverWrite", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appOverWrite.IsChecked = true;
                }

                int ngCount = IniFileHandler.GetPrivateProfileInt("NO_SUSPEND", "Count", 0, SettingPath.TimerSrvIniPath);
                if (ngCount == 0)
                {
                    ngProcessList.Add("Eden.exe");
                }
                else
                {
                    for (int i = 0; i < ngCount; i++)
                    {
                        buff.Clear();
                        IniFileHandler.GetPrivateProfileString("NO_SUSPEND", i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                        ngProcessList.Add(buff.ToString());
                    }
                }
                buff.Clear();
                IniFileHandler.GetPrivateProfileString("NO_SUSPEND", "NoStandbyTime", "10", buff, 512, SettingPath.TimerSrvIniPath);
                ngMin = buff.ToString();
                if (IniFileHandler.GetPrivateProfileInt("NO_SUSPEND", "NoUsePC", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    ngUsePC = true;
                }
                buff.Clear();
                IniFileHandler.GetPrivateProfileString("NO_SUSPEND", "NoUsePCTime", "3", buff, 512, SettingPath.TimerSrvIniPath);
                ngUsePCMin = buff.ToString();
                if (IniFileHandler.GetPrivateProfileInt("NO_SUSPEND", "NoFileStreaming", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    ngFileStreaming = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("NO_SUSPEND", "NoShareFile", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    ngShareFile = true;
                }

                comboBox_process.Items.Add("リアルタイム");
                comboBox_process.Items.Add("高");
                comboBox_process.Items.Add("通常以上");
                comboBox_process.Items.Add("通常");
                comboBox_process.Items.Add("通常以下");
                comboBox_process.Items.Add("低");
                comboBox_process.SelectedIndex = IniFileHandler.GetPrivateProfileInt("SET", "ProcessPriority", 3, SettingPath.TimerSrvIniPath);

                //2
                if (IniFileHandler.GetPrivateProfileInt("SET", "BackPriority", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_back_priority.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "SameChPriority", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_sameChPriority.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "EventRelay", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_enable_relay.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "ResAutoChgTitle", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_chgTitle.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "ResAutoChkTime", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_chk_TimeOnly.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "AutoDel", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_autoDel.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecNamePlugIn", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_recname.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "AutoDelRecInfo", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_autoDelRecInfo.IsChecked = true;
                }
                textBox_autoDelRecInfo.Text = IniFileHandler.GetPrivateProfileInt("SET", "AutoDelRecInfoNum", 100, SettingPath.TimerSrvIniPath).ToString();

                if (IniFileHandler.GetPrivateProfileInt("SET", "TimeSync", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_timeSync.IsChecked = true;
                }

                buff.Clear();
                IniFileHandler.GetPrivateProfileString("SET", "RecNamePlugInFile", "RecName_Macro.dll", buff, 512, SettingPath.TimerSrvIniPath);
                String plugInFile = buff.ToString();

                if (IniFileHandler.GetPrivateProfileInt("SET", "UseSrvCoop", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_useSrvCoop.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "UseResSrvCoop", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_useResSrvCoop.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "UseEpgSrvCoop", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_useEpgSrvCoop.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "NgAddResSrvCoop", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_ngResCoop.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "NgEpgFileSrvCoop", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_ngEpgCoop.IsChecked = true;
                }

                int count = IniFileHandler.GetPrivateProfileInt("COOP_SRV", "Num", 0, SettingPath.TimerSrvIniPath);
                for (int i = 0; i < count; i++)
                {
                    CoopServerInfo addItem = new CoopServerInfo();
                    buff.Clear();
                    IniFileHandler.GetPrivateProfileString("COOP_SRV", "ADD" + i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                    addItem.ServerAddress = buff.ToString();

                    addItem.ServerPort = (UInt32)IniFileHandler.GetPrivateProfileInt("COOP_SRV", "PORT" + i.ToString(), 4510, SettingPath.TimerSrvIniPath);

                    listBox_coopSrv.Items.Add(addItem);
                }

                try
                {
                    checkBox_closeMin.IsChecked = Settings.Instance.CloseMin;
                    checkBox_minWake.IsChecked = Settings.Instance.WakeMin;
                    checkBox_noToolTips.IsChecked = Settings.Instance.NoToolTip;
                    checkBox_noBallonTips.IsChecked = Settings.Instance.NoBallonTips;
                    checkBox_playDClick.IsChecked = Settings.Instance.PlayDClick;
                    checkBox_fixSearchResult.IsChecked = Settings.Instance.FixSearchResult;
                    checkBox_minHide.IsChecked = Settings.Instance.MinHide;
                }
                catch
                {
                }

                count = IniFileHandler.GetPrivateProfileInt("DEL_EXT", "Count", 0, SettingPath.TimerSrvIniPath);
                if (count == 0)
                {
                    extList.Add(".ts.err");
                    extList.Add(".ts.program.txt");
                }
                else
                {
                    for (int i = 0; i < count; i++)
                    {
                        buff.Clear();
                        IniFileHandler.GetPrivateProfileString("DEL_EXT", i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                        extList.Add(buff.ToString());
                    }
                }

                count = IniFileHandler.GetPrivateProfileInt("DEL_CHK", "Count", 0, SettingPath.TimerSrvIniPath);
                for (int i = 0; i < count; i++)
                {
                    buff.Clear();
                    IniFileHandler.GetPrivateProfileString("DEL_CHK", i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                    delChkFolderList.Add(buff.ToString());
                }

                try
                {
                    string[] files = Directory.GetFiles(SettingPath.ModulePath + "\\RecName", "RecName*.dll");
                    int select = 0;
                    foreach (string info in files)
                    {
                        int index = comboBox_recname.Items.Add(System.IO.Path.GetFileName(info));
                        if (String.Compare(System.IO.Path.GetFileName(info), plugInFile, true) == 0)
                        {
                            select = index;
                        }
                    }
                    if (comboBox_recname.Items.Count != 0)
                    {
                        comboBox_recname.SelectedIndex = select;
                    }
                }
                catch
                {
                }

                if (IniFileHandler.GetPrivateProfileInt("SET", "EnableTCPSrv", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_tcpServer.IsChecked = true;
                }
                textBox_tcpPort.Text = IniFileHandler.GetPrivateProfileInt("SET", "TCPPort", 4510, SettingPath.TimerSrvIniPath).ToString();

                textBox_baloonclose.Text = IniFileHandler.GetPrivateProfileInt("SET", "Baloon", 0, SettingPath.TimerSrvIniPath).ToString();

                Settings.GetDefSearchSetting(ref defSearchKey);

                buttonItem.Add(new ViewMenuItem("(空白)", false));
                buttonItem.Add(new ViewMenuItem("設定", false));
                buttonItem.Add(new ViewMenuItem("検索", false));
                buttonItem.Add(new ViewMenuItem("スタンバイ", false));
                buttonItem.Add(new ViewMenuItem("休止", false));
                buttonItem.Add(new ViewMenuItem("EPG取得", false));
                buttonItem.Add(new ViewMenuItem("EPG再読み込み", false));
                buttonItem.Add(new ViewMenuItem("終了", false));
                buttonItem.Add(new ViewMenuItem("カスタム1", false));
                buttonItem.Add(new ViewMenuItem("カスタム2", false));
                buttonItem.Add(new ViewMenuItem("NetworkTV終了", false));
                buttonItem.Add(new ViewMenuItem("情報通知ログ", false));

                taskItem.Add(new ViewMenuItem("(セパレータ)", false));
                taskItem.Add(new ViewMenuItem("設定", false));
                taskItem.Add(new ViewMenuItem("スタンバイ", false));
                taskItem.Add(new ViewMenuItem("休止", false));
                taskItem.Add(new ViewMenuItem("EPG取得", false));
                taskItem.Add(new ViewMenuItem("終了", false));

                foreach (String info in Settings.Instance.ViewButtonList)
                {
                    //.NET的に同一文字列のStringを入れると選択動作がおかしくなるみたいなので毎回作成しておく
                    listBox_viewBtn.Items.Add(new ViewMenuItem(info, true));
                    if (String.Compare(info, "(空白)") != 0)
                    {
                        foreach (ViewMenuItem item in buttonItem)
                        {
                            if (String.Compare(info, item.MenuName) == 0)
                            {
                                item.IsSelected = true;
                                break;
                            }
                        }
                    }
                }
                foreach (String info in Settings.Instance.TaskMenuList)
                {
                    //.NET的に同一文字列のStringを入れると選択動作がおかしくなるみたいなので毎回作成しておく
                    listBox_viewTask.Items.Add(new ViewMenuItem(info, true));
                    if (String.Compare(info, "(セパレータ)") != 0)
                    {
                        foreach (ViewMenuItem item in taskItem)
                        {
                            if (String.Compare(info, item.MenuName) == 0)
                            {
                                item.IsSelected = true;
                                break;
                            }
                        }
                    }
                }

                ReLoadButtonItem();
                ReLoadTaskItem();

                textBox_name1.Text = Settings.Instance.Cust1BtnName;
                textBox_exe1.Text = Settings.Instance.Cust1BtnCmd;
                textBox_opt1.Text = Settings.Instance.Cust1BtnCmdOpt;

                textBox_name2.Text = Settings.Instance.Cust2BtnName;
                textBox_exe2.Text = Settings.Instance.Cust2BtnCmd;
                textBox_opt2.Text = Settings.Instance.Cust2BtnCmdOpt;

                foreach (ChSet5Item info in ChSet5.Instance.ChList.Values)
                {
                    ServiceViewItem item = new ServiceViewItem(info);
                    serviceList.Add(item.Key, item);
                }
                listBox_service.ItemsSource = serviceList.Values;

                stationList = Settings.Instance.IEpgStationList;
                ReLoadStation();

                UpdateServiceBtn();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
Exemple #5
0
        public SetAppView()
        {
            InitializeComponent();

            try
            {
                StringBuilder buff = new StringBuilder(512);
                buff.Clear();
                int recEndMode = IniFileHandler.GetPrivateProfileInt("SET", "RecEndMode", 2, SettingPath.TimerSrvIniPath);
                switch (recEndMode)
                {
                case 0:
                    radioButton_none.IsChecked = true;
                    break;

                case 1:
                    radioButton_standby.IsChecked = true;
                    break;

                case 2:
                    radioButton_suspend.IsChecked = true;
                    break;

                case 3:
                    radioButton_shutdown.IsChecked = true;
                    break;

                default:
                    break;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "Reboot", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_reboot.IsChecked = true;
                }
                else
                {
                    checkBox_reboot.IsChecked = false;
                }
                textBox_pcWakeTime.Text = IniFileHandler.GetPrivateProfileInt("SET", "WakeTime", 5, SettingPath.TimerSrvIniPath).ToString();
                textBox_batWait.Text    = IniFileHandler.GetPrivateProfileInt("SET", "BatMargin", 10, SettingPath.TimerSrvIniPath).ToString();

                textBox_megine_start.Text = IniFileHandler.GetPrivateProfileInt("SET", "StartMargin", 5, SettingPath.TimerSrvIniPath).ToString();
                textBox_margine_end.Text  = IniFileHandler.GetPrivateProfileInt("SET", "EndMargin", 2, SettingPath.TimerSrvIniPath).ToString();
                textBox_appWakeTime.Text  = IniFileHandler.GetPrivateProfileInt("SET", "RecAppWakeTime", 2, SettingPath.TimerSrvIniPath).ToString();

                if (IniFileHandler.GetPrivateProfileInt("SET", "RecMinWake", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appMin.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecView", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appView.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "DropLog", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appDrop.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "PgInfoLog", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_addPgInfo.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecNW", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appNW.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecOverWrite", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_appOverWrite.IsChecked = true;
                }

                int ngCount = IniFileHandler.GetPrivateProfileInt("NO_SUSPEND", "Count", 0, SettingPath.TimerSrvIniPath);
                if (ngCount == 0)
                {
                    ngProcessList.Add("EpgDataCap_Bon.exe");
                }
                else
                {
                    for (int i = 0; i < ngCount; i++)
                    {
                        buff.Clear();
                        IniFileHandler.GetPrivateProfileString("NO_SUSPEND", i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                        ngProcessList.Add(buff.ToString());
                    }
                }
                buff.Clear();
                IniFileHandler.GetPrivateProfileString("NO_SUSPEND", "NoStandbyTime", "10", buff, 512, SettingPath.TimerSrvIniPath);
                ngMin = buff.ToString();
                if (IniFileHandler.GetPrivateProfileInt("NO_SUSPEND", "NoFileStreaming", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    ngFileStreaming = true;
                }

                comboBox_process.Items.Add("リアルタイム");
                comboBox_process.Items.Add("高");
                comboBox_process.Items.Add("通常以上");
                comboBox_process.Items.Add("通常");
                comboBox_process.Items.Add("通常以下");
                comboBox_process.Items.Add("低");
                comboBox_process.SelectedIndex = IniFileHandler.GetPrivateProfileInt("SET", "ProcessPriority", 3, SettingPath.TimerSrvIniPath);

                //2
                if (IniFileHandler.GetPrivateProfileInt("SET", "BackPriority", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_back_priority.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "SameChPriority", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_sameChPriority.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "EventRelay", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_enable_relay.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "ResAutoChgTitle", 1, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_chgTitle.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "ResAutoChkTime", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_chk_TimeOnly.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "AutoDel", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_autoDel.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "RecNamePlugIn", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_recname.IsChecked = true;
                }
                if (IniFileHandler.GetPrivateProfileInt("SET", "AutoDelRecInfo", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_autoDelRecInfo.IsChecked = true;
                }
                textBox_autoDelRecInfo.Text = IniFileHandler.GetPrivateProfileInt("SET", "AutoDelRecInfoNum", 100, SettingPath.TimerSrvIniPath).ToString();

                if (IniFileHandler.GetPrivateProfileInt("SET", "TimeSync", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_timeSync.IsChecked = true;
                }

                buff.Clear();
                IniFileHandler.GetPrivateProfileString("SET", "RecNamePlugInFile", "RecName_Macro.dll", buff, 512, SettingPath.TimerSrvIniPath);
                String plugInFile = buff.ToString();

                try
                {
                    checkBox_closeMin.IsChecked        = Settings.Instance.CloseMin;
                    checkBox_minWake.IsChecked         = Settings.Instance.WakeMin;
                    checkBox_noToolTips.IsChecked      = Settings.Instance.NoToolTip;
                    checkBox_noBallonTips.IsChecked    = Settings.Instance.NoBallonTips;
                    checkBox_playDClick.IsChecked      = Settings.Instance.PlayDClick;
                    checkBox_fixSearchResult.IsChecked = Settings.Instance.FixSearchResult;

                    checkBox_wakeReconnect.IsChecked = Settings.Instance.WakeReconnectNW;
                    checkBox_suspendClose.IsChecked  = Settings.Instance.SuspendCloseNW;
                    checkBox_ngAutoEpgLoad.IsChecked = Settings.Instance.NgAutoEpgLoadNW;
                }
                catch
                {
                }

                int count = IniFileHandler.GetPrivateProfileInt("DEL_EXT", "Count", 0, SettingPath.TimerSrvIniPath);
                if (count == 0)
                {
                    extList.Add(".ts.err");
                    extList.Add(".ts.program.txt");
                }
                else
                {
                    for (int i = 0; i < count; i++)
                    {
                        buff.Clear();
                        IniFileHandler.GetPrivateProfileString("DEL_EXT", i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                        extList.Add(buff.ToString());
                    }
                }

                count = IniFileHandler.GetPrivateProfileInt("DEL_CHK", "Count", 0, SettingPath.TimerSrvIniPath);
                for (int i = 0; i < count; i++)
                {
                    buff.Clear();
                    IniFileHandler.GetPrivateProfileString("DEL_CHK", i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                    delChkFolderList.Add(buff.ToString());
                }


                try
                {
                    string[] files  = Directory.GetFiles(SettingPath.ModulePath + "\\RecName", "RecName*.dll");
                    int      select = 0;
                    foreach (string info in files)
                    {
                        int index = comboBox_recname.Items.Add(System.IO.Path.GetFileName(info));
                        if (String.Compare(System.IO.Path.GetFileName(info), plugInFile, true) == 0)
                        {
                            select = index;
                        }
                    }
                    if (comboBox_recname.Items.Count != 0)
                    {
                        comboBox_recname.SelectedIndex = select;
                    }
                }
                catch
                {
                }

                if (IniFileHandler.GetPrivateProfileInt("SET", "EnableTCPSrv", 0, SettingPath.TimerSrvIniPath) == 1)
                {
                    checkBox_tcpServer.IsChecked = true;
                }
                textBox_tcpPort.Text = IniFileHandler.GetPrivateProfileInt("SET", "TCPPort", 4510, SettingPath.TimerSrvIniPath).ToString();

                textBox_baloonclose.Text = IniFileHandler.GetPrivateProfileInt("SET", "Baloon", 0, SettingPath.TimerSrvIniPath).ToString();

                Settings.GetDefSearchSetting(ref defSearchKey);

                checkBox_showAsTab.IsChecked = Settings.Instance.ViewButtonShowAsTab;

                buttonItem.Add(new ViewMenuItem("(空白)", false));
                buttonItem.Add(new ViewMenuItem("設定", false));
                buttonItem.Add(new ViewMenuItem("検索", false));
                buttonItem.Add(new ViewMenuItem("スタンバイ", false));
                buttonItem.Add(new ViewMenuItem("休止", false));
                buttonItem.Add(new ViewMenuItem("EPG取得", false));
                buttonItem.Add(new ViewMenuItem("EPG再読み込み", false));
                buttonItem.Add(new ViewMenuItem("終了", false));
                buttonItem.Add(new ViewMenuItem("カスタム1", false));
                buttonItem.Add(new ViewMenuItem("カスタム2", false));
                buttonItem.Add(new ViewMenuItem("NetworkTV終了", false));
                buttonItem.Add(new ViewMenuItem("情報通知ログ", false));

                taskItem.Add(new ViewMenuItem("(セパレータ)", false));
                taskItem.Add(new ViewMenuItem("設定", false));
                taskItem.Add(new ViewMenuItem("スタンバイ", false));
                taskItem.Add(new ViewMenuItem("休止", false));
                taskItem.Add(new ViewMenuItem("EPG取得", false));
                taskItem.Add(new ViewMenuItem("終了", false));

                foreach (String info in Settings.Instance.ViewButtonList)
                {
                    //リストが空であることを示す特殊なアイテムを無視
                    if (String.Compare(info, "(なし)") == 0)
                    {
                        continue;
                    }
                    //.NET的に同一文字列のStringを入れると選択動作がおかしくなるみたいなので毎回作成しておく
                    listBox_viewBtn.Items.Add(new ViewMenuItem(info, true));
                    if (String.Compare(info, "(空白)") != 0)
                    {
                        foreach (ViewMenuItem item in buttonItem)
                        {
                            if (String.Compare(info, item.MenuName) == 0)
                            {
                                item.IsSelected = true;
                                break;
                            }
                        }
                    }
                }
                foreach (String info in Settings.Instance.TaskMenuList)
                {
                    //.NET的に同一文字列のStringを入れると選択動作がおかしくなるみたいなので毎回作成しておく
                    listBox_viewTask.Items.Add(new ViewMenuItem(info, true));
                    if (String.Compare(info, "(セパレータ)") != 0)
                    {
                        foreach (ViewMenuItem item in taskItem)
                        {
                            if (String.Compare(info, item.MenuName) == 0)
                            {
                                item.IsSelected = true;
                                break;
                            }
                        }
                    }
                }

                ReLoadButtonItem();
                ReLoadTaskItem();

                textBox_name1.Text = Settings.Instance.Cust1BtnName;
                textBox_exe1.Text  = Settings.Instance.Cust1BtnCmd;
                textBox_opt1.Text  = Settings.Instance.Cust1BtnCmdOpt;

                textBox_name2.Text = Settings.Instance.Cust2BtnName;
                textBox_exe2.Text  = Settings.Instance.Cust2BtnCmd;
                textBox_opt2.Text  = Settings.Instance.Cust2BtnCmdOpt;

                foreach (ChSet5Item info in ChSet5.Instance.ChList.Values)
                {
                    ServiceViewItem item = new ServiceViewItem(info);
                    serviceList.Add(item.Key, item);
                }
                listBox_service.ItemsSource = serviceList.Values;

                stationList = Settings.Instance.IEpgStationList;
                ReLoadStation();

                UpdateServiceBtn();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
Exemple #6
0
        public SetBasicView()
        {
            InitializeComponent();

            IsChangeSettingPath = false;

            listBox_Button_Set();

            try
            {
                // tabItem1 - 保存フォルダ
                // 保存できない項目は IsEnabled = false にする
                if (CommonManager.Instance.NWMode == true)
                {
                    group_setPath.IsEnabled = false; // 設定関係保存フォルダ
                    group_exePath.IsEnabled = false; // 録画用アプリのexe
                    group_recInfoFolder.IsEnabled = false; // 録画情報保存フォルダ
                    label4.IsEnabled = false; //※ 録画中やEPG取得中に設定を変更すると正常動作しなくなる可能性があります。
                    button_shortCutSrv.IsEnabled = false;
                }
                group_recFolder.IsEnabled = IniFileHandler.CanUpdateInifile; // 録画保存フォルダ

                // 読める設定のみ項目に反映させる
                if (IniFileHandler.CanReadInifile)
                {
                    textBox_setPath.Text = SettingPath.SettingFolderPath;
                    textBox_exe.Text = SettingPath.EdcbExePath;

                    textBox_recInfoFolder.Text = IniFileHandler.GetPrivateProfileString("SET", "RecInfoFolder", "", SettingPath.CommonIniPath);

                    Settings.Instance.DefRecFolders.ForEach(folder => listBox_recFolder.Items.Add(new UserCtrlView.BGBarListBoxItem(folder)));
                }
                if (CommonManager.Instance.NWMode == false)
                {
                    string viewAppIniPath = SettingPath.ModulePath.TrimEnd('\\') + "\\ViewApp.ini";
                    textBox_cmdBon.Text = IniFileHandler.GetPrivateProfileString("APP_CMD_OPT", "Bon", "-d", viewAppIniPath);
                    textBox_cmdMin.Text = IniFileHandler.GetPrivateProfileString("APP_CMD_OPT", "Min", "-min", viewAppIniPath);
                    textBox_cmdViewOff.Text = IniFileHandler.GetPrivateProfileString("APP_CMD_OPT", "ViewOff", "-noview", viewAppIniPath);
                }

                // tabItem2 - チューナー
                // 保存できない項目は IsEnabled = false にする
                if (IniFileHandler.CanUpdateInifile == false)
                {
                    ViewUtil.DisableControlChildren(tabItem2);
                    grid_tuner.IsEnabled = true;
                    ViewUtil.ChangeChildren(grid_tuner, false);
                }
                listBox_bon.IsEnabled = IniFileHandler.CanUpdateInifile;

                // 読める設定のみ項目に反映させる
                if (IniFileHandler.CanReadInifile)
                {
                    SortedList<Int32, TunerInfo> tunerInfo = new SortedList<Int32, TunerInfo>();
                    foreach (string fileName in CommonManager.Instance.GetBonFileList())
                    {
                        try
                        {
                            TunerInfo item = new TunerInfo(fileName);
                            item.TunerNum = IniFileHandler.GetPrivateProfileInt(item.BonDriver, "Count", 0, SettingPath.TimerSrvIniPath).ToString();
                            item.IsEpgCap = (IniFileHandler.GetPrivateProfileInt(item.BonDriver, "GetEpg", 1, SettingPath.TimerSrvIniPath) != 0);
                            item.EPGNum = IniFileHandler.GetPrivateProfileInt(item.BonDriver, "EPGCount", 0, SettingPath.TimerSrvIniPath).ToString();
                            int priority = IniFileHandler.GetPrivateProfileInt(item.BonDriver, "Priority", 0xFFFF, SettingPath.TimerSrvIniPath);
                            while (true)
                            {
                                if (tunerInfo.ContainsKey(priority) == true)
                                {
                                    priority++;
                                }
                                else
                                {
                                    tunerInfo.Add(priority, item);
                                    break;
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
                        }
                    }
                    foreach (TunerInfo info in tunerInfo.Values)
                    {
                        listBox_bon.Items.Add(info);
                    }
                    if (listBox_bon.Items.Count > 0)
                    {
                        listBox_bon.SelectedIndex = 0;
                    }
                }
                button_shortCut.Content = SettingPath.ModuleName + ".exe" + (File.Exists(
                    System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), SettingPath.ModuleName + ".lnk")) ? "を解除" : "");
                button_shortCutSrv.Content = (string)button_shortCutSrv.Content + (File.Exists(
                    System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "EpgTimerSrv.lnk")) ? "を解除" : "");

                // tabItem3 - EPG取得
                // 保存できない項目は IsEnabled = false にする
                if (IniFileHandler.CanUpdateInifile == false)
                {
                    ViewUtil.DisableControlChildren(tabItem3);
                }
                listView_service.IsEnabled = IniFileHandler.CanUpdateInifile;

                // 読める設定のみ項目に反映させる
                serviceList = new List<ServiceViewItem>();
                if (IniFileHandler.CanReadInifile)
                {
                    comboBox_HH.DataContext = CommonManager.Instance.HourDictionary.Values;
                    comboBox_HH.SelectedIndex = 0;
                    comboBox_MM.DataContext = CommonManager.Instance.MinDictionary.Values;
                    comboBox_MM.SelectedIndex = 0;

                    try
                    {
                        foreach (ChSet5Item info in ChSet5.ChList.Values)
                        {
                            ServiceViewItem item = new ServiceViewItem(info);
                            if (info.EpgCapFlag == 1)
                            {
                                item.IsSelected = true;
                            }
                            else
                            {
                                item.IsSelected = false;
                            }
                            serviceList.Add(item);
                        }
                    }
                    catch
                    {
                    }
                    listView_service.DataContext = serviceList;

                    if (IniFileHandler.GetPrivateProfileInt("SET", "BSBasicOnly", 1, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_bs.IsChecked = true;
                    }
                    else
                    {
                        checkBox_bs.IsChecked = false;
                    }
                    if (IniFileHandler.GetPrivateProfileInt("SET", "CS1BasicOnly", 1, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_cs1.IsChecked = true;
                    }
                    else
                    {
                        checkBox_cs1.IsChecked = false;
                    }
                    if (IniFileHandler.GetPrivateProfileInt("SET", "CS2BasicOnly", 1, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_cs2.IsChecked = true;
                    }
                    else
                    {
                        checkBox_cs2.IsChecked = false;
                    }
                    if (IniFileHandler.GetPrivateProfileInt("SET", "CS3BasicOnly", 0, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_cs3.IsChecked = true;
                    }
                    else
                    {
                        checkBox_cs3.IsChecked = false;
                    }

                    int capCount = IniFileHandler.GetPrivateProfileInt("EPG_CAP", "Count", 0, SettingPath.TimerSrvIniPath);
                    if (capCount == 0)
                    {
                        EpgCaptime item = new EpgCaptime();
                        item.IsSelected = true;
                        item.Time = "23:00";
                        item.BSBasicOnly = checkBox_bs.IsChecked == true;
                        item.CS1BasicOnly = checkBox_cs1.IsChecked == true;
                        item.CS2BasicOnly = checkBox_cs2.IsChecked == true;
                        item.CS3BasicOnly = checkBox_cs3.IsChecked == true;
                        timeList.Add(item);
                    }
                    else
                    {
                        for (int i = 0; i < capCount; i++)
                        {
                            EpgCaptime item = new EpgCaptime();
                            item.Time = IniFileHandler.GetPrivateProfileString("EPG_CAP", i.ToString(), "", SettingPath.TimerSrvIniPath);
                            if (IniFileHandler.GetPrivateProfileInt("EPG_CAP", i.ToString() + "Select", 0, SettingPath.TimerSrvIniPath) == 1)
                            {
                                item.IsSelected = true;
                            }
                            else
                            {
                                item.IsSelected = false;
                            }
                            // 取得種別(bit0(LSB)=BS,bit1=CS1,bit2=CS2,bit3=CS3)。負値のときは共通設定に従う
                            int flags = IniFileHandler.GetPrivateProfileInt("EPG_CAP", i.ToString() + "BasicOnlyFlags", -1, SettingPath.TimerSrvIniPath);
                            if (flags >= 0)
                            {
                                item.BSBasicOnly = (flags & 1) != 0;
                                item.CS1BasicOnly = (flags & 2) != 0;
                                item.CS2BasicOnly = (flags & 4) != 0;
                                item.CS3BasicOnly = (flags & 8) != 0;
                            }
                            else
                            {
                                item.BSBasicOnly = checkBox_bs.IsChecked == true;
                                item.CS1BasicOnly = checkBox_cs1.IsChecked == true;
                                item.CS2BasicOnly = checkBox_cs2.IsChecked == true;
                                item.CS3BasicOnly = checkBox_cs3.IsChecked == true;
                            }
                            timeList.Add(item);
                        }
                    }
                    ListView_time.DataContext = timeList;

                    textBox_ngCapMin.Text = IniFileHandler.GetPrivateProfileInt("SET", "NGEpgCapTime", 20, SettingPath.TimerSrvIniPath).ToString();
                    textBox_ngTunerMin.Text = IniFileHandler.GetPrivateProfileInt("SET", "NGEpgCapTunerTime", 20, SettingPath.TimerSrvIniPath).ToString();
                }

                SetBasicView_tabItem4();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }
Exemple #7
0
        private void SetAppView_tabItem6()
        {
            foreach (ChSet5Item info in ChSet5.Instance.ChList.Values)
            {
                ServiceViewItem item = new ServiceViewItem(info);
                serviceList.Add(item.Key, item);
            }
            listBox_service.ItemsSource = serviceList.Values;

            stationList = Settings.Instance.IEpgStationList;
            ReLoadStation();
        }
Exemple #8
0
        public SetBasicView()
        {
            InitializeComponent();

            IsChangeSettingPath = false;

            listBox_Button_Set();

            try
            {
                // tabItem1 - 保存フォルダ
                // 保存できない項目は IsEnabled = false にする
                if (CommonManager.Instance.NWMode == true)
                {
                    group_setPath.IsEnabled       = false; // 設定関係保存フォルダ
                    group_exePath.IsEnabled       = false; // 録画用アプリのexe
                    group_recInfoFolder.IsEnabled = false; // 録画情報保存フォルダ
                    label4.IsEnabled             = false;  //※ 録画中やEPG取得中に設定を変更すると正常動作しなくなる可能性があります。
                    button_shortCutSrv.IsEnabled = false;
                }
                group_recFolder.IsEnabled = IniFileHandler.CanUpdateInifile; // 録画保存フォルダ

                // 読める設定のみ項目に反映させる
                if (IniFileHandler.CanReadInifile)
                {
                    textBox_setPath.Text = SettingPath.SettingFolderPath;
                    textBox_exe.Text     = SettingPath.EdcbExePath;

                    textBox_recInfoFolder.Text = IniFileHandler.GetPrivateProfileString("SET", "RecInfoFolder", "", SettingPath.CommonIniPath);

                    Settings.Instance.DefRecFolders.ForEach(folder => listBox_recFolder.Items.Add(new UserCtrlView.BGBarListBoxItem(folder)));
                }
                if (CommonManager.Instance.NWMode == false)
                {
                    string viewAppIniPath = SettingPath.ModulePath.TrimEnd('\\') + "\\ViewApp.ini";
                    textBox_cmdBon.Text     = IniFileHandler.GetPrivateProfileString("APP_CMD_OPT", "Bon", "-d", viewAppIniPath);
                    textBox_cmdMin.Text     = IniFileHandler.GetPrivateProfileString("APP_CMD_OPT", "Min", "-min", viewAppIniPath);
                    textBox_cmdViewOff.Text = IniFileHandler.GetPrivateProfileString("APP_CMD_OPT", "ViewOff", "-noview", viewAppIniPath);
                }

                // tabItem2 - チューナー
                // 保存できない項目は IsEnabled = false にする
                if (IniFileHandler.CanUpdateInifile == false)
                {
                    ViewUtil.DisableControlChildren(tabItem2);
                    grid_tuner.IsEnabled = true;
                    ViewUtil.ChangeChildren(grid_tuner, false);
                }
                listBox_bon.IsEnabled = IniFileHandler.CanUpdateInifile;

                // 読める設定のみ項目に反映させる
                if (IniFileHandler.CanReadInifile)
                {
                    SortedList <Int32, TunerInfo> tunerInfo = new SortedList <Int32, TunerInfo>();
                    foreach (string fileName in CommonManager.Instance.GetBonFileList())
                    {
                        try
                        {
                            TunerInfo item = new TunerInfo(fileName);
                            item.TunerNum = IniFileHandler.GetPrivateProfileInt(item.BonDriver, "Count", 0, SettingPath.TimerSrvIniPath).ToString();
                            item.IsEpgCap = (IniFileHandler.GetPrivateProfileInt(item.BonDriver, "GetEpg", 1, SettingPath.TimerSrvIniPath) != 0);
                            item.EPGNum   = IniFileHandler.GetPrivateProfileInt(item.BonDriver, "EPGCount", 0, SettingPath.TimerSrvIniPath).ToString();
                            int priority = IniFileHandler.GetPrivateProfileInt(item.BonDriver, "Priority", 0xFFFF, SettingPath.TimerSrvIniPath);
                            while (true)
                            {
                                if (tunerInfo.ContainsKey(priority) == true)
                                {
                                    priority++;
                                }
                                else
                                {
                                    tunerInfo.Add(priority, item);
                                    break;
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
                        }
                    }
                    foreach (TunerInfo info in tunerInfo.Values)
                    {
                        listBox_bon.Items.Add(info);
                    }
                    if (listBox_bon.Items.Count > 0)
                    {
                        listBox_bon.SelectedIndex = 0;
                    }
                }
                button_shortCut.Content = SettingPath.ModuleName + ".exe" + (File.Exists(
                                                                                 System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), SettingPath.ModuleName + ".lnk")) ? "を解除" : "");
                button_shortCutSrv.Content = (string)button_shortCutSrv.Content + (File.Exists(
                                                                                       System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "EpgTimerSrv.lnk")) ? "を解除" : "");

                // tabItem3 - EPG取得
                // 保存できない項目は IsEnabled = false にする
                if (IniFileHandler.CanUpdateInifile == false)
                {
                    ViewUtil.DisableControlChildren(tabItem3);
                }
                listView_service.IsEnabled = IniFileHandler.CanUpdateInifile;

                // 読める設定のみ項目に反映させる
                serviceList = new List <ServiceViewItem>();
                if (IniFileHandler.CanReadInifile)
                {
                    comboBox_HH.DataContext   = CommonManager.Instance.HourDictionary.Values;
                    comboBox_HH.SelectedIndex = 0;
                    comboBox_MM.DataContext   = CommonManager.Instance.MinDictionary.Values;
                    comboBox_MM.SelectedIndex = 0;

                    try
                    {
                        foreach (ChSet5Item info in ChSet5.ChList.Values)
                        {
                            ServiceViewItem item = new ServiceViewItem(info);
                            if (info.EpgCapFlag == 1)
                            {
                                item.IsSelected = true;
                            }
                            else
                            {
                                item.IsSelected = false;
                            }
                            serviceList.Add(item);
                        }
                    }
                    catch
                    {
                    }
                    listView_service.DataContext = serviceList;

                    if (IniFileHandler.GetPrivateProfileInt("SET", "BSBasicOnly", 1, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_bs.IsChecked = true;
                    }
                    else
                    {
                        checkBox_bs.IsChecked = false;
                    }
                    if (IniFileHandler.GetPrivateProfileInt("SET", "CS1BasicOnly", 1, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_cs1.IsChecked = true;
                    }
                    else
                    {
                        checkBox_cs1.IsChecked = false;
                    }
                    if (IniFileHandler.GetPrivateProfileInt("SET", "CS2BasicOnly", 1, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_cs2.IsChecked = true;
                    }
                    else
                    {
                        checkBox_cs2.IsChecked = false;
                    }
                    if (IniFileHandler.GetPrivateProfileInt("SET", "CS3BasicOnly", 0, SettingPath.CommonIniPath) == 1)
                    {
                        checkBox_cs3.IsChecked = true;
                    }
                    else
                    {
                        checkBox_cs3.IsChecked = false;
                    }

                    int capCount = IniFileHandler.GetPrivateProfileInt("EPG_CAP", "Count", 0, SettingPath.TimerSrvIniPath);
                    if (capCount == 0)
                    {
                        EpgCaptime item = new EpgCaptime();
                        item.IsSelected   = true;
                        item.Time         = "23:00";
                        item.BSBasicOnly  = checkBox_bs.IsChecked == true;
                        item.CS1BasicOnly = checkBox_cs1.IsChecked == true;
                        item.CS2BasicOnly = checkBox_cs2.IsChecked == true;
                        item.CS3BasicOnly = checkBox_cs3.IsChecked == true;
                        timeList.Add(item);
                    }
                    else
                    {
                        for (int i = 0; i < capCount; i++)
                        {
                            EpgCaptime item = new EpgCaptime();
                            item.Time = IniFileHandler.GetPrivateProfileString("EPG_CAP", i.ToString(), "", SettingPath.TimerSrvIniPath);
                            if (IniFileHandler.GetPrivateProfileInt("EPG_CAP", i.ToString() + "Select", 0, SettingPath.TimerSrvIniPath) == 1)
                            {
                                item.IsSelected = true;
                            }
                            else
                            {
                                item.IsSelected = false;
                            }
                            // 取得種別(bit0(LSB)=BS,bit1=CS1,bit2=CS2,bit3=CS3)。負値のときは共通設定に従う
                            int flags = IniFileHandler.GetPrivateProfileInt("EPG_CAP", i.ToString() + "BasicOnlyFlags", -1, SettingPath.TimerSrvIniPath);
                            if (flags >= 0)
                            {
                                item.BSBasicOnly  = (flags & 1) != 0;
                                item.CS1BasicOnly = (flags & 2) != 0;
                                item.CS2BasicOnly = (flags & 4) != 0;
                                item.CS3BasicOnly = (flags & 8) != 0;
                            }
                            else
                            {
                                item.BSBasicOnly  = checkBox_bs.IsChecked == true;
                                item.CS1BasicOnly = checkBox_cs1.IsChecked == true;
                                item.CS2BasicOnly = checkBox_cs2.IsChecked == true;
                                item.CS3BasicOnly = checkBox_cs3.IsChecked == true;
                            }
                            timeList.Add(item);
                        }
                    }
                    ListView_time.DataContext = timeList;

                    textBox_ngCapMin.Text   = IniFileHandler.GetPrivateProfileInt("SET", "NGEpgCapTime", 20, SettingPath.TimerSrvIniPath).ToString();
                    textBox_ngTunerMin.Text = IniFileHandler.GetPrivateProfileInt("SET", "NGEpgCapTunerTime", 20, SettingPath.TimerSrvIniPath).ToString();
                }

                SetBasicView_tabItem4();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
        }