private void Command2_Click(object eventSender, EventArgs eventArgs) { if (Strings.Len(this.Text2.Text) == 0) { MiscFUncs.MsgBox_Renamed("Enter project description", 0, ""); this.Text2.Focus(); } else if (Strings.Len(this.Text1.Text) == 0) { MiscFUncs.MsgBox_Renamed("Enter Run_name", 0, ""); this.Text1.Focus(); } else { Cursor.Current = Cursors.WaitCursor; string text = this.Text2.Text; string expression = this.Text4.Text; GlobalVariables.Run_name = this.Text1.Text; if (Strings.Len(expression) == 0) { expression = "No run-description"; } this.Hide(); this.IDCANCEL = false; this.frmMain.Refresh(); ReadSaveFunctions.SaveToDatabase(ref text, ref expression, ref GlobalVariables.project_name, ref GlobalVariables.ProjectIDno, ref true, ref this.frmMain); GlobalVariables.Run_dscrpt = expression; Cursor.Current = Cursors.Default; this.frmMain.Text = "Project: " + GlobalVariables.project_name + @" \ Simulation: " + GlobalVariables.Run_name; GlobalVariables.New_Project = false; this.frmMain.mnuToolsChangeParameters.Enabled = true; } }
private void Command1_Click(object eventSender, EventArgs eventArgs) { if ((Strings.Len(this.m_InputFile) == 0) | (Strings.Len(this.m_OutputFile) == 0)) { MiscFUncs.MsgBox_Renamed("Please specify the necessary files", 0x30, "File missing"); } else { this.DoDisaggregation(); MiscFUncs.MsgBox_Renamed("Disaggregation ready", 0, ""); } }
private void cmdSetWeightManual_Click(object eventSender, EventArgs eventArgs) { if (!Versioned.IsNumeric(this.txtWeight.Text) | !Versioned.IsNumeric(this.txtVarNo.Text)) { MiscFUncs.MsgBox_Renamed("Not a number", 0x30, "Not a number"); } else { this.m_TempWeights[Conversions.ToInteger(this.txtVarNo.Text)] = Conversions.ToSingle(this.txtWeight.Text); this.DisplayWeights(); this.lblWeightSum.Text = Support.Format(Conversions.ToString(this.ComputeWeightSum()), "#.###", FirstDayOfWeek.Sunday, FirstWeekOfYear.Jan1); } }
private void Command2_Click(object eventSender, EventArgs eventArgs) { this.Text1.Text = Strings.Trim(this.Text1.Text); if (this.Text1.Text == "") { MiscFUncs.MsgBox_Renamed("Please enter a name for the project", 0x30, ""); this.Text1.Focus(); } else { GlobalVariables.project_name = this.Text1.Text; GlobalVariables.Project_dscrpt = this.Text2.Text; Cursor.Current = Cursors.WaitCursor; this.Refresh(); ReadSaveFunctions.ReadOptions(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadRun_ID(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadSite(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadSetup(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadIBcond(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadPhysicalParms(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadIrrigation(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadSoilProfile(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadSolute(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadCrop(ref 1, ref this.m_frmMain); ReadSaveFunctions.ReadOutput(ref 1, ref this.m_frmMain); Cursor.Current = Cursors.Default; this.m_frmMain.Editera.Enabled = true; this.m_frmMain.SaveProject.Enabled = true; this.m_frmMain.SaveAs.Enabled = true; this.m_frmMain.SaveToparameterFileToolStripMenuItem.Enabled = true; this.m_frmMain.current.Enabled = true; this.m_frmMain.NewProject.Enabled = true; this.m_frmMain.Text = "Project: " + GlobalVariables.project_name + " Simulation: " + GlobalVariables.Run_name; this.m_frmMain.mnuToolsChangeParameters.Enabled = true; GlobalVariables.Rainfall_file = MyProject.Application.Info.DirectoryPath + @"\" + GlobalVariables.Rainfall_file; GlobalVariables.Met_file = MyProject.Application.Info.DirectoryPath + @"\" + GlobalVariables.Met_file; GlobalVariables.TensionFile = MyProject.Application.Info.DirectoryPath + @"\" + GlobalVariables.TensionFile; GlobalVariables.Driving_file = MyProject.Application.Info.DirectoryPath + @"\" + GlobalVariables.Driving_file; CfrmMain frmMain = this.m_frmMain; frmMain.InitMyForms(); frmMain.frmParameters.ShowAll(); frmMain.OutputForm.Show(); frmMain.OutputForm.Hide(); frmMain.OutputForm.SaveOutputs(); frmMain = null; this.Hide(); } }
private void cmdDisaggregate_Click() { this.DoDisaggregation(); MiscFUncs.MsgBox_Renamed("Disaggregation ready", 0, ""); }