示例#1
0
        public void SetChan(List <ClassChanpara> chanPara)
        {
            lastpa     = false;
            lastcouple = false;
            detectionmode.painfolist.Clear();
            treechan.Clear();
            PADetectioninfo     painfo;
            CoupleDetectioninfo coupleinfo;
            int i = 0;

            this.chanPara = chanPara;

            for (i = 0; i < chanPara.Count; i++)
            {
                if (chanPara[i].zonetype == (int)ZoneType.Couple)
                {
                    coupleinfo = new CoupleDetectioninfo(chanPara[i]);
                    detectionmode.coupleinfolist.Add(coupleinfo);
                }
                else
                {
                    painfo = new PADetectioninfo(chanPara[i]);
                    detectionmode.painfolist.Add(painfo);
                }
                treechan.Add(chanPara[i].name, i);
            }

            SetTree();
        }
示例#2
0
 public void UpdateSelectPAChannel(PADetectioninfo painfo)
 {
     bdelayBox.Text    = Convert.ToString(Math.Round(painfo.delay, 2));
     brangeBox.Text    = Convert.ToString(Math.Round(painfo.range, 2));
     bcalibraBox.Text  = Convert.ToString(painfo.carlibrawave * 100);
     balarmBox.Text    = Convert.ToString(painfo.alarmwave * 100);
     bsuppressBox.Text = Convert.ToString(painfo.supwave * 100);
     bdisplayBox.Text  = Convert.ToString(painfo.displaywave * 100);
     if (painfo.strip)
     {
         bstrip.CheckState = CheckState.Checked;
     }
     else
     {
         bstrip.CheckState = CheckState.Unchecked;
     }
     if (painfo.bscan)
     {
         bscan.CheckState = CheckState.Checked;
     }
     else
     {
         bscan.CheckState = CheckState.Unchecked;
     }
     if (painfo.coupling)
     {
         bcoupling.CheckState = CheckState.Checked;
     }
     else
     {
         bcoupling.CheckState = CheckState.Unchecked;
     }
 }
示例#3
0
        public void ConfirmPAchan()
        {
            PADetectioninfo painfo = new PADetectioninfo(chanPara[curchanum]);

            painfo.delay        = Convert.ToDouble(bdelayBox.Text);
            painfo.range        = Convert.ToDouble(brangeBox.Text);
            painfo.carlibrawave = Convert.ToDouble(bcalibraBox.Text) / 100;
            painfo.alarmwave    = Convert.ToDouble(balarmBox.Text) / 100;
            painfo.supwave      = Convert.ToDouble(bsuppressBox.Text) / 100;
            painfo.displaywave  = Convert.ToDouble(bdisplayBox.Text) / 100;
            if (bstrip.CheckState == CheckState.Checked)
            {
                painfo.strip = true;
            }
            else
            {
                painfo.strip = false;
            }
            if (bscan.CheckState == CheckState.Checked)
            {
                painfo.bscan = true;
            }
            else
            {
                painfo.bscan = false;
            }
            if (bcoupling.CheckState == CheckState.Checked)
            {
                painfo.coupling = true;
            }
            else
            {
                painfo.coupling = false;
            }

            if (checkBoxBatchSet.CheckState == CheckState.Checked)
            {
                for (int i = 0; i < detectionmode.painfolist.Count; i++)
                {
                    detectionmode.painfolist[i].delay        = painfo.delay;
                    detectionmode.painfolist[i].range        = painfo.range;
                    detectionmode.painfolist[i].carlibrawave = painfo.carlibrawave;
                    detectionmode.painfolist[i].alarmwave    = painfo.alarmwave;
                    detectionmode.painfolist[i].supwave      = painfo.supwave;
                    detectionmode.painfolist[i].displaywave  = painfo.displaywave;
                    detectionmode.painfolist[i].strip        = painfo.strip;
                    detectionmode.painfolist[i].bscan        = painfo.bscan;
                    detectionmode.painfolist[i].coupling     = painfo.coupling;
                }
            }
            else
            {
                detectionmode.painfolist[curchanum] = painfo;
            }
        }