예제 #1
0
        public PreWarningRulesPanel()
        {
            InitializeComponent();
            toolStripFilter.Enabled = false;
            toolStripFilter.Visible = false;
            InitFilterCombo();

            FarpointDefaultPropertiesSetter.SetFpDefaultProperties(fpRules, "", 1);

            #region Farpoint自动过滤功能

            //初始化需要过滤功能的列
            _filterColunmIdxs = new[]
            {
                1,
                2,
                3,
                4,
                5,
                7,
                8
            };
            //禁用选择颜色相关控件
            farpointFilter1.EnableChooseColorCtrls(false);
            //设置自动隐藏过滤条件
            FarpointDefaultPropertiesSetter.SetFpFilterHideProperties(fpRules, _filterColunmIdxs);

            #endregion
        }
예제 #2
0
        //****************************************

        /// <summary>
        ///     构造方法
        /// </summary>
        public TunnelHChuanManagement()
        {
            InitializeComponent();

            //分页委托
            dataPager1.FrmChild_EventHandler += FrmParent_EventHandler;

            //窗体属性设置
            FormDefaultPropertiesSetter.SetManagementFormDefaultProperties(this, Const_GM.TUNNEL_HCHUAN_MANAGEMENT);

            //Farpoint属性设置
            FarpointDefaultPropertiesSetter.SetFpDefaultProperties(fpDayReportHChuan,
                                                                   Const_GM.TUNNEL_HCHUAN_FARPOINT_TITLE, _rowDetailStartIndex);

            _filterColunmIdxs = new[]
            {
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                11,
                12,
                13
            };
            //禁用选择颜色相关控件
            farpointFilter1.EnableChooseColorCtrls(false);
            //设置自动隐藏过滤条件
            FarpointDefaultPropertiesSetter.SetFpFilterHideProperties(fpDayReportHChuan, _filterColunmIdxs);
        }
예제 #3
0
        /** 处理标志位 **/

        public GasConcentrationProbeDataManamement()
        {
            InitializeComponent();

            //分配用户权限
            if (CurrentUser.CurLoginUserInfo.Permission != Permission.管理员.ToString())
            {
                btnAdd.Visible    = false;
                btnUpdate.Visible = false;
                btnDelete.Visible = false;
                selectTunnelUserControl1.SetButtonEnable(false);
            }

            // 设置窗体默认属性
            FormDefaultPropertiesSetter.SetManagementFormDefaultProperties(this,
                                                                           Const_GE.MANAGE_GAS_CONCENTRATION_PROBE_DATA);

            // 设置Farpoint默认属性
            FarpointDefaultPropertiesSetter.SetFpDefaultProperties(fpGasConcentrationProbeDataInfo,
                                                                   Const_GE.MANAGE_GAS_CONCENTRATION_PROBE_DATA, _iRowDetailStartIndex);

            // 设置日期控件格式
            _dateTimeStart.Format       = DateTimePickerFormat.Custom;
            _dateTimeStart.CustomFormat = Const.DATE_FORMART_YYYY_MM_DD;
            _dateTimeEnd.Format         = DateTimePickerFormat.Custom;
            _dateTimeEnd.CustomFormat   = Const.DATE_FORMART_YYYY_MM_DD;

            // 设置日期默认值(当天的0点到24点)
            var todayStart = DateTime.Now.ToString("yyyy/MM/dd") + " " + "00:00:00";
            var todayEnd   = DateTime.Now.ToString("yyyy/MM/dd") + " " + "23:59:59";

            _dateTimeStart.Value = Convert.ToDateTime(todayStart);
            _dateTimeEnd.Value   = Convert.ToDateTime(todayEnd);

            // 调用选择巷道控件时需要调用的方法
            selectTunnelUserControl1.LoadData();

            // 注册委托事件
            //selectTunnelUserControl1.TunnelNameChanged +=
            //    InheritTunnelNameChanged;

            // 调用委托方法 (必须实装)
            dataPager1.FrmChild_EventHandler += FrmParent_EventHandler;

            // 设置farpoint默认行数
            fpGasConcentrationProbeDataInfo.Sheets[0].Rows.Count = _iRowDetailStartIndex;

            #region Farpoint自动过滤功能

            //初始化需要过滤功能的列
            _filterColunmIdxs = new[]
            {
                2,
                5,
                6,
                7,
                12,
                13,
                14,
                15,
                16
            };
            //禁用选择颜色相关控件
            farpointFilter1.EnableChooseColorCtrls(false);
            //设置自动隐藏过滤条件
            FarpointDefaultPropertiesSetter.SetFpFilterHideProperties(fpGasConcentrationProbeDataInfo, _filterColunmIdxs);

            #endregion
        }