Example #1
0
        public AnalyzerPage()
        {
            InitializeComponent();

            foreach (var group in groups)
            {
                ModeComboBox.Items.Add(group.Title);
                group.OnUpdate += Group_OnUpdate;
            }

            mySegmentControl = new SegmentControl(myVisibleSegment);
            ContainerSegmentControl.Child = mySegmentControl;

            myActiveSegment.OnChange  += MyActiveSegment_OnChange;
            myVisibleSegment.OnChange += MyVisibleSegment_OnChange;

            mySegmentControl.SetLeftFilter(left => mySignal == null ? string.Empty : $"Left Frequency: {GetFrequency(true)}");
            mySegmentControl.SetRightFilter(right => mySignal == null ? string.Empty : $"Right Frequency: {GetFrequency(false)}");

            LoadSettings();

            if (CountPerPage.Value != null)
            {
                RecalculateHeight((int)CountPerPage.Value);
            }
        }
        public OscillogramsPage()
        {
            InitializeComponent();
            mySegmentControl = new SegmentControl(mySegment);
            ContainerSegmentControl.Child = mySegmentControl;

            mySegmentControl.SetLeftFilter(left =>
            {
                if (mySignal == null)
                {
                    return(string.Empty);
                }
                var beginTime = mySignal.GetDateTimeAtIndex(left).ToString("dd-MM-yyyy hh\\:mm\\:ss");
                return($"Begin Time: {beginTime}");
            });
            mySegmentControl.SetRightFilter(right =>
            {
                if (mySignal == null)
                {
                    return(string.Empty);
                }
                var endTime = mySignal.GetDateTimeAtIndex(right).ToString("dd-MM-yyyy hh\\:mm\\:ss");
                return($"End Time: {endTime}");
            });

            mySegment.OnChange += MySegment_OnChange;

            var scaleItems = new (string, RoutedEventHandler)[]