Пример #1
0
        private void closeForm()
        {
            if (BoundariesPanel != null)
            {
                BoundariesPanel = null;
            }

            if (CensusPanel != null)
            {
                CensusPanel = null;
            }

            if (EmergencyPanel != null)
            {
                EmergencyPanel = null;
            }

            if (EnvironmentPanel != null)
            {
                EnvironmentPanel = null;
            }

            if (InfrastructPanel != null)
            {
                InfrastructPanel = null;
            }

            if (PhotoPanel != null)
            {
                PhotoPanel = null;
            }

            if (ServiceDistrictsPanel != null)
            {
                ServiceDistrictsPanel = null;
            }

            if (SoilsTopoPanel != null)
            {
                SoilsTopoPanel = null;
            }

            if (StructuresPanel != null)
            {
                StructuresPanel.Dispose();
            }

            if (TaxlotsPanel != null)
            {
                TaxlotsPanel = null;
            }

            if (TransportationPanel != null)
            {
                TransportationPanel = null;
            }

            if (WaterPanel != null)
            {
                WaterPanel = null;
            }

            if (ZoningPanel != null)
            {
                ZoningPanel = null;
            }

            if (UtilityPanel != null)
            {
                UtilityPanel = null;
            }

            if (EditorPanel != null)
            {
                EditorPanel = null;
            }

            if (MapServicePanel != null)
            {
                MapServicePanel = null;
            }


            //if (BoundariesPanel != null)
            //    BoundariesPanel.Dispose();

            //if (CensusPanel != null)
            //    CensusPanel.Dispose();

            //if (EmergencyPanel != null)
            //    EmergencyPanel.Dispose();

            //if (EnvironmentPanel != null)
            //    EnvironmentPanel.Dispose();

            //if (InfrastructPanel != null)
            //    InfrastructPanel.Dispose();

            //if (PhotoPanel != null)
            //    PhotoPanel.Dispose();

            //if (ServiceDistrictsPanel != null)
            //    ServiceDistrictsPanel.Dispose();

            //if (SoilsTopoPanel != null)
            //    SoilsTopoPanel.Dispose();

            //if (StructuresPanel != null)
            //    StructuresPanel.Dispose();

            //if (TaxlotsPanel != null)
            //    TaxlotsPanel.Dispose();

            //if (TransportationPanel != null)
            //    TransportationPanel.Dispose();

            //if (WaterPanel != null)
            //    WaterPanel.Dispose();

            //if (ZoningPanel != null)
            //    ZoningPanel.Dispose();

            //if (UtilityPanel != null)
            //    UtilityPanel.Dispose();

            //if (EditorPanel != null)
            //    EditorPanel.Dispose();

            //if (MapServicePanel != null)
            //    MapServicePanel.Dispose();


            string sTag = m_CurrentControl.Tag.ToString();

            try
            {
                CMedToolsSubs.writeRegKey(Microsoft.Win32.Registry.LocalMachine, "SOFTWARE\\City of Medford", "AddLayersTab", sTag);
            }
            catch
            {
                // just move on  ... don't throw an error
            }

            CAddLayers oAddLayers = new CAddLayers();

            oAddLayers.closeForm();

            reloadForm();
        }
Пример #2
0
        private void clearChecks()
        {
            ucBoundary BoundariesPanel = new ucBoundary();

            clearCheckBoxes(BoundariesPanel);
            BoundariesPanel = null;

            ucCensus CensusPanel = new ucCensus();

            clearCheckBoxes(CensusPanel);
            CensusPanel = null;

            ucEmergency EmergencyPanel = new ucEmergency();

            clearCheckBoxes(EmergencyPanel);
            EmergencyPanel = null;

            ucEnvironment EnvironmentPanel = new ucEnvironment();

            clearCheckBoxes(EnvironmentPanel);
            EnvironmentPanel = null;

            ucInfrastructure InfrastructPanel = new ucInfrastructure();

            clearCheckBoxes(InfrastructPanel);
            InfrastructPanel = null;

            ucPhoto PhotoPanel = new ucPhoto();

            clearCheckBoxes(PhotoPanel);
            PhotoPanel = null;

            ucServiceDistricts ServiceDistrictsPanel = new ucServiceDistricts();

            clearCheckBoxes(ServiceDistrictsPanel);
            ServiceDistrictsPanel = null;

            ucSoilsTopo SoilsTopoPanel = new ucSoilsTopo();

            clearCheckBoxes(SoilsTopoPanel);
            SoilsTopoPanel = null;

            ucStructures StructuresPanel = new ucStructures();

            clearCheckBoxes(StructuresPanel);
            StructuresPanel = null;

            ucTaxlots TaxlotsPanel = new ucTaxlots();

            clearCheckBoxes(TaxlotsPanel);
            TaxlotsPanel = null;

            ucTransportation TransportationPanel = new ucTransportation();

            clearCheckBoxes(TransportationPanel);
            TransportationPanel = null;

            ucWater WaterPanel = new ucWater();

            clearCheckBoxes(WaterPanel);
            WaterPanel = null;

            ucZoning ZoningPanel = new ucZoning();

            clearCheckBoxes(ZoningPanel);
            ZoningPanel = null;

            ucUtility UtilityPanel = new ucUtility();

            clearCheckBoxes(UtilityPanel);
            UtilityPanel = null;

            ucEditor EditorPanel = new ucEditor();

            clearCheckBoxes(EditorPanel);
            EditorPanel = null;

            ucMapService MapServicePanel = new ucMapService();

            clearCheckBoxes(MapServicePanel);
            MapServicePanel = null;
        }
