Ejemplo n.º 1
0
        public MainFormGe(BarButtonItem mniAbout)
        {
            EnableDeleteAndModifyBtn = true;
            this.mniAbout            = mniAbout;
            InitializeComponent();
            SocketUtil.DoInitilization();

            var fp = new FileProperties(configFileName);

            int    iValue;
            double dValue;

            int.TryParse(fp.Get("countperframe"), out iValue);
            DataCountPerFrame = iValue;
            int.TryParse(fp.Get("updatefrequency"), out iValue);
            _updateFrequency = iValue;
            double.TryParse(fp.Get("redthreshold"), out dValue);
            RedDataThreshold = dValue;
            double.TryParse(fp.Get("yellowthreshold"), out dValue);
            YellowDataThreshold = dValue;
            double.TryParse(fp.Get("baddatathreshold"), out dValue);
            BadDataThreshold = dValue;

            dateTimeStart.Text = DateTime.Now.ToString("yyyy-MM-dd") + @" 00:00:00";
            dateTimeEnd.Text   = DateTime.Now.ToString("yyyy-MM-dd") + @" 23:59:59";
            DataBindUtil.LoadProbeType(lstProbeType);
        }
Ejemplo n.º 2
0
        private void selectTunnelSimple1_Load(object sender, EventArgs e)
        {
            DataBindUtil.LoadProbeType(cboProbeType);
            if (Probe == null)
            {
                return;
            }
            // 探头编号
            txtProbeId.Text = Probe.ProbeId;
            // 探头编号不可修改
            txtProbeId.Enabled = false;

            // 探头名称
            cmbProbeName.Text = Probe.ProbeName;

            // 探头类型
            cboProbeType.SelectedValue = Probe.ProbeType != null ? Probe.ProbeType.ProbeTypeId : 0;

            // 是否自动位移
            if (Probe.IsMove == 1)
            {
                rbtnYes.Checked = true;

                // 距迎头距离
                txtM.Text    = Probe.FarFromFrontal.ToString(CultureInfo.InvariantCulture);
                txtM.Enabled = true;
            }
            else
            {
                rbtnNo.Checked = true;
            }

            // 探头描述
            txtProbeDescription.Text = Probe.ProbeDescription;

            // 所在巷道绑定
            if (Probe.Tunnel != null)
            {
                selectTunnelSimple1.SetTunnel(Probe.Tunnel);
            }
        }