コード例 #1
0
ファイル: FormMain.cs プロジェクト: InFly1/Att1
        private void buttonDoIt_Click(object sender, EventArgs e)
        {
            double a = 0;

            try
            {
                for (int i = 0; i < dataGridViewForInput.RowCount; i++)
                {
                    ResultOfMeasurement item = new ResultOfMeasurement();
                    mainList.Add(item);
                }

                a = Convert.ToDouble(textBoxInputA.Text);
                if (a == 0)
                {
                    throw new Exception();
                }

                UtilsIO2sem.ReadXvaluesFromGridView(dataGridViewForInput, mainList);
                mainList = UtilsIO2sem.CalcResultsOfpribor(mainList, a);
                UtilsIO2sem.WriteListOfMeasurementsToGridOutput(dataGridViewOutPut, mainList);
            }
            catch
            {
                textBoxInputA.Clear();
                label1.Text = "Введите А (число, не ноль)";
                mainList.Clear();
            }
            mainList.Clear();
        }
コード例 #2
0
 private void buttonLoadFromfile_Click(object sender, EventArgs e)
 {
     if (openFileDialog.ShowDialog() == DialogResult.Cancel)
     {
         return;
     }
     mainWorkingList     = UtilsIO2sem.ReadDoubleListFROMfile(openFileDialog.FileName);
     textBoxDisplay.Text = mainWorkingList.DoubleListToString();
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: InFly1/Att1
        private void buttonLoadFROMfile_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            queueMain = UtilsIO2sem.ReadStringQueueFROMfile(openFileDialog.FileName);

            textBoxDisplay.Text = queueMain.QueueToOnestring();
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: InFly1/Att1
 private void buttonDeleteXnames_Click(object sender, EventArgs e)
 {
     try
     {
         UtilsIO2sem.RemoveXnames(queueMain, Convert.ToChar(textBoxEnterChar.Text));
         textBoxDisplayRes.Text = queueMain.QueueToOnestring();
     }
     catch
     {
         textBoxEnterChar.Clear();
     }
 }
コード例 #5
0
        private void buttonDoTask_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            string openFilename = openFileDialog.FileName;

            if (saveFileDialog.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            writeFilename = saveFileDialog.FileName;
            UtilsIO2sem.DoStackTask(openFilename, writeFilename);
        }