internal void InitialExportData(ClutterParameters[] cp) { int index = 0; foreach (DataRow row in base.Rows) { cp[index] = new ClutterParameters(row[this.ColumnCode], row[this.ColumnName], row[this.ColumnHeight], row[this.ColumnSpatial], row[this.ColumnPenitreitLoss], row[this.ColumnShadowStd], row[this.ColumnShadowCor], row[this.ColumnCINStandDev]); index++; } }
public void InitialData(ClutterParameters cps) { base.BeginLoadData(); DataRow row = base.NewRow(); row[this.ColumnCode] = cps.Code; row[this.ColumnName] = cps.ClutterName; row[this.ColumnHeight] = cps.Height; row[this.ColumnSpatial] = cps.SpatialMultiplex; row[this.ColumnPenitreitLoss] = cps.PenitreitLoss; row[this.ColumnShadowStd] = cps.ShadowStd; row[this.ColumnShadowCor] = cps.ShadowCor; row[this.ColumnCINStandDev] = cps.C_I_NStandDev; base.Rows.Add(row); base.EndLoadData(); }
private static void SaveOneTable(TableClutterParams tableClutterParams, out ClutterParameters[] parameters) { parameters = null; if (tableClutterParams != null) { parameters = new ClutterParameters[tableClutterParams.Rows.Count]; tableClutterParams.InitialExportData(parameters); } }
public static void Save(ClutterParamsForm clutterParamsForm, out ClutterParameters[] actualParams, out ClutterParameters[] defaultParams) { SaveOneTable(clutterParamsForm.ActualTableClutterParams, out actualParams); SaveOneTable(clutterParamsForm.DefaultTableClutterParams, out defaultParams); }
private static TableClutterParams LoadOneTable(ClutterParameters[] parameters) { if (parameters == null) { return null; } TableClutterParams param = new TableClutterParams(); foreach (ClutterParameters parameters2 in parameters) { param.InitialData(parameters2); } return param; }
private void ActualClutterParams_KeyDown(object sender, KeyEventArgs e) { if (this.JudgeProcessCtrlD(e)) { Dictionary<int, float> standardValueDictionary = this.GetStandardValueDictionary(); foreach (DataGridViewCell cell in this.dgvActualClutterParams.SelectedCells) { if (cell.ColumnIndex > 1) { cell.Value = standardValueDictionary[cell.ColumnIndex]; } } } if ((e.Control && (e.KeyCode == Keys.V)) && Clipboard.ContainsText()) { string text = Clipboard.GetText(); string[][] infos = null; if (this.TryParseText(text, ref infos)) { this.m_ActualTableClutterParams.Clear(); foreach (string[] strArray2 in infos) { ClutterParameters cps = new ClutterParameters(strArray2[0], strArray2[1], strArray2[2], strArray2[3], strArray2[4], strArray2[5], strArray2[6], strArray2[7]); this.m_ActualTableClutterParams.InitialData(cps); } this.iClutterParamsBindingSource.DataSource = this.m_ActualTableClutterParams.Clone(); this.btn_Apply.Enabled = true; } } }
public static void Load(ClutterParamsForm clutterParamsForm, ClutterParameters[] actualParams, ClutterParameters[] defaultParams) { clutterParamsForm.ActualTableClutterParams = LoadOneTable(actualParams); clutterParamsForm.DefaultTableClutterParams = LoadOneTable(defaultParams); }
private void RemoveAtSymbol(ClutterParameters[] parameters) { if (parameters != null) { for (int i = 0; i < parameters.Length; i++) { ClutterParameters parameters2 = parameters[i]; int index = parameters2.ClutterName.IndexOf("@"); if (index != -1) { parameters2.ClutterName = parameters2.ClutterName.Substring(index + 1); parameters[i] = parameters2; } } } }