private void btn_RE_save_des_Click(object sender, EventArgs e) { try { if (iApp.Check_Demo_Version()) { Save_FormRecord.Get_Demo_Data(this); } Set_Input_Data(); re_des.Loop_Program(); using (SaveFileDialog sfd = new SaveFileDialog()) { sfd.FileName = re_des.Report_File; sfd.Filter = "All Report Files(*.txt)|*.txt"; if (sfd.ShowDialog() != System.Windows.Forms.DialogResult.Cancel) { try { File.Copy(re_des.Report_File, sfd.FileName, true); File.Copy(re_des.Report_Table_File, Path.Combine(Path.GetDirectoryName(sfd.FileName), Path.GetFileName(re_des.Report_Table_File)), true); MessageBox.Show(this, "Report file created in " + sfd.FileName, "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); iApp.Save_Form_Record(this, Path.GetDirectoryName(sfd.FileName)); iApp.View_Result(sfd.FileName); } catch (Exception ex) { } } } } catch (Exception ex) { } }
private void btn_RE_process_Click(object sender, EventArgs e) { try { if (!Check_Project_Folder()) { return; } if (iApp.Check_Demo_Version()) { Save_FormRecord.Get_Demo_Data(this); } Save_FormRecord.Write_All_Data(this, Working_Folder); Set_Input_Data(); for (int i = 0; i < re_des.Layout_Sections.Count; i++) { try { re_des.Layout_Sections[i].Embedment_Depth = MyList.StringToDouble(dgv_RE_height_embedment[1, i].Value.ToString(), 0.43); } catch (Exception ex) { } } //re_des.Calculate_Program(); re_des.Loop_Program(); MessageBox.Show(this, "Report file created in " + re_des.Report_File + "\n\n and\n\n" + re_des.Report_Table_File, "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); frm_RE_wall_report f = new frm_RE_wall_report(iApp, false); f.Owner = this; f.ShowDialog(); if (f.Is_Details) { if (File.Exists(re_des.Report_File)) { iApp.View_Result(re_des.Report_File); } } else { if (File.Exists(re_des.Report_Table_File)) { iApp.View_Result(re_des.Report_Table_File); } } } catch (Exception ex) { } }
private void frm_RE_Wall_Load(object sender, EventArgs e) { dgv_tech_strip.Rows.Add(1, 20, 47, 11.08, 10.00); dgv_tech_strip.Rows.Add(2, 37.5, 49, 20.77, 18.88); dgv_tech_strip.Rows.Add(3, 50.0, 49, 27.69, 25.17); dgv_tech_strip.Rows.Add(4, 65.0, 49, 33.85, 30.77); txt_RE_L.Text = "3.1"; txt_RE_H.Text = "13.21"; Set_Project_Name(); //Chiranjit [2013 04 04] Save_FormRecord.Set_Demo_Data(this); iApp.Check_Demo_Version(); }
private void btn_process_Click(object sender, System.EventArgs e) { POT_PTFE_VERSO_BEARING_DESIGN vtmp = null; Button btn = sender as Button; if (iApp.Check_Demo_Version()) { Save_FormRecord.Get_Demo_Data(this); } if (btn.Name == btn_VMABT_process.Name) { Set_VMABT_Input_Data(); vtmp = VMABT; } else if (btn.Name == btn_VMABL_process.Name) { Set_VMABL_Input_Data(); vtmp = VMABL; } else if (btn.Name == btn_VBAB_process.Name) { Set_VBAB_Input_Data(); vtmp = VBAB; } else if (btn.Name == btn_VFB_process.Name) { Set_VFB_Input_Data(); vtmp = VFB; } if (vtmp != null) { vtmp.Generate_Report(); iApp.Save_Form_Record(this, user_path); MessageBox.Show(this, "Report file created in " + vtmp.Report_File, "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); iApp.View_Result(vtmp.Report_File); } }
private void frm_BearingDesign_Load(object sender, System.EventArgs e) { //Chiranjit [2013 03 30] Save_FormRecord.Set_Demo_Data(this); iApp.Check_Demo_Version(); #region Chiranjit Design Option try { eDesignOption edp = iApp.Get_Design_Option(Title); if (edp == eDesignOption.None) { this.Close(); } else if (edp == eDesignOption.Open_Design) { user_path = Path.Combine(iApp.LastDesignWorkingFolder, Title); iApp.Read_Form_Record(this, user_path); if (iApp.IsDemo) { MessageBox.Show("ASTRA USB Dongle not found at any port....\nOpening with default data......", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Data Loaded successfully.", "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception ex) { MessageBox.Show(this, "Input data file Error.."); } #endregion Chiranjit Design Option }
private void btn_open_save_design_Click(object sender, System.EventArgs e) { Button btn = sender as Button; if (iApp.Check_Demo_Version()) { Save_FormRecord.Get_Demo_Data(this); } POT_PTFE_VERSO_BEARING_DESIGN vtmp = null; if (btn.Name == btn_save_VMABT_des.Name) { Set_VMABT_Input_Data(); vtmp = VMABT; } else if (btn.Name == btn_save_VMABL_des.Name) { Set_VMABL_Input_Data(); vtmp = VMABL; } else if (btn.Name == btn_save_VBAB_des.Name) { Set_VBAB_Input_Data(); vtmp = VBAB; } else if (btn.Name == btn_save_VFB_des.Name) { Set_VFB_Input_Data(); vtmp = VFB; } if (vtmp != null) { vtmp.Generate_Report(); using (SaveFileDialog sfd = new SaveFileDialog()) { sfd.FileName = vtmp.BearingDesign.ToString(); sfd.Filter = "All Report Files(*.txt)|*.txt"; if (sfd.ShowDialog() != System.Windows.Forms.DialogResult.Cancel) { try { File.Copy(vtmp.Report_File, sfd.FileName, true); MessageBox.Show(this, "Report file created in " + sfd.FileName, "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); iApp.Save_Form_Record(this, Path.GetDirectoryName(sfd.FileName)); iApp.View_Result(sfd.FileName); } catch (Exception ex) { } } } } else if ((btn.Name == btn_open_VMABT_des.Name) || (btn.Name == btn_open_VBAB_des.Name) || (btn.Name == btn_open_VFB_des.Name) || (btn.Name == btn_open_VMABL_des.Name)) { using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.Filter = "All Report Files(*.txt)|*.txt"; if (ofd.ShowDialog() != System.Windows.Forms.DialogResult.Cancel) { try { iApp.Read_Form_Record(this, Path.GetDirectoryName(ofd.FileName)); MessageBox.Show(this, "Previous Design opened successfully. " + ofd.FileName, "ASTRA", MessageBoxButtons.OK, MessageBoxIcon.Information); //To do } catch (Exception ex) { } } } } }