public void Init() { this.m_mapTemplateJoinTableElement = null; this.listView2.Items.Clear(); bool flag = false; int num = 0; while (num < this.m_MapTemplate.MapTemplateElement.Count) { if (this.m_MapTemplate.MapTemplateElement[num].MapTemplateElementType == MapTemplateElementType.JoinTableElement) { flag = true; this.panelJTB.Tag = this.m_MapTemplate.MapTemplateElement[num]; this.m_mapTemplateJoinTableElement = this.m_MapTemplate.MapTemplateElement[num] as MapTemplateJoinTableElement; break; } num++; } this.panelJTB.Enabled = flag; string[] items = new string[2]; for (num = 0; num < this.m_MapTemplate.MapTemplateParam.Count; num++) { MapTemplateParam param = this.m_MapTemplate.MapTemplateParam[num]; items[0] = param.Name; items[1] = ""; ListViewItem item = new ListViewItem(items) { Tag = param }; this.listView2.Items.Add(item); } }
public bool Apply() { this.ApplyJTB(this.txtJTB1.Text, 1); this.ApplyJTB(this.txtJTB2.Text, 2); this.ApplyJTB(this.txtJTB3.Text, 3); this.ApplyJTB(this.txtJTB4.Text, 4); this.ApplyJTB(this.txtJTB6.Text, 6); this.ApplyJTB(this.txtJTB7.Text, 7); this.ApplyJTB(this.txtJTB8.Text, 8); this.ApplyJTB(this.txtJTB9.Text, 9); for (int i = 0; i < this.listView2.Items.Count; i++) { ListViewItem item = this.listView2.Items[i]; if (item.Tag != null) { MapTemplateParam tag = item.Tag as MapTemplateParam; tag.Value = item.SubItems[1].Text; } } return(true); }
private void btnNext_Click(object sender, EventArgs e) { switch (this._wizardStep) { case 0: if (!this.IsInputTF) { if (!this.mapTemplateList.Apply()) { return; } this.mapTemplateList.Visible = false; if (this.FixDataRange) { this.mapTemplateParamPage.CartoTemplateData = this.mapTemplateList.SelectCartoTemplateData; this.mapTemplateParamPage.Visible = true; this.mapTemplateParamPage.Init(); this.btnNext.Text = "完成"; } else { this.mapTemplateParamPage.CartoTemplateData = this.mapTemplateList.SelectCartoTemplateData; this.mapTemplateParamPage.Visible = true; this.mapTemplateParamPage.Init(); } break; } if (!this.mapCoordinatePage.CanApply()) { return; } this.mapCoordinatePage.Visible = false; this.mapCoordinatePage.Apply(); this.mapTemplateList.Visible = true; break; case 1: if (!this.FixDataRange) { if (this.IsInputTF) { if (!this.mapTemplateList.Apply()) { return; } this.mapTemplateList.Visible = false; MapTemplateParam param = this.mapTemplateList.SelectCartoTemplateData.FindParamByName("图号"); if (param != null) { param.Value = this.mapTemplateApplyHelp.MapNo; } this.mapTemplateParamPage.CartoTemplateData = this.mapTemplateList.SelectCartoTemplateData; this.mapTemplateParamPage.Visible = true; this.mapTemplateParamPage.Init(); this.btnNext.Text = "完成"; } else { this.mapTemplateParamPage.Visible = false; this.mapTemplateParamPage.Apply(); this.mapCoordinateInputPage.Visible = true; this.btnNext.Text = "完成"; } break; } this.mapTemplateParamPage.Visible = false; this.mapTemplateParamPage.Apply(); base.DialogResult = DialogResult.OK; break; case 2: if (!this.IsInputTF) { this.mapCoordinateInputPage.Apply(); base.DialogResult = DialogResult.OK; break; } this.mapTemplateParamPage.Apply(); base.DialogResult = DialogResult.OK; break; case 3: base.DialogResult = DialogResult.OK; return; } this._wizardStep++; }