private static void PrepareOutputArrays(ref CfrmMain frmMain) { CfrmMain main = frmMain; main.ProjectDatabase.RecordSource = "select * from [OutputInfo] where [Group]='G'"; main.ProjectDatabase.Refresh(); short recordCount = (short)main.ProjectDatabase.Recordset.RecordCount; OutGNames = new string[recordCount + 1]; FirstPosG = new short[(recordCount + 1) + 1]; ReadOutputNames(ref main.ProjectDatabase.Recordset, ref OutGNames, ref FirstPosG); SetSelAndPossible(ref main.ProjectDatabase.Recordset, ref FirstPosG, ref SelPosG, ref GPossible, ref frmMain); main.ProjectDatabase.RecordSource = "select * from OutputInfo where [Group]='X'"; main.ProjectDatabase.Refresh(); recordCount = (short)main.ProjectDatabase.Recordset.RecordCount; OutXNames = new string[recordCount + 1]; FirstPosX = new short[(recordCount + 1) + 1]; ReadOutputNames(ref main.ProjectDatabase.Recordset, ref OutXNames, ref FirstPosX); SetSelAndPossible(ref main.ProjectDatabase.Recordset, ref FirstPosX, ref SelPosX, ref XPossible, ref frmMain); main.ProjectDatabase.RecordSource = "select * from OutputInfo where [Group]='T'"; main.ProjectDatabase.Refresh(); recordCount = (short)main.ProjectDatabase.Recordset.RecordCount; OutTNames = new string[recordCount + 1]; FirstPosT = new short[(recordCount + 1) + 1]; ReadOutputNames(ref main.ProjectDatabase.Recordset, ref OutTNames, ref FirstPosT); SetSelAndPossible(ref main.ProjectDatabase.Recordset, ref FirstPosT, ref SelPosT, ref TPossible, ref frmMain); main.ProjectDatabase.RecordSource = "select * from OutputInfo where [Group]='D'"; main.ProjectDatabase.Refresh(); recordCount = (short)main.ProjectDatabase.Recordset.RecordCount; OutDNames = new string[recordCount + 1]; FirstPosD = new short[(recordCount + 1) + 1]; ReadOutputNames(ref main.ProjectDatabase.Recordset, ref OutDNames, ref FirstPosD); SetSelAndPossible(ref main.ProjectDatabase.Recordset, ref FirstPosD, ref SelPosD, ref DPossible, ref frmMain); main = null; }
public CAbout(ref CfrmMain frm) { base.Load += new EventHandler(this.Form63_Load); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.InitializeComponent(); this.frmMain = frm; }
public frmSUFICovariation(ref CfrmMain frm) { base.Load += new EventHandler(this.frmSUFICovariation_Load); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.InitializeComponent(); this.frmMain = frm; }
public frmRainfallDisagg(ref CfrmMain frm) { base.Load += new EventHandler(this.frmRainfallDisagg_Load); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.InitializeComponent(); this.frmMain = frm; }
public CfrmSaveAs(ref CfrmMain frm) { base.Activated += new EventHandler(this.frm_SaveAs_Activated); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.InitializeComponent(); this.frmMain = frm; }
public frmNewProject(ref CfrmMain frm) { base.Load += new EventHandler(this.frmNewProject_Load); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.InitializeComponent(); this.m_frmMain = frm; }
public frmNewSUFIIteration(ref CfrmMain frm) { base.Load += new EventHandler(this.frmNewSUFIIteration_Load); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.m_Combinations = new Collection(); this.InitializeComponent(); this.frmMain = frm; }
public frmBatch(ref CfrmMain frm) { base.Load += new EventHandler(this.frmBatch_Load); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.IsInitializing = true; this.InitializeComponent(); this.IsInitializing = false; this.frmMain = frm; }
public frmSetWeights(ref CfrmMain frm) { base.Activated += new EventHandler(this.frmSetWeights_Activated); base.Load += new EventHandler(this.frmSetWeights_Load); lock (__ENCList) { __ENCList.Add(new WeakReference(this)); } this.IsInitializing = true; this.InitializeComponent(); this.IsInitializing = false; this.frmMain = frm; this.m_pMyForm = new frmAggregateOutputs(ref this.frmMain.frmSUFIMain, frm.frmSUFIMain.SUFIProjID); }
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 static void PrepareParameterArrays(ref CfrmMain frmMain) { string str = ""; string str2 = ""; Recordset rs = new RecordsetClass(); Recordset recordset2 = new RecordsetClass(); CfrmMain main = frmMain; rs.Open("select * from ParameterInfo order by [Order]", frmMain.DatabaseConnection, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockPessimistic, -1); nparameter_names = (short)ReadSaveFunctions.RecordCount(ref rs); while (true) { int num6; bool flag = !rs.EOF; if (!flag) { rs.MoveFirst(); GlobalVariables.pname = new string[nparameter_names + 1]; GlobalVariables.FirstPos = new short[(nparameter_names + 1) + 1]; P = new float[nparameters + 1]; pgroup = new short[nparameter_names + 1]; plength = new short[nparameter_names + 1]; GlobalVariables.FirstPos[1] = 1; i = 1; short num8 = (short)ReadSaveFunctions.RecordCount(ref rs); i = 1; while (true) { short num4; short num14 = num8; if (i > num14) { GlobalVariables.FirstPos[i] = (short)(nparameters + 1); main = null; return; } GlobalVariables.pname[i] = Conversions.ToString(rs[]["ParameterName"][]);