示例#1
0
 private void Form2_Load(object sender, EventArgs e)
 {
     DataGridViewUtils.InitGridForArr(InDGV, 30, false, true, true, true, true);
     DataGridViewUtils.InitGridForArr(OutDGV, 30, true, true, true, true, true);
     inputOpenFileDialog.InitialDirectory  = Task2_BL.IOUtils.ExeDir;
     inputSaveFileDialog.InitialDirectory  = Task2_BL.IOUtils.ExeDir;
     outputSaveFileDialog.InitialDirectory = Task2_BL.IOUtils.ExeDir;
 }
示例#2
0
 private void ReadButton_Click(object sender, EventArgs e)
 {
     if (inputOpenFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             io.Text = io.ReadFromFile(inputOpenFileDialog.FileName);
             DataGridViewUtils.ArrayToGrid(InDGV, io.Text);
         }
         catch (Exception except)
         {
             FormsUtils.ErrorMessageBox(except);
         }
     }
 }
示例#3
0
 private void SortButton_Click(object sender, EventArgs e)
 {
     int[] arr    = DataGridViewUtils.GridToArray <int>(InDGV);
     int[] sorted = io.CompressSort(arr);
     DataGridViewUtils.ArrayToGrid(OutDGV, sorted);
 }