private void btnPreview_Click(object sender, EventArgs e) { A_DPic_Welcom dpicWelcom = new A_DPic_Welcom(frmMain); dpicWelcom.Show(); this.Close(); }
void btn_Click(object sender, EventArgs e) { try { trvDiv.Nodes.Clear(); dmc.ButtonClick(((Button)sender).Parent.Name); if (dpicbll.ExitsFileName(((Button)sender).Text)) { tsmiClose_Click(this, new EventArgs()); OpenFile(((Button)sender).Text, (DataGridView)((Button)sender).Parent.Controls[1]); this.NowBtn = (Button)sender; this.NowDgv = (DataGridView)((Button)sender).Parent.Controls[1]; ReFlashDivDt(); this.NowDgv.DataSource = DivDt; for (int i = 0; i < NowDgv.Rows.Count; i++) { ((DataGridViewCheckBoxCell)NowDgv.Rows[i].Cells[0]).Value = ((DataGridViewCheckBoxCell)NowDgv.Rows[i].Cells[0]).TrueValue; } this.NowFileName = ((Button)sender).Text; } else { this.NowBtn = (Button)sender; this.NowDgv = (DataGridView)((Button)sender).Parent.Controls[1]; ReFlashDivDt(); InitConfigXml(); ntbMin.Text = txtMin.Text; ntbMax.Text = txtMax.Text; XmlNode node = ConfigXml.SelectSingleNode("//Map"); if (node != null) { if (node.Attributes.Count > 0) { node.Attributes["MinWidth"].Value = txtMin.Text; node.Attributes["MaxWidth"].Value = txtMax.Text; } else { XmlAttribute attribute = ConfigXml.CreateAttribute("MinWidth"); attribute.Value = txtMin.Text; node.Attributes.Append(attribute); attribute = ConfigXml.CreateAttribute("MaxWidth"); attribute.Value = txtMax.Text; node.Attributes.Append(attribute); } } else { XmlNode newnode = ConfigXml.CreateElement("Map"); XmlAttribute attribute = ConfigXml.CreateAttribute("MinWidth"); attribute.Value = txtMin.Text; newnode.Attributes.Append(attribute); attribute = ConfigXml.CreateAttribute("MaxWidth"); attribute.Value = txtMax.Text; newnode.Attributes.Append(attribute); RootNode.AppendChild(newnode); } MapGis.ClearAllStatic(); MapGis.ClearAllStation(); MapGis.FilterDivList.Clear(); MapGis.ClearMap(); MapGis.FlashAll(); } } catch (Exception ex) { } if (System.IO.File.Exists(Application.StartupPath + "\\MapGis\\AutoShowWizard.txt")) { if (System.IO.File.ReadAllText(Application.StartupPath + "\\MapGis\\AutoShowWizard.txt").IndexOf("true") >= 0) { A_DPic_Welcom adpic_welcom = new A_DPic_Welcom(this); adpic_welcom.Show(); } } }
private void btn_Wizard_Click(object sender, EventArgs e) { A_DPic_Welcom adpic_welcom = new A_DPic_Welcom(this); adpic_welcom.Show(); }