Пример #1
0
        public static void Main(string[] args)
        {
//            var inputReader = new HardCodedInput();
//            var inputReader = new OctopusInput();
            var inputReader = new ArgumentsInput(args);

            new CacheInvalidatorProgram(inputReader).Execute();

            Console.ReadKey(true);
        }
Пример #2
0
 //ArgumentsInput 消息框
 public void MessageBox_ArgumentsInput(ArgumentsInput arguments, bool state)
 {
     arguments.message.IsActive = state;
 }
Пример #3
0
 //名称
 public void AddArguments(string Category, string ProductName, string ProductType, string ProductRemarks, ArgumentsInput arguments)
 {
     try
     {
         SQLiteConnection con = new SQLiteConnection(@"Data Source=SQL\GREE.db");
         con.Open();
         string sql = "INSERT INTO Template " +
                      "(machineTypeClass,machineTypeName,machineTypeNumber,machineTypeRemarks)" +
                      "VALUES('" + Category + "','" + ProductName + "','" + ProductType + "','" + ProductRemarks + "');";
         SQLiteCommand command = new SQLiteCommand(sql, con);
         command.ExecuteNonQuery();
         command.Dispose();
         con.Close();
         func.MessageBox_ArgumentsInput(arguments, true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }