Exemple #1
0
        /// <summary>
        /// 开始禁止判峰
        /// </summary>
        private string StartInterdictPeak()
        {
            int    idx      = Math.Abs(GetPeakIndex());
            string operates = "";
            string operate  = "";

            if (SelectedPeak != null && SelectedPeak.PeakState == Peak.PeakStates.ps_noise)
            {
                operate = PeakProcessor.AddPeak(_list, idx);
                if (operate != "")
                {
                    operates += operate;
                }
            }
            operate = BaselineCrossOperate(this.FrontIndexOf(idx));
            if (operate != "")
            {
                operates += operate;
            }
            operate = PeakProcessor.DisableCheckPeak(_list, idx);
            if (operate != "")
            {
                operates += operate;
            }
            _interdictindex = idx;
            return(operates);
        }
Exemple #2
0
        /// <summary>
        /// 结束禁止判峰
        /// </summary>
        private string EndInterdictPeak()
        {
            int    idx      = Math.Abs(GetPeakIndex());
            string operate  = "";
            string operates = "";

            operate = BaselineCrossOperate(this.BackIndexOf(idx));
            if (operate != "")
            {
                operates += operate;
            }
            for (int i = idx; i >= _interdictindex; i--)
            {
                if (_interdictindex == -1)
                {
                    continue;
                }
                if (_list[i].PeakState == Peak.PeakStates.ps_noise)
                {
                    operate = PeakProcessor.AddPeak(_list, i);
                    if (operate != "")
                    {
                        operates += operate;
                    }
                }
                if (_list[i].PeakState == Peak.PeakStates.ps_natural)
                {
                    operate = PeakProcessor.DisableCheckPeak(_list, i);
                    if (operate != "")
                    {
                        operates += operate;
                    }
                }
            }

            return(operates);
        }