Пример #1
0
        /// <summary>
        /// 指针时间刷新指针位置
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnAxisTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            VideoStateAxisControl AxisOb = d as VideoStateAxisControl;

            if (AxisOb != null && e.NewValue != e.OldValue)
            {
                AxisOb.RefreshTimeLineLeft((DateTime)e.NewValue);
            }
        }
Пример #2
0
        /// <summary>
        /// 历史查询时间 - 改变
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            VideoStateAxisControl AxisOb = d as VideoStateAxisControl;

            if (AxisOb != null)
            {
                AxisOb.InitializeAxis();
            }
        }
Пример #3
0
        /// <summary>
        /// 剪辑开启控制源改变事件
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnClipOffChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            VideoStateAxisControl AxisOb = d as VideoStateAxisControl;

            if (AxisOb != null && e.NewValue != e.OldValue)
            {
                AxisOb.ClipOff            = (bool)e.NewValue;
                AxisOb._clipOff.IsChecked = ((bool)e.NewValue) ? true : false;
            }
        }
Пример #4
0
        /// <summary>
        /// 历史视频来源 - 改变
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnHistoryVideoSourcesChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            VideoStateAxisControl AxisOb = d as VideoStateAxisControl;

            if (AxisOb.HisVideoSources != null && AxisOb.HisVideoSources.Count() > 0)
            {
                AxisOb.InitializeAxis();
            }
            AxisOb.HisVideoSources.CollectionChanged += (s, o) =>
            {
                AxisOb.AddHisPie();
                AxisOb.InitiaListBox_ScrollChanged();
            };
        }
Пример #5
0
        /// <summary>
        /// 剪辑时间变化,刷新剪辑控制条
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnClipTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            VideoStateAxisControl AxisOb = d as VideoStateAxisControl;

            if (AxisOb != null && e.NewValue != e.OldValue)
            {
                if (e.Property.Name == nameof(AxisOb.ClipStartTime))
                {
                    AxisOb.ClipStartTimeChanged((DateTime)e.NewValue);
                }
                if (e.Property.Name == nameof(AxisOb.ClipEndTime))
                {
                    AxisOb.ClipEndTimeChanged((DateTime)e.NewValue);
                }
            }
        }