Пример #1
0
        public override void Run(object sender, System.EventArgs e)
        {
            try
            {
                FrmLayoutPage dialog  = new FrmLayoutPage();
                IMap2DView    mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView;
                if (mapView == null)
                {
                    return;
                }
                DF2DApplication app = DF2DApplication.Application;
                if (app == null || app.Current2DMapControl == null)
                {
                    return;
                }
                string            path = Config.GetConfigValue("2DMdbPipe");
                IWorkspaceFactory pWsF = new AccessWorkspaceFactory();
                IWorkspace        pWs  = pWsF.OpenFromFile(path, 0);

                if (pWs == null)
                {
                    return;
                }

                FrmStandardOutput sOutput = new FrmStandardOutput(pWs);

                sOutput.ShowDialog();

                if (sOutput.DialogResult == DialogResult.OK)
                {
                    this.DoSomething(sOutput, dialog);
                    dialog.Show();
                }
            }
            catch (System.Exception ex)
            {
                return;
            }
        }