Example #1
0
        public void FillTest()
        {
            // 测试用例1
            SmartForm.Fill((Control.ControlCollection)null, (object)null);
            // 测试用例2
            object s0 = new object();

            SmartForm.Fill((Control.ControlCollection)null, s0);
            // 测试用例3
            Control.ControlCollection controlCollection;
            controlCollection = new Control.ControlCollection((Control)null);
            SmartForm.Fill(controlCollection, s0);
        }
        private void FormFirePBrigade_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增专业森林消防队";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑专业森林消防队";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看专业森林消防队";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 专业森林防火队状态 */
            FirePBrigadeStatus firePBrigateStatus     = FirePBrigadeStatus.优秀;
            List <object>      firePBrigateStatusList = CommonHelper.GetDataSource <FirePBrigadeStatus>(firePBrigateStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Name";
            this.cbx_status.DataSource    = firePBrigateStatusList;

            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_FirePBrigade.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_FirePBrigade.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_FirePBrigade.latitude;
                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_FirePBrigade);

                this.tbx_note.Text            = this.m_FirePBrigade.note;
                this.mediaControl1.MediaFiles = this.m_FirePBrigade.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;
                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.tbx_note.Enabled = false;
                    this.mediaControl1.MainToolStrip.Visible = false;
                }
            }
            #endregion
        }
Example #3
0
        private void FormFireForestBelt_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增森林防火物资储备库";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑森林防火物资储备库";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看森林防火物资储备库";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 防火物资储备库类型 */
            WarehouseType warehouseType         = WarehouseType.国家级物质储备库;
            List <object> warningBoardsTypeList = CommonHelper.GetDataSource <WarehouseType>(warehouseType);
            this.cmb_type.DisplayMember = "Name";
            this.cmb_type.ValueMember   = "Name";
            this.cmb_type.DataSource    = warningBoardsTypeList;

            /* 防火物资储备库状态 */
            WarehouseStatus warehouseStatus     = WarehouseStatus.优秀;
            List <object>   warehouseStatusList = CommonHelper.GetDataSource <WarehouseStatus>(warehouseStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Name";
            this.cbx_status.DataSource    = warehouseStatusList;

            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_Warehouse.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_Warehouse.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_Warehouse.latitude;
                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_Warehouse);

                this.tbx_note.Text            = this.m_Warehouse.note;
                this.mediaControl1.MediaFiles = this.m_Warehouse.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;
                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.tbx_note.Enabled = false;
                }
            }
            #endregion
        }
Example #4
0
        private void FormWatchTower_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增瞭望台";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑瞭望台";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看瞭望台";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 瞭望台类型 */
            WatchTowerType watchTowerType     = WatchTowerType.铁质了望台;
            List <object>  watchTowerTypeList = CommonHelper.GetDataSource <WatchTowerType>(watchTowerType);
            this.cbx_type.DisplayMember = "Name";
            this.cbx_type.ValueMember   = "Name";
            this.cbx_type.DataSource    = watchTowerTypeList;

            /* 瞭望台状态 */
            WatchTowerStatus watchTowerStatus     = WatchTowerStatus.优秀;
            List <object>    watchTowerStatusList = CommonHelper.GetDataSource <WatchTowerStatus>(watchTowerStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Value";
            this.cbx_status.DataSource    = watchTowerStatusList;

            /* 瞭望台结构 */
            WatchTowerStructure watchTowerStructure     = WatchTowerStructure.一层;
            List <object>       watchTowerStructureList = CommonHelper.GetDataSource <WatchTowerStructure>(watchTowerStructure);
            this.cbx_structure.DisplayMember = "Name";
            this.cbx_structure.ValueMember   = "Name";
            this.cbx_structure.DataSource    = watchTowerStructureList;

            /* 瞭望台修建单位 */
            WatchTowerBuildUnit watchTowerBuildUnit     = WatchTowerBuildUnit.林业局;
            List <object>       watchTowerBuildUnitList = CommonHelper.GetDataSource <WatchTowerBuildUnit>(watchTowerBuildUnit);
            this.cbx_build_unit.DisplayMember = "Name";
            this.cbx_build_unit.ValueMember   = "Name";
            this.cbx_build_unit.DataSource    = watchTowerBuildUnitList;


            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_WatchTower.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_WatchTower.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_WatchTower.latitude;
                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_WatchTower);

                this.tbx_note.Text            = this.m_WatchTower.note;
                this.mediaControl1.MediaFiles = this.m_WatchTower.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;
                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);
                    this.tbx_note.Enabled = false;

                    this.mediaControl1.MainToolStrip.Visible = false;
                }
            }
            #endregion
        }
