private async void button1_Click(object sender, EventArgs e) { PointPairList list = new PointPairList(); for (double x = -50; x < 50; x += 0.01) { list.Add(x, f(x)); } double R = double.Parse(textR.Text); double Tw = double.Parse(textTw.Text); double Ck = double.Parse(textCk.Text); double Lk = double.Parse(textLk.Text); double Rk = double.Parse(textRk.Text); double Uc0 = double.Parse(textUc0.Text); double I0 = double.Parse(textI0.Text); double L0 = double.Parse(textL0.Text); // work with steps double Tbegin = double.Parse(textTbeg.Text); double Tend = double.Parse(textTend.Text); double Tstep = double.Parse(textTstep.Text); ResearchConfiguration config = new ResearchConfiguration(R, Tw, Ck * 1e-6, Lk * 1e-6, Rk, Uc0, I0, L0); config.setTimeTable(Tbegin, Tend, Tstep); config = Research.computeResult(config); string xTitle = "t, микросекунды"; string yTitle = "I, A"; string tableName = "Зависимость силы тока от времени"; drawGraph1(zedGraph1, config.list1, xTitle, yTitle, tableName); xTitle = "t, микросекунды"; yTitle = "U, B"; tableName = "Зависимость напряжения от времени"; drawGraph1(zedGraph2, config.list2, xTitle, yTitle, tableName); xTitle = "t, микросекунды"; yTitle = "I * Rp, A"; tableName = "Доп График"; drawGraph1(zedGraph3, config.list3, xTitle, yTitle, tableName); xTitle = "t, микросекунды"; yTitle = "I * Rp, A"; tableName = "Напряжение на лампе"; drawGraph1(zedGraph4, config.list4, xTitle, yTitle, tableName); }
private Configuration() { AssetsConfiguration = new AssetsConfiguration(); ResearchConfiguration = new ResearchConfiguration(); ExecutionConfiguration = new ExecutionConfiguration(); }