示例#1
0
文件: Program.cs 项目: aaksn/2att
 static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         AllocConsole();
         ConsoleAppUtils.ParseArgs(args, out string inputFile, out string outputFile);
         UtilsW.ReadInputFromFile(inputFile, ' ', out int[,] res);
         try
         {
             Nine logic = new Nine(res);
             UtilsW.WriteInputIntoFile(outputFile, logic.Process());
         }
         catch (Exception except)
         {
             Console.WriteLine(except);
             Console.ReadKey();
         }
         FreeConsole();
     }
     else
     {
         FreeConsole();
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new Form1());
     }
 }
示例#2
0
文件: Form1.cs 项目: aaksn/2att
 private void Go_Click(object sender, EventArgs e)
 {
     try
     {
         int[,] arr2 = DataGridViewUtils.GridToArray2 <int>(arr2FromDataGridView);
         Nine logic = new Nine(arr2);
         DataGridViewUtils.ArrayToGrid(arr2ToDataGridView, logic.Process());
     }
     catch (Exception except)
     {
         FormsUtils.ErrorMessageBox(except);
     }
 }
示例#3
0
文件: Program.cs 项目: aaksn/2att
 static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         ConsoleAppUtils.ParseArgs(args, out string inputFile, out string outputFile);
         UtilsW.ReadInputFromFile(inputFile, ' ', out int[,] res);
         try
         {
             Nine logic = new Nine(res);
             UtilsW.WriteInputIntoFile(outputFile, logic.Process());
         }
         catch (Exception except)
         {
             Console.WriteLine(except);
             Console.ReadKey();
         }
     }
     else
     {
         Console.WriteLine("Аргументы командной строки не заданы");
         Console.ReadKey();
     }
 }