Ejemplo n.º 1
0
 public static void GetDefSearchSetting(ref CtrlCmdCLI.Def.EpgSearchKeyInfo defKey)
 {
     if (Settings.Instance.SearchKeyRegExp == true)
     {
         defKey.regExpFlag = 1;
     }
     if (Settings.Instance.SearchKeyAimaiFlag == true)
     {
         defKey.aimaiFlag = 1;
     }
     if (Settings.Instance.SearchKeyTitleOnly == true)
     {
         defKey.titleOnlyFlag = 1;
     }
     if (Settings.Instance.SearchKeyNotContent == true)
     {
         defKey.notContetFlag = 1;
     }
     if (Settings.Instance.SearchKeyNotDate == true)
     {
         defKey.notDateFlag = 1;
     }
     foreach (ContentKindInfo info in Settings.Instance.SearchKeyContentList)
     {
         CtrlCmdCLI.Def.EpgContentData item = new CtrlCmdCLI.Def.EpgContentData();
         item.content_nibble_level_1 = info.Nibble1;
         item.content_nibble_level_2 = info.Nibble2;
         defKey.contentList.Add(item);
     }
     foreach (DateItem info in Settings.Instance.SearchKeyDateItemList)
     {
         defKey.dateList.Add(info.DateInfo);
     }
     foreach (Int64 info in Settings.Instance.SearchKeyServiceList)
     {
         defKey.serviceList.Add(info);
     }
     defKey.freeCAFlag = Settings.Instance.SearchKeyFreeCA;
     defKey.chkRecEnd = Settings.Instance.SearchKeyChkRecEnd;
     defKey.chkRecDay = Settings.Instance.SearchKeyChkRecDay;
 }
Ejemplo n.º 2
0
        public static void GetDefRecSetting(UInt32 presetID, ref CtrlCmdCLI.Def.RecSettingData defKey)
        {
            StringBuilder buff = new StringBuilder(512);
            String defName = "REC_DEF";
            String defFolderName = "REC_DEF_FOLDER";
            String defFolder1SegName = "REC_DEF_FOLDER_1SEG";

            if (presetID > 0)
            {
                defName += presetID.ToString();
                defFolderName += presetID.ToString();
                defFolder1SegName += presetID.ToString();
            }

            defKey.RecMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RecMode", 1, SettingPath.TimerSrvIniPath);
            defKey.Priority = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "Priority", 2, SettingPath.TimerSrvIniPath);
            defKey.TuijyuuFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "TuijyuuFlag", 1, SettingPath.TimerSrvIniPath);
            defKey.ServiceMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ServiceMode", 0, SettingPath.TimerSrvIniPath);
            defKey.PittariFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PittariFlag", 0, SettingPath.TimerSrvIniPath);

            buff.Clear();
            IniFileHandler.GetPrivateProfileString(defName, "BatFilePath", "", buff, 512, SettingPath.TimerSrvIniPath);
            defKey.BatFilePath = buff.ToString();

            int count = IniFileHandler.GetPrivateProfileInt(defFolderName, "Count", 0, SettingPath.TimerSrvIniPath);
            for (int i = 0; i < count; i++)
            {
                CtrlCmdCLI.Def.RecFileSetInfo folderInfo = new CtrlCmdCLI.Def.RecFileSetInfo();
                buff.Clear();
                IniFileHandler.GetPrivateProfileString(defFolderName, i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                folderInfo.RecFolder = buff.ToString();
                buff.Clear();
                IniFileHandler.GetPrivateProfileString(defFolderName, "WritePlugIn" + i.ToString(), "Write_Default.dll", buff, 512, SettingPath.TimerSrvIniPath);
                folderInfo.WritePlugIn = buff.ToString();
                buff.Clear();
                IniFileHandler.GetPrivateProfileString(defFolderName, "RecNamePlugIn" + i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                folderInfo.RecNamePlugIn = buff.ToString();

                defKey.RecFolderList.Add(folderInfo);
            }

            count = IniFileHandler.GetPrivateProfileInt(defFolder1SegName, "Count", 0, SettingPath.TimerSrvIniPath);
            for (int i = 0; i < count; i++)
            {
                CtrlCmdCLI.Def.RecFileSetInfo folderInfo = new CtrlCmdCLI.Def.RecFileSetInfo();
                buff.Clear();
                IniFileHandler.GetPrivateProfileString(defFolder1SegName, i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                folderInfo.RecFolder = buff.ToString();
                buff.Clear();
                IniFileHandler.GetPrivateProfileString(defFolder1SegName, "WritePlugIn" + i.ToString(), "Write_Default.dll", buff, 512, SettingPath.TimerSrvIniPath);
                folderInfo.WritePlugIn = buff.ToString();
                buff.Clear();
                IniFileHandler.GetPrivateProfileString(defFolder1SegName, "RecNamePlugIn" + i.ToString(), "", buff, 512, SettingPath.TimerSrvIniPath);
                folderInfo.RecNamePlugIn = buff.ToString();

                defKey.PartialRecFolder.Add(folderInfo);
            }

            defKey.SuspendMode = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "SuspendMode", 0, SettingPath.TimerSrvIniPath);
            defKey.RebootFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "RebootFlag", 0, SettingPath.TimerSrvIniPath);
            defKey.UseMargineFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "UseMargineFlag", 0, SettingPath.TimerSrvIniPath);
            defKey.StartMargine = IniFileHandler.GetPrivateProfileInt(defName, "StartMargine", 0, SettingPath.TimerSrvIniPath);
            defKey.EndMargine = IniFileHandler.GetPrivateProfileInt(defName, "EndMargine", 0, SettingPath.TimerSrvIniPath);
            defKey.ContinueRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "ContinueRec", 0, SettingPath.TimerSrvIniPath);
            defKey.PartialRecFlag = (Byte)IniFileHandler.GetPrivateProfileInt(defName, "PartialRec", 0, SettingPath.TimerSrvIniPath);
            defKey.TunerID = (UInt32)IniFileHandler.GetPrivateProfileInt(defName, "TunerID", 0, SettingPath.TimerSrvIniPath);
        }