예제 #1
0
        public FilterRuleResult Evaluate(TraceEvent evt)
        {
            if (!Pids.Contains(evt.ProcessID))
            {
                return(FilterRuleResult.Skip);
            }

            return(Include ? FilterRuleResult.Include : FilterRuleResult.Exclude);
        }
        protected override void OnTextChanged(EventArgs e)
        {
            if (linkText != null && linkText.Count > 0)
            {
                int p = this.SelectionStart;
                if (p > 0)
                {
                    Select(p - 1, 1);
                }
                if (GetSelectionLink() == 1)
                {
                    return;
                }
                SelectedRtf = "";
                if (!this.Rtf.Contains("\\v0"))
                {
                    currentText = "";
                    linkText.Clear();
                }
                if (linkText.Count > 0)                                          // Text.Length > linkText.Count)
                {
                    currentText = Text.Substring(Text.LastIndexOf("#Edit") + 5); //Text.Substring(Text.IndexOf(linkText[linkText.Keys[linkText.Count - 1].]) + linkText.Values[linkText.Count - 1].Lenght);
                }
                else
                {
                    currentText = "";
                }
            }
            else
            {
                currentText = Text;
            }

            IsEmail = IsFax = false;
            if (currentText.Trim().Length > 0 && SearchType)
            {
                if (Regex.IsMatch(currentText.Trim(), "([A-Za-z0-9]+([-+._][A-Za-z0-9]+)*@[A-Za-z0-9]+([-._][A-Za-z0-9]+)*.[A-Za-z]{2,})"))
                {
                    IsEmail = true;
                }
                else
                {
                    if (Regex.IsMatch(currentText.Trim().Replace(" ", ""), "^(\\+\\d|\\d).*\\d.*\\d"))
                    {
                        IsFax = true;
                    }
                }
            }
            else
            if (Pids != null)
            {
                Pids.Clear();
            }

            base.OnTextChanged(e);
        }
예제 #3
0
        private void UpdateAppListData(RzAppListDataProvider app)
        {
            Apps.Clear();
            Pids.Clear();
            CurrentApp = app.CurrentAppExecutable;
            for (int i = 0; i < app.AppCount; i++)
            {
                Apps.Add(app.GetExecutableName(i));
                Pids.Add(app.GetPid(i));
            }

            AppListUpdated?.Invoke(this, EventArgs.Empty);
        }
예제 #4
0
        public Nrsc5Layer1Decoder(float sampleRate)
        {
            //Create resampler and its buffer
            resampler = new ComplexResamplerPipeline(sampleRate, TARGET_SAMPLE_RATE, 2048 * 8, ProcessBlock);

            //Create compnents
            acquire = new Acquire();
            sync    = new Sync();
            decode  = new Decode();
            pids    = new Pids();
            frame   = new Frame();

            //Apply events
            pids.OnPidsFrame += Pids_OnPidsFrame;
            frame.OnAasFrame += Frame_OnAasFrame;
            frame.OnPduFrame += Frame_OnPduFrame;

            //Link components
            acquire.SetComponents(acquire, sync, decode, pids, frame);
            sync.SetComponents(acquire, sync, decode, pids, frame);
            decode.SetComponents(acquire, sync, decode, pids, frame);
            pids.SetComponents(acquire, sync, decode, pids, frame);
            frame.SetComponents(acquire, sync, decode, pids, frame);
        }