Example #5
0
        private void FormFireDocument_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增火灾档案";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑火灾档案";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看火灾档案";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 坡位 */
            FireDocumentSlopePosition fireDSlopePosition     = FireDocumentSlopePosition.山脊;
            List <object>             fireDSlopePositionList = CommonHelper.GetDataSource <FireDocumentSlopePosition>(fireDSlopePosition);
            this.cbx_slope_position.DisplayMember = "Name";
            this.cbx_slope_position.ValueMember   = "Name";
            this.cbx_slope_position.DataSource    = fireDSlopePositionList;

            /* 是否已处理 */
            IsDealWith    isDealWith     = IsDealWith.否;
            List <object> isDealWithList = CommonHelper.GetDataSource <IsDealWith>(isDealWith);
            this.cbx_IsDealWith.DisplayMember = "Name";
            this.cbx_IsDealWith.ValueMember   = "Value";
            this.cbx_IsDealWith.DataSource    = isDealWithList;
            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_FireDocument.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = (this.m_FireDocument.longitude == null)?0:(double)this.m_FireDocument.longitude;
                this.coordinatesInputControl1.Latitude  = (this.m_FireDocument.latitude == null) ? 0 : (double)this.m_FireDocument.latitude;
                this.tbx_town_name.Text    = (this.m_FireDocument.town_name == null)?"":this.m_FireDocument.town_name;
                this.tbx_village_name.Text = (this.m_FireDocument.village_name == null) ? "" : this.m_FireDocument.village_name;
                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_FireDocument);

                this.tbx_description.Text     = this.m_FireDocument.description;
                this.mediaControl1.MediaFiles = this.m_FireDocument.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;
                    this.tbx_town_name.Enabled            = false;
                    this.tbx_village_name.Enabled         = false;

                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.tbx_description.Enabled = false;
                }
            }
            #endregion
        }
Example #6
0
        private void FormFireForestBelt_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增飞机吊桶取水点";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑飞机吊桶取水点";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看飞机吊桶取水点";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 飞机吊桶取水点状态 */
            PWType        firePWType     = PWType.水库;
            List <object> firePWTypeList = CommonHelper.GetDataSource <PWType>(firePWType);
            this.cbx_Type.DisplayMember = "Name";
            this.cbx_Type.ValueMember   = "Name";
            this.cbx_Type.DataSource    = firePWTypeList;

            /* 飞机吊桶取水点状态 */
            PWStatus      firePWStatus     = PWStatus.优秀;
            List <object> firePWStatusList = CommonHelper.GetDataSource <PWStatus>(firePWStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Name";
            this.cbx_status.DataSource    = firePWStatusList;

            /* 飞机吊桶取水点有无电线索道 */
            PWIsCableway  isCableway     = PWIsCableway.是;
            List <object> isCablewayList = CommonHelper.GetDataSource <PWIsCableway>(isCableway);
            this.cbx_is_cableway.DisplayMember = "Name";
            this.cbx_is_cableway.ValueMember   = "Name";
            this.cbx_is_cableway.DataSource    = isCablewayList;

            /* 航飞机吊桶取水点能否吊桶取水 */
            PWIsTakeWater isTakeWater     = PWIsTakeWater.是;
            List <object> isTakeWaterList = CommonHelper.GetDataSource <PWIsTakeWater>(isTakeWater);
            this.cbx_is_take_water.DisplayMember = "Name";
            this.cbx_is_take_water.ValueMember   = "Name";
            this.cbx_is_take_water.DataSource    = isTakeWaterList;

            /* 航飞机吊桶取水点是否有网箱养鱼 */
            PWIsCageFish  isCageFish     = PWIsCageFish.是;
            List <object> isCageFishList = CommonHelper.GetDataSource <PWIsCageFish>(isCageFish);
            this.cbx_is_cage_fish.DisplayMember = "Name";
            this.cbx_is_cage_fish.ValueMember   = "Name";
            this.cbx_is_cage_fish.DataSource    = isCageFishList;
            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_Planewaterpoint.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_Planewaterpoint.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_Planewaterpoint.latitude;
                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_Planewaterpoint);

                this.tbx_note.Text            = this.m_Planewaterpoint.note;
                this.mediaControl1.MediaFiles = this.m_Planewaterpoint.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;
                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.tbx_note.Enabled = false;

                    this.mediaControl1.MainToolStrip.Visible = false;
                }
            }
            #endregion
        }
