Example #1
0
        private void FSensors_Load(object sender, EventArgs e)
        {
            if (!DesignMode)
            {
                L_WindowLPars.CurrentWins.LoadFormRect(this);
            }
            bConfirm.Visible = false;
            bConfirm.Enabled = false;
            bCancel.Visible  = false;
            bCancel.Enabled  = false;
            needRecalc       = false;
            if (RK.ST.cDef(Tp).Zone == null)
            {
                return;
            }
            Zone z = RK.ST.cDef(Tp).result.MZone[0];

            for (int i = 0; i < z.MSensor.Length; i++)
            {
                USensor p = new USensor();
                p.OnStep       += new UCalibr.DOnStep(p_OnStep);
                p.OnCalibrate  += new USensor.DOnCalibrate(p_OnCalibrate);
                p.OnGain       += new USensor.DOnGain(p_OnGain);
                p.CalibrVisible = false;
                L.Add(p);
                Controls.Add(p);
            }
            RResize();
            SetGainsFromPars();
            Draw();
            NeedRecalc = false;
        }
Example #2
0
        public void Init(EUnit _Tp, DOnRecalc _OnRecalc)
        {
            Tp       = _Tp;
            OnRecalc = _OnRecalc;
            if (RK.ST.cDef(Tp).Zone == null)
            {
                return;
            }
            H = ParAll.ST.Defect.Some.SensorHeight;
            Zone z = RK.ST.cDef(Tp).result.MZone[0];

            for (int i = 0; i < z.MSensor.Length; i++)
            {
                USensor p = new USensor();
                p.OnStep       += new UCalibr.DOnStep(p_OnStep);
                p.OnCalibrate  += new USensor.DOnCalibrate(p_OnCalibrate);
                p.OnGain       += new USensor.DOnGain(p_OnGain);
                p.CalibrVisible = false;
                p.IsWheel       = false;
                p.CanFocused    = true;
                L.Add(p);
                Controls.Add(p);
            }
            RResize();
            ResizeCharts();
            SetGainsFromPars();
            IsScroll = true;
        }