Esempio n. 1
0
        private static void ThemeBrushPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            BufferPresenter sender = obj as BufferPresenter;

            sender.border.BorderBrush = sender.ThemeBrush;
            sender.DataBuffer_BufferChanged(sender, new EventArgs());
        }
Esempio n. 2
0
        private static void DataBufferPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
        {
            BufferPresenter     sender   = obj as BufferPresenter;
            RingBuffer <double> oldvalue = args.OldValue as RingBuffer <double>;

            if (oldvalue != null)
            {
                oldvalue.BufferChanged -= sender.DataBuffer_BufferChanged;
            }
            if (sender.DataBuffer != null)
            {
                sender.DataBuffer.BufferChanged += sender.DataBuffer_BufferChanged;
            }
        }