Example #7
0
        private void FormArtificiallake_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增航空灭火蓄水池";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑航空灭火蓄水池";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看航空灭火蓄水池";
                this.mediaControl1.MainToolStrip.Visible = false;
            }



            /* 航空灭火蓄水池状态 */
            ArtificiallakeStatus artificiallakeStatus     = ArtificiallakeStatus.优秀;
            List <object>        artificiallakeStatusList = CommonHelper.GetDataSource <ArtificiallakeStatus>(artificiallakeStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Value";
            this.cbx_status.DataSource    = artificiallakeStatusList;

            /* 航空灭火蓄水池有无电线索道 */
            ArtificiallakeIsCableway isCableway     = ArtificiallakeIsCableway.是;
            List <object>            isCablewayList = CommonHelper.GetDataSource <ArtificiallakeIsCableway>(isCableway);
            this.cbx_isCableway.DisplayMember = "Name";
            this.cbx_isCableway.ValueMember   = "Name";
            this.cbx_isCableway.DataSource    = isCablewayList;

            /* 航空灭火蓄水池能否吊桶取水 */
            ArtificiallakeIsTakeWater isTakeWater     = ArtificiallakeIsTakeWater.是;
            List <object>             isTakeWaterList = CommonHelper.GetDataSource <ArtificiallakeIsTakeWater>(isTakeWater);
            this.cbx_isTakeWater.DisplayMember = "Name";
            this.cbx_isTakeWater.ValueMember   = "Name";
            this.cbx_isTakeWater.DataSource    = isTakeWaterList;

            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_Artificiallake.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_Artificiallake.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_Artificiallake.latitude;

                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_Artificiallake);

                this.tbx_note.Text            = this.m_Artificiallake.note;
                this.mediaControl1.MediaFiles = this.m_Artificiallake.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;

                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.mediaControl1.MainToolStrip.Visible = false;

                    this.tbx_note.Enabled = false;
                }
            }
            #endregion
        }
Example #8
0
        private void FormFireOffice_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增森林防火办公室";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑森林防火办公室";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看森林防火办公室";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 森林防火办公室状态 */
            FireOfficeStatus fireOfficeStatus     = FireOfficeStatus.优秀;
            List <object>    fireOfficeStatusList = CommonHelper.GetDataSource <FireOfficeStatus>(fireOfficeStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Name";
            this.cbx_status.DataSource    = fireOfficeStatusList;

            /* 森林防火办公室类型 */
            FireOfficeType fireOfficeType     = FireOfficeType.防火指挥部;
            List <object>  fireOfficeTypeList = CommonHelper.GetDataSource <FireOfficeType>(fireOfficeType);
            this.cbx_type.DisplayMember = "Name";
            this.cbx_type.ValueMember   = "Name";
            this.cbx_type.DataSource    = fireOfficeTypeList;

            /* 森林防火办公室级别 */
            FireOfficeLevel fireOfficeLevel     = FireOfficeLevel.省级;
            List <object>   fireOfficeLevelList = CommonHelper.GetDataSource <FireOfficeLevel>(fireOfficeLevel);
            this.cbx_level.DisplayMember = "Name";
            this.cbx_level.ValueMember   = "Name";
            this.cbx_level.DataSource    = fireOfficeLevelList;

            /* 森林防火办公室机构编制 */
            FireOfficeInstitutions fireOfficeInstitutions     = FireOfficeInstitutions.行政;
            List <object>          fireOfficeInstitutionsList = CommonHelper.GetDataSource <FireOfficeInstitutions>(fireOfficeInstitutions);
            this.cbx_institutions.DisplayMember = "Name";
            this.cbx_institutions.ValueMember   = "Name";
            this.cbx_institutions.DataSource    = fireOfficeLevelList;

            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_FireOffice.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_FireOffice.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_FireOffice.latitude;
                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_FireOffice);

                this.tbx_note.Text            = this.m_FireOffice.note;
                this.mediaControl1.MediaFiles = this.m_FireOffice.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;
                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.tbx_note.Enabled = false;

                    this.mediaControl1.MainToolStrip.Visible = false;
                }
            }
            #endregion
        }
Example #9
0
        private void FormRadioStation_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增无线电台站";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑无线电台站";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看无线电台站";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 瞭望台状态 */
            RadioStationStatus radioStationStatus   = RadioStationStatus.优秀;
            List <object>      watchTowerStatusList = CommonHelper.GetDataSource <RadioStationStatus>(radioStationStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Value";
            this.cbx_status.DataSource    = watchTowerStatusList;


            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_RadioStation.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_RadioStation.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_RadioStation.latitude;

                //窗体自动赋值
                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_RadioStation);

                this.tbx_note.Text            = this.m_RadioStation.note;
                this.mediaControl1.MediaFiles = this.m_RadioStation.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;

                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.tbx_note.Enabled = false;

                    this.mediaControl1.MainToolStrip.Visible = false;
                }
            }
            #endregion
        }
