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(); }
private void buttonLoadFromfile_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog() == DialogResult.Cancel) { return; } mainWorkingList = UtilsIO2sem.ReadDoubleListFROMfile(openFileDialog.FileName); textBoxDisplay.Text = mainWorkingList.DoubleListToString(); }
private void buttonLoadFROMfile_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog() == DialogResult.Cancel) { return; } queueMain = UtilsIO2sem.ReadStringQueueFROMfile(openFileDialog.FileName); textBoxDisplay.Text = queueMain.QueueToOnestring(); }
private void buttonDeleteXnames_Click(object sender, EventArgs e) { try { UtilsIO2sem.RemoveXnames(queueMain, Convert.ToChar(textBoxEnterChar.Text)); textBoxDisplayRes.Text = queueMain.QueueToOnestring(); } catch { textBoxEnterChar.Clear(); } }
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); }