Пример #1
0
        private void loadEditForm(Control ctl)
        {
            ucEditor ucEdit = (ucEditor)ctl;

            ucEdit.App = this.App;

            ucEdit.CloseForm      = new CloseDelegate(this.closeForm);
            ucEdit.CloseViewerApp = new CloseApp(this.closeApp);
            ucEdit.loadForm();
        }
Пример #2
0
        private void checkEditor(ToolStripButton tsb)
        {
            if (tsb.Text.ToUpper() == "EDITORS")
            {
                Control  p_NewControl = returnNewControl(tsb.Tag.ToString());
                ucEditor ucEdit       = (ucEditor)p_NewControl;
                ucEdit.App = this.App;

                ucEdit.CloseForm      = new CloseDelegate(this.closeForm);
                ucEdit.CloseViewerApp = new CloseApp(this.closeApp);
                ucEdit.loadForm();
            }
        }
Пример #3
0
        private Control returnNewControl(string pCurrentButtonTag)
        {
            Control pRetVal;

            switch (pCurrentButtonTag.ToUpper())
            {
            case "CoM_GISTools.ADDLAYER.UCBOUNDARIES":
                ucBoundary BoundariesPanel = new ucBoundary();

                BoundariesPanel.Tag  = pCurrentButtonTag;
                BoundariesPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)BoundariesPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCCENSUS":
                ucCensus CensusPanel = new ucCensus();
                CensusPanel.Tag  = pCurrentButtonTag;
                CensusPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)CensusPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCEMERGENCY":
                ucEmergency EmergencyPanel = new ucEmergency();
                EmergencyPanel.Tag  = pCurrentButtonTag;
                EmergencyPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)EmergencyPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCENVIRONMENT":
                ucEnvironment EnvironmentPanel = new ucEnvironment();
                EnvironmentPanel.Tag  = pCurrentButtonTag;
                EnvironmentPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)EnvironmentPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCINFRASTRUCTURE":
                ucInfrastructure InfrastructPanel = new ucInfrastructure();
                InfrastructPanel.Tag  = pCurrentButtonTag;
                InfrastructPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)InfrastructPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCPHOTO":
                ucPhoto PhotoPanel = new ucPhoto();
                PhotoPanel.Tag  = pCurrentButtonTag;
                PhotoPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)PhotoPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCSERVICEDISTRICTS":
                ucServiceDistricts ServiceDistrictsPanel = new ucServiceDistricts();
                ServiceDistrictsPanel.Tag  = pCurrentButtonTag;
                ServiceDistrictsPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)ServiceDistrictsPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCSOILSTOPO":
                ucSoilsTopo SoilsTopoPanel = new ucSoilsTopo();
                SoilsTopoPanel.Tag  = pCurrentButtonTag;
                SoilsTopoPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)SoilsTopoPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCSTRUCTURES":
                ucStructures StructuresPanel = new ucStructures();
                StructuresPanel.Tag  = pCurrentButtonTag;
                StructuresPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)StructuresPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCTAXLOTS":
                ucTaxlots TaxlotsPanel = new ucTaxlots();
                TaxlotsPanel.Tag  = pCurrentButtonTag;
                TaxlotsPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)TaxlotsPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCTRANSPORTATION":
                ucTransportation TransportationPanel = new ucTransportation();
                TransportationPanel.Tag  = pCurrentButtonTag;
                TransportationPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)TransportationPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCWATER":
                ucWater WaterPanel = new ucWater();
                WaterPanel.Tag  = pCurrentButtonTag;
                WaterPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)WaterPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCZONING":
                ucZoning ZoningPanel = new ucZoning();
                ZoningPanel.Tag  = pCurrentButtonTag;
                ZoningPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)ZoningPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCUTILITY":
                ucUtility UtilityPanel = new ucUtility();
                UtilityPanel.Tag  = pCurrentButtonTag;
                UtilityPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)UtilityPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCEDITOR":
                ucEditor EditorPanel = new ucEditor();

                EditorPanel.Tag  = pCurrentButtonTag;
                EditorPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)EditorPanel;
                break;

            case "CoM_GISTools.ADDLAYER.UCMAPSERVICES":
                ucMapService MapServicePanel = new ucMapService();

                MapServicePanel.Tag  = pCurrentButtonTag;
                MapServicePanel.Dock = DockStyle.Fill;

                pRetVal = (Control)MapServicePanel;
                break;

            default:
                //ucBoundaries defaultPanel = new ucBoundaries();
                ucBoundary defaultPanel = new ucBoundary();

                defaultPanel.Tag  = pCurrentButtonTag;
                defaultPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)defaultPanel;
                break;
            }

            return(pRetVal);
        }