Example #10
0
        private void FormArtificiallake_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增林区危险及重要设施";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑林区危险及重要设施";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看林区危险及重要设施";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 林区危险及重要性设备设施状态 */
            DFacilitiesStatus dFacilitiesStatus     = DFacilitiesStatus.优秀;
            List <object>     dFacilitiesStatusList = CommonHelper.GetDataSource <DFacilitiesStatus>(dFacilitiesStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Value";
            this.cbx_status.DataSource    = dFacilitiesStatusList;

            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_DangerousFacilities.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_DangerousFacilities.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_DangerousFacilities.latitude;

                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_DangerousFacilities);

                this.mediaControl1.MediaFiles = this.m_DangerousFacilities.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;

                    this.mediaControl1.MainToolStrip.Visible = false;

                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);
                }
            }
            #endregion
        }
Example #11
0
        private void FormFireForestBelt_Load(object sender, EventArgs e)
        {
            #region 初始化控件内容

            if (m_OperationType == OperationType.Add)
            {
                this.Text = "新增防护林带";
            }
            else if (m_OperationType == OperationType.Edit)
            {
                this.Text = "编辑防护林带";
                this.mediaControl1.IsMultiselect = false;
            }
            else if (m_OperationType == OperationType.Check)
            {
                this.Text = "查看防护林带";
                this.mediaControl1.MainToolStrip.Visible = false;
            }

            /* 防护林带营造单位 */
            FireForestBeltBuildUnit fireForestBeltBuildUnit     = FireForestBeltBuildUnit.林业局;
            List <object>           fireForestBeltBuildUnitList = CommonHelper.GetDataSource <FireForestBeltBuildUnit>(fireForestBeltBuildUnit);
            this.cbx_build_unit.DisplayMember = "Name";
            this.cbx_build_unit.ValueMember   = "Name";
            this.cbx_build_unit.DataSource    = fireForestBeltBuildUnitList;

            /* 防护林带放火林带 */
            FireForestBeltType fireForestBeltType     = FireForestBeltType.主防火林带;
            List <object>      fireForestBeltTypeList = CommonHelper.GetDataSource <FireForestBeltType>(fireForestBeltType);
            this.cbx_type.DisplayMember = "Name";
            this.cbx_type.ValueMember   = "Name";
            this.cbx_type.DataSource    = fireForestBeltTypeList;

            /* 防护林带营造位置 */
            FireForestBeltBuildAddr fireForestBeltBuildAddr     = FireForestBeltBuildAddr.边境防火林带;
            List <object>           fireForestBeltBuildAddrList = CommonHelper.GetDataSource <FireForestBeltBuildAddr>(fireForestBeltBuildAddr);
            this.cbx_build_addr.DisplayMember = "Name";
            this.cbx_build_addr.ValueMember   = "Name";
            this.cbx_build_addr.DataSource    = fireForestBeltBuildAddrList;


            /* 防护林带状态 */
            FireForestBeltStatus fireForestBeltStatus     = FireForestBeltStatus.优秀;
            List <object>        fireForestBeltStatusList = CommonHelper.GetDataSource <FireForestBeltStatus>(fireForestBeltStatus);
            this.cbx_status.DisplayMember = "Name";
            this.cbx_status.ValueMember   = "Value";
            this.cbx_status.DataSource    = fireForestBeltStatusList;


            #endregion

            #region 初始化行政区信息
            if (m_OperationType == OperationType.Add)
            {
                this.pacControl11.Init();
            }
            else if (m_OperationType == OperationType.Edit || m_OperationType == OperationType.Check)
            {
                this.pacControl11.Init(this.m_FireForestBelt.pac);
            }

            #endregion

            #region 编辑查看时为控件赋值
            if (this.m_OperationType == OperationType.Edit || this.m_OperationType == OperationType.Check)
            {
                this.coordinatesInputControl1.Longitude = this.m_FireForestBelt.longitude;
                this.coordinatesInputControl1.Latitude  = this.m_FireForestBelt.latitude;

                SmartForm.Fill(this.tabPage_baseInfo.Controls, this.m_FireForestBelt);

                this.tbx_note.Text            = this.m_FireForestBelt.note;
                this.mediaControl1.MediaFiles = this.m_FireForestBelt.mediaFiles;

                if (this.m_OperationType == OperationType.Check)
                {
                    this.btnOK.Enabled  = false;
                    this.btnCancel.Text = "关闭(&C)";

                    this.coordinatesInputControl1.Enabled = false;
                    this.pacControl11.Enabled             = false;

                    SmartForm.SetControlsEnabled(this.tabPage_baseInfo.Controls, null);

                    this.tbx_note.Enabled = false;

                    this.mediaControl1.MainToolStrip.Visible = false;
                }
            }
            #endregion
        }