public override void Run(object sender, EventArgs e) { mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } app = (DF2DApplication)this.Hook; if (app == null || app.Current2DMapControl == null) { return; } m_pMapControl = app.Current2DMapControl; FrmStatsByRoad2D frmStatsByRoad2D = new FrmStatsByRoad2D(this.CommandName, "Road"); if (frmStatsByRoad2D.ShowDialog() != DialogResult.OK) { return; } DataTable dt = frmStatsByRoad2D.DTTemp; DataTable dtstats = frmStatsByRoad2D.DTStats; FrmStatsByRoadOutput2D frmStatsByRoadOutput2D = new FrmStatsByRoadOutput2D(); frmStatsByRoadOutput2D.SetData(dt); frmStatsByRoadOutput2D.SetStatsData(dtstats); frmStatsByRoadOutput2D.Show(); }
public override void Run(object sender, EventArgs e) { FrmStatsByRoad2D dialog = new FrmStatsByRoad2D(); if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } }