public void btnRunB_Click(object sender, EventArgs e) { bool fileOpened = OpenOutFile(); bool check = AllFieldsFull(); if (check == true && fileOpened == true) { int selectedValueTipProiz, selectedValueKvalToch; selectedValueTipProiz = ((SelectData)this.comboTipProiz.SelectedItem).Value; selectedValueKvalToch = ((SelectData)this.comboKvalToch.SelectedItem).Value; string floatVal1, floatVal2; CultureInfo ci = new CultureInfo("en-US"); floatVal1 = Convert.ToSingle(txtGlubRez.Text, ci).ToString("0.00",ci); floatVal2 = Convert.ToSingle(txtPodRez.Text, ci).ToString("0.00",ci); string[] currFrmSlots = { "TipProiz:" + selectedValueTipProiz.ToString(), "KvalToch:" + selectedValueKvalToch.ToString(), "SkorRez:" + txtSkorRez.Text, "PodRez:" + floatVal2, "GlubRez:" + floatVal1, "VelPart:" + txtVelPart.Text }; _clips.AssertString("C_Dann2", currFrmSlots); _clips.Run(); PrimitiveValue rs = _clips.Evaluate("MAIN", "(close myData)"); string res = rs.ToString(); if (res == "TRUE") { Printout prn = new Printout(); string resTxt = Printout.Print(); txtPrintout.Text = resTxt; } } }
private void RunA_Click(object sender, EventArgs e) { if (txtDetMass.Text == "") { txtDetMass.Text = "0"; } if (txtGabDetV.Text == "") { txtGabDetV.Text = "0"; } bool fileOpened = OpenOutFile(); bool allChk = AllFieldsFull(); if (allChk == true && fileOpened == true) { int selectedValueDetTip, selectedValueZagMat, selectedValueSposPol; selectedValueDetTip = ((SelectData)this.comboDetTip.SelectedItem).Value; selectedValueZagMat = ((SelectData)this.comboZagMat.SelectedItem).Value; selectedValueSposPol = ((SelectData)this.comboDetTip.SelectedItem).Value; string[] currFrmSlots = { "DetName:" + txtDetName.Text, "GabDetSh:" + txtGabDetSh.Text, "GabDetDl:" + txtGabDetDl.Text, "GabDetV:" + txtGabDetV.Text, "DetTip:" + selectedValueDetTip.ToString(), "ZagMat:" + selectedValueZagMat.ToString(), "SposPol:" + selectedValueSposPol.ToString(), "ZagMass:" + txtZagMass.Text, "DetMass:" + txtDetMass.Text, "StanEm:" + txtStanEm.Text, "KolTexMod:" + txtKolTexMod.Text }; _clips.AssertString("A_Dann", currFrmSlots); _clips.Run(); PrimitiveValue rs = _clips.Evaluate("MAIN", "(close myData)"); string res = rs.ToString(); if (res == "TRUE") { Printout prn = new Printout(); string resTxt = Printout.Print(); txtPrintout.Text = resTxt; } } else { MessageBox.Show("Проверьте заполненность полей!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void RunC_Click(object sender, EventArgs e) { bool fileOpened = OpenOutFile(); bool check = AllFieldsFull(); if (check == true && fileOpened == true) { int selectedValueOpTip, selectedValuePrimSOJ; selectedValueOpTip = ((SelectData)this.comboOpTip.SelectedItem).Value; selectedValuePrimSOJ = ((SelectData)this.comboPrimSOJ.SelectedItem).Value; string[] currFrmSlots = { "KolUst:" + txtKolUst.Text, "OpTip:" + selectedValueOpTip.ToString(), "OpVr:" + txtOpVr.Text, "PrimSOJ:" + selectedValuePrimSOJ.ToString(), "Osnastka:" + txtOsnastka.Text, "Zahvat:" + txtZahvat.Text}; _clips.AssertString("D_Dann3", currFrmSlots); _clips.Run(); PrimitiveValue rs = _clips.Evaluate("MAIN", "(close myData)"); string res = rs.ToString(); if (res == "TRUE") { Printout prn = new Printout(); string resTxt = Printout.Print(); txtPrintout.Text = resTxt; } } else { MessageBox.Show("Проверьте заполненность полей!", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } }