static void Main() { String[] arguments = Environment.GetCommandLineArgs(); if (arguments.Contains("/c")) { string sSrc = ""; string sOut = ""; string sApp = ""; foreach (string arg in arguments) { if (arg.Length > 4 && arg.Substring(0, 4).ToLower() == "/src") { sSrc = getValue(arg); } if (arg.Length > 4 && arg.Substring(0, 4).ToLower() == "/app") { sApp = getValue(arg); } if (arg.Length > 5 && arg.Substring(0, 5).ToLower() == "/dest") { sOut = getValue(arg); } } if (sSrc.Length == 0 || sOut.Length == 0 || sApp.Length == 0) { Console.WriteLine("Error in inputs"); return; } if (validateFile(sSrc) == false || validatePath(sOut) == false) { Console.WriteLine("Path or Source not valid"); return; } CAQ.CreateCAQ(sSrc, sOut, sApp); Console.WriteLine("CAQ File Created"); } else { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } }
private void button3_Click(object sender, EventArgs e) { CAQ.CreateCAQ(textBox1.Text, textBox2.Text, txtAppName.Text); }