Пример #3
0
        private Control returnNewControl(string pCurrentButtonTag)
        {
            Control pRetVal;

            switch (pCurrentButtonTag.ToUpper())
            {
            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCBOUNDARIES":
                if (BoundariesPanel == null)
                {
                    BoundariesPanel = new ucBoundary();
                }

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

                pRetVal = (Control)BoundariesPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCCENSUS":
                if (CensusPanel == null)
                {
                    CensusPanel = new ucCensus();
                }
                CensusPanel.Tag  = pCurrentButtonTag;
                CensusPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)CensusPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCEMERGENCY":

                if (EmergencyPanel == null)
                {
                    EmergencyPanel = new ucEmergency();
                }
                EmergencyPanel.Tag  = pCurrentButtonTag;
                EmergencyPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)EmergencyPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCENVIRONMENT":

                if (EnvironmentPanel == null)
                {
                    EnvironmentPanel = new ucEnvironment();
                }
                EnvironmentPanel.Tag  = pCurrentButtonTag;
                EnvironmentPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)EnvironmentPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCINFRASTRUCTURE":

                if (InfrastructPanel == null)
                {
                    InfrastructPanel = new ucInfrastructure();
                }
                InfrastructPanel.Tag  = pCurrentButtonTag;
                InfrastructPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)InfrastructPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCPHOTO":

                if (PhotoPanel == null)
                {
                    PhotoPanel = new ucPhoto();
                }
                PhotoPanel.Tag  = pCurrentButtonTag;
                PhotoPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)PhotoPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCSERVICEDISTRICTS":

                if (ServiceDistrictsPanel == null)
                {
                    ServiceDistrictsPanel = new ucServiceDistricts();
                }
                ServiceDistrictsPanel.Tag  = pCurrentButtonTag;
                ServiceDistrictsPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)ServiceDistrictsPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCSOILSTOPO":

                if (SoilsTopoPanel == null)
                {
                    SoilsTopoPanel = new ucSoilsTopo();
                }
                SoilsTopoPanel.Tag  = pCurrentButtonTag;
                SoilsTopoPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)SoilsTopoPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCSTRUCTURES":

                if (StructuresPanel == null)
                {
                    StructuresPanel = new ucStructures();
                }
                StructuresPanel.Tag  = pCurrentButtonTag;
                StructuresPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)StructuresPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCTAXLOTS":

                if (TaxlotsPanel == null)
                {
                    TaxlotsPanel = new ucTaxlots();
                }
                TaxlotsPanel.Tag  = pCurrentButtonTag;
                TaxlotsPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)TaxlotsPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCTRANSPORTATION":

                if (TransportationPanel == null)
                {
                    TransportationPanel = new ucTransportation();
                }
                TransportationPanel.Tag  = pCurrentButtonTag;
                TransportationPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)TransportationPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCWATER":

                if (WaterPanel == null)
                {
                    WaterPanel = new ucWater();
                }
                WaterPanel.Tag  = pCurrentButtonTag;
                WaterPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)WaterPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCZONING":

                if (ZoningPanel == null)
                {
                    ZoningPanel = new ucZoning();
                }
                ZoningPanel.Tag  = pCurrentButtonTag;
                ZoningPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)ZoningPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCUTILITY":

                if (UtilityPanel == null)
                {
                    UtilityPanel = new ucUtility();
                }
                UtilityPanel.Tag  = pCurrentButtonTag;
                UtilityPanel.Dock = DockStyle.Fill;

                pRetVal = (Control)UtilityPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCEDITOR":

                if (EditorPanel == null)
                {
                    EditorPanel = new ucEditor();
                }

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

                pRetVal = (Control)EditorPanel;
                break;

            case "MEDFORDTOOLSEXTENSION.ADDLAYER.UCMAPSERVICES":

                if (MapServicePanel == null)
                {
                    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;
                if (BoundariesPanel == null)
                {
                    BoundariesPanel = new ucBoundary();
                }

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

                pRetVal = (Control)BoundariesPanel;
                break;
            }

            return(pRetVal);
        }