public void ReadParameters(ref AxMSFlexGrid grid, ref string fname, ref double startdate) { this.m_Parameters.Init(ref 1); short fileNumber = (short)FileSystem.FreeFile(); short index = 1; while (true) { this.m_Parameters.set_p10(index, Conversions.ToSingle(grid.get_TextMatrix(index, 1))); index = (short)(index + 1); short num4 = 8; if (index > num4) { index = 1; while (true) { this.m_Parameters.set_p01(index, Conversions.ToSingle(grid.get_TextMatrix(index, 2))); index = (short)(index + 1); num4 = 8; if (index > num4) { index = 1; while (true) { this.m_Parameters.set_pxx(index, Conversions.ToSingle(grid.get_TextMatrix(index, 3))); index = (short)(index + 1); num4 = 8; if (index > num4) { this.m_RainfallSeries.Add(ref ""); FileSystem.FileOpen(fileNumber, fname, OpenMode.Binary, OpenAccess.Default, OpenShare.Default, -1); this.m_RainfallSeries[1].ReadRainfallFromBinFile(ref fileNumber, ref startdate); FileSystem.FileClose(new int[] { fileNumber }); return; } } } } } } }
public int ComputeNumberOfSims() { AxMSFlexGrid grdParameters = this.grdParameters; int num = 1; short num3 = (short)(grdParameters.Rows - 1); short row = 1; while (true) { short num4 = num3; if (row > num4) { grdParameters = null; return(num); } if (!Versioned.IsNumeric(grdParameters.get_TextMatrix(row, 3))) { grdParameters.set_TextMatrix(row, 3, Conversions.ToString(1)); } num *= Conversions.ToShort(grdParameters.get_TextMatrix(row, 3)); row = (short)(row + 1); } }
private void MSFlexGrid1_KeyPressEvent(object eventSender, DMSFlexGridEvents_KeyPressEvent eventArgs) { AxMSFlexGrid grid = this.MSFlexGrid1; if (!this.m_InGrid & (eventArgs.keyAscii != 13)) { grid.set_TextMatrix(grid.Row, grid.Col, ""); } this.m_InGrid = true; if ((grid.Col > 0) & (grid.Row > 0)) { if (eventArgs.keyAscii != 8) { if (eventArgs.keyAscii != 13) { grid.set_TextMatrix(grid.Row, grid.Col, grid.get_TextMatrix(grid.Row, grid.Col) + Conversions.ToString(Strings.Chr(eventArgs.keyAscii))); } else { if (grid.Row != (grid.Rows - 1)) { grid.Row++; } return; } } else { if (Strings.Len(grid.get_TextMatrix(grid.Row, grid.Col)) > 0) { grid.set_TextMatrix(grid.Row, grid.Col, Strings.Left(grid.get_TextMatrix(grid.Row, grid.Col), Strings.Len(grid.get_TextMatrix(grid.Row, grid.Col)) - 1)); } return; } } grid = null; }