Exemple #1
0
        /// <summary>
        /// コマンドラインから設定をコピー
        /// </summary>
        private static void Copy_fromCommandLine(Setting_CmdLine cmdline)
        {
            //copy
              IsPart = cmdline.IsPart || cmdline.IsLast;
              IsLast_cmdline = cmdline.IsLast;
              SequenceName = cmdline.SequenceName ?? "";

              TsPath = cmdline.TsPath;
              D2vPath = cmdline.D2vPath;
              LwiPath = cmdline.LwiPath;
              SrtPath = cmdline.SrtPath;

              Channel = cmdline.Channel ?? "";
              Program = cmdline.Program ?? "";

              //Ts
              if (File.Exists(TsPath) == false)
            throw new LGLException("ts does not exist");
              //D2v  Lwi
              //  コマンドラインで指定されているときのみチェック
              //  srtは削除されるている可能性があるのでチェックしない
              if (D2vPath != null && File.Exists(D2vPath) == false)
            throw new LGLException("d2v does not exist");
              if (LwiPath != null && File.Exists(LwiPath) == false)
            throw new LGLException("lwi does not exist");

              //Extension
              if (TsPath != null && Path.GetExtension(TsPath).ToLower() != ".ts")
            throw new LGLException("TsPath has invalid extension");
              if (D2vPath != null && Path.GetExtension(D2vPath).ToLower() != ".d2v")
            throw new LGLException("D2vPath has invalid extension");
              if (LwiPath != null && Path.GetExtension(LwiPath).ToLower() != ".lwi")
            throw new LGLException("LwiPath has invalid extension");
              if (SrtPath != null && Path.GetExtension(SrtPath).ToLower() != ".srt")
            throw new LGLException("SrtPath has invalid extension");
        }
Exemple #2
0
            /// <summary>
            /// Initialize
            /// </summary>
            public bool Initialize(string[] args)
            {
                var cmdline = new Setting_CmdLine(args);
                var setting = Setting_File.LoadFile();
                if (setting.Enable <= 0) return false;
                if (args.Count() == 0) return false;               //”引数0”なら設定ファイル作成後に終了

                //パス作成
                PathList.Initialize(cmdline, setting);
                ProhibitFileMove_LGL.Lock();
                CleanWorkItem.Clean_Beforehand();

                if (PathList.Is1stPart || PathList.IsAll)
                  Log.WriteLine(cmdline.ToString());
                return true;
            }
Exemple #3
0
        /// <summary>
        /// 初期化、パス作成
        /// </summary>
        public static void Initialize(Setting_CmdLine cmdline, Setting_File setting)
        {
            Copy_fromCommandLine(cmdline);

              Make_InputPath(setting);

              Make_WorkDir();

              Detect_PartNo();

              Get_BinaryPath();

              Set_Chap_and_Misc(setting);

              Log_and_ErrorCheck();
        }