Esempio n. 1
0
        private string GetRecPath(string tunername)         //引数Tuner名を追加
        {
            //main.defのTuner名毎のrecord.tunerfolderを取得する処理を追加
            string arg_26_0;

            this.list = new PairList(Util.GetUserPath("main.def"));
            this.list.Load();
            if (this.list.IsDefined("record.tunerfolder." + tunername))
            {
                arg_26_0 = MainDef.GetInstance()["record.tunerfolder." + tunername];
            }
            else
            {
                arg_26_0 = MainDef.GetInstance()["record.folder"];
            }

/*
 *                      Log.Write("保存フォルダー0:" + tunername);
 *                      string arg_26_0 = MainDef.GetInstance()["record.tunerfolder." + tunername];
 *                      int iLength = arg_26_0.Length;
 *                      bool flag3 = iLength == 0;
 *                      Log.Write("保存フォルダー1:" + arg_26_0);
 *                      Log.Write("保存フォルダー2:" + iLength);
 *                      if (flag3)
 *                      {
 *                              arg_26_0 = MainDef.GetInstance()["record.folder"];
 *                      }
 *                      Log.Write("保存フォルダー3:" + arg_26_0);
 */
            // mark10als
            string text2 = MainDef.GetInstance()["record.folder.spare"];
            bool   flag  = text2 != "";

            if (flag)
            {
                ulong num;
                ulong num2;
                ulong num3;
                bool  diskFreeSpaceEx = RecTask.GetDiskFreeSpaceEx(arg_26_0, out num, out num2, out num3);
                if (diskFreeSpaceEx)
                {
                    ulong num4 = ulong.Parse(MainDef.GetInstance()["record.folder.spare.use"]);
                    num4 = num4 * 1024uL * 1024uL * 1024uL;
                    bool flag2 = num < num4;
                    if (flag2)
                    {
                        arg_26_0 = text2;
                    }
                }
                else
                {
                    Log.Write("空きディスク容量が取得できませんでした。");
                }
            }

            string path = this.ConvertFileMacro(MainDef.GetInstance()["record.file"]);
            string src  = Path.Combine(arg_26_0, path);

            return(this.CheckFilePath(src));
        }
Esempio n. 2
0
 private EpgWait()
 {
     this.list = new PairList(Util.GetUserPath("epgwait.def"));
     this.list.Load();
     default_wait  = 60;
     this.wait_map = new Dictionary <int, int>();
     this.sid_map  = new Dictionary <int, int>();
     this.Check();
 }
Esempio n. 3
0
        public void LoadFile(Dictionary <int, string> dic, string file)
        {
            PairList expr_0B = new PairList(Util.GetUserPath(file));

            expr_0B.Load();
            foreach (KeyValuePair <string, string> current in expr_0B)
            {
                int key = Convert.ToInt32(current.Key, 16);
                dic[key] = current.Value;
            }
        }
Esempio n. 4
0
 private void tunerTimer_Tick(object sender, EventArgs arg)
 {
     if (!base.Visible)
     {
         return;
     }
     try
     {
         string[] str = new string[]
         {
             "(視聴)",
             "(録画)",
             "(録画一時停止)",
             "",
             "(応答なし)"
         };
         IEnumerator enumerator = this.tunerView.Nodes.GetEnumerator();
         try
         {
             while (enumerator.MoveNext())
             {
                 TreeNode node  = (TreeNode)enumerator.Current;
                 Tuner    tuner = (Tuner)node.Tag;
                 int      state = 0;
                 Task.Factory.StartNew(() =>
                 {
                     state = (int)tuner.GetState();
                 }, TaskCreationOptions.AttachedToParent).ContinueWith((_) =>
                 {
                     node.Text = "{0} {1}".Formatex(new object[]
                     {
                         tuner.Name,
                         str[state]
                     });
                 }, TaskScheduler.FromCurrentSynchronizationContext());
             }
         }
         finally
         {
             IDisposable disposable = enumerator as IDisposable;
             if (disposable != null)
             {
                 disposable.Dispose();
             }
         }
         this.tunerView.Invalidate();
     }
     catch (Exception ex)
     {
         Log.Write("エラーが発生しました。[詳細] " + ex.Message);
         Log.Write(1, ex.StackTrace);
     }
 }
Esempio n. 5
0
        public static void Update(Sql sql)
        {
            PairList expr_0F = new PairList(Util.GetUserPath("tuner.def"));

            expr_0F.Load();
            sql.Text = "delete from tuner";
            sql.Execute();
            foreach (KeyValuePair <string, string> current in expr_0F)
            {
                new Tuner(current.Key, current.Value).Add(sql);
            }
        }
Esempio n. 6
0
 private void LoadState()
 {
     this.state = new PairList(Util.GetUserPath("state.def"));
     this.state.Load();
     if (this.state.IsDefined("font") && this.state.IsDefined("fontsize"))
     {
         FontFamily family = new FontFamily(this.state["font"]);
         this.Font = new Font(family, this.state.GetFloat("fontsize"));
     }
     base.Left   = this.state.GetInt("left");
     base.Top    = this.state.GetInt("top");
     base.Width  = this.state.GetInt("width");
     base.Height = this.state.GetInt("height");
     this.split1.SplitterDistance = this.state.GetInt("split1");
     this.split2.SplitterDistance = this.state.GetInt("split2");
     this.nameHeader.Width        = this.state.GetInt("column.name");
     this.timeHeader.Width        = this.state.GetInt("column.time");
     this.eventHeader.Width       = this.state.GetInt("column.event");
     base.WindowState             = (FormWindowState)this.state.GetInt("window");
 }
Esempio n. 7
0
 private TextConv()
 {
     this.list = new PairList(Util.GetUserPath("convert.def"));
     this.list.Load();
 }
Esempio n. 8
0
 private MainDef()
 {
     this.list = new PairList(Util.GetUserPath("main.def"));
     this.list.Load();
 }