예제 #1
0
        public static void Run(string[] args)
        {
            if (args.Length > 0)
            {
                DateTime from  = new DateTime();
                DateTime to    = new DateTime();
                bool     isYes = DateTime.TryParseExact(args[0], "yyyy-MM-dd-HH.mm.ss", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out from);

                if (args.Length == 1)
                {
                    to = DateTime.Now;
                }
                else if (args.Length == 2)
                {
                    isYes &= DateTime.TryParseExact(args[1], "yyyy-MM-dd-HH.mm.ss", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out to);
                }
                else
                {
                    Console.WriteLine("Usage:AMSInlineRunner from to[default now]");
                    return;
                }

                if (!isYes)
                {
                    Console.WriteLine("正确的时间格式:yyyy-MM-dd-HH.mm.ss");
                    return;
                }
                InlineDebugSetting.SetValue();
                InlineRunner.RunInlineTest(from, to, false);
            }
            else
            {
                InlineDebugSetting.SetValue();
                InlineRunner.RunInlineTest();
            }
            System.Threading.Thread.Sleep(500);
            Console.WriteLine("ok");
        }
예제 #2
0
 public static void Run()
 {
     InlineDebugSetting.SetValue();
     InlineRunner.RunAMSInline();
 }
예제 #3
0
 public InlineTranslateService()
 {
     InitializeComponent();
     InlineDebugSetting.SetValue();
 }