コード例 #1
0
        /// <summary>
        /// Handles a change to the IsRunningFilter property.
        /// </summary>
        /// <param name="dependencyObject">The object that owns the property.</param>
        /// <param name="dependencyPropertyChangedEventArgs">A description of the changed property.</param>
        private static void OnIsRunningFilterChanged(DependencyObject dependencyObject,
                                                     DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            // Extract the strongly typed variables from the generic parameters.
            ViewerDebtBlotter viewerPrototype = dependencyObject as ViewerDebtBlotter;
            Boolean           isRunningFilter = (Boolean)dependencyPropertyChangedEventArgs.NewValue;

            // This takes care of the actual work of setting the filter to display only the filled orders (or removing the filter).
            ViewerDebtBlotter.reportWorkingOrder.IsRunningFilter = isRunningFilter;
        }
コード例 #2
0
        /// <summary>
        /// Handles a change to the Scale property.
        /// </summary>
        /// <param name="dependencyObject">The object that owns the property.</param>
        /// <param name="dependencyPropertyChangedEventArgs">A description of the changed property.</param>
        private static void OnScaleChanged(
            DependencyObject dependencyObject,
            DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            // Extract the strongly typed variables from the generic parameters.
            ViewerDebtBlotter viewerPrototype = dependencyObject as ViewerDebtBlotter;
            Double            scale           = (Double)dependencyPropertyChangedEventArgs.NewValue;

            // Set the animation speed on the report.
            ViewerDebtBlotter.reportWorkingOrder.Scale = scale;
            ViewerDebtBlotter.reportMatch.Scale        = scale;
            ViewerDebtBlotter.reportExecution.Scale    = scale;
        }
コード例 #3
0
        /// <summary>
        /// Handles a change to the IsNavigationPaneVisible property.
        /// </summary>
        /// <param name="dependencyObject">The object that owns the property.</param>
        /// <param name="dependencyPropertyChangedEventArgs">A description of the changed property.</param>
        private static void OnIsNavigationPaneVisibleChanged(DependencyObject dependencyObject,
                                                             DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            // Extract the strongly typed variables from the generic parameters.
            ViewerDebtBlotter viewerPrototype         = dependencyObject as ViewerDebtBlotter;
            Boolean           isNavigationPaneVisible = (Boolean)dependencyPropertyChangedEventArgs.NewValue;

            // The real logic is handled by the application window.  This handler is only got to update the menu user interface to
            // reflect the state of the navigation pane.
            if (viewerPrototype.menuItemIsNavigationPaneVisible.IsChecked != isNavigationPaneVisible)
            {
                viewerPrototype.menuItemIsNavigationPaneVisible.IsChecked = isNavigationPaneVisible;
            }
        }
コード例 #4
0
        /// <summary>
        /// Handles a change to the AnimationSpeed property.
        /// </summary>
        /// <param name="dependencyObject">The object that owns the property.</param>
        /// <param name="dependencyPropertyChangedEventArgs">A description of the changed property.</param>
        private static void OnAnimationSpeedChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            // Extract the strongly typed variables from the generic parameters.
            ViewerDebtBlotter viewerPrototype = dependencyObject as ViewerDebtBlotter;
            AnimationSpeed    animationSpeed  = (AnimationSpeed)dependencyPropertyChangedEventArgs.NewValue;

            // Set the animation speed on the report.
            ViewerDebtBlotter.reportWorkingOrder.AnimationSpeed = animationSpeed;

            // Adjust the menu items for the new animation setting.
            viewerPrototype.menuItemSetAnimationFast.IsChecked   = animationSpeed == AnimationSpeed.Fast;
            viewerPrototype.menuItemSetAnimationMedium.IsChecked = animationSpeed == AnimationSpeed.Medium;
            viewerPrototype.menuItemSetAnimationOff.IsChecked    = animationSpeed == AnimationSpeed.Off;
            viewerPrototype.menuItemSetAnimationSlow.IsChecked   = animationSpeed == AnimationSpeed.Slow;
        }
コード例 #5
0
        /// <summary>
        /// Handles a change to the IsFilledFilter property.
        /// </summary>
        /// <param name="dependencyObject">The object that owns the property.</param>
        /// <param name="dependencyPropertyChangedEventArgs">A description of the changed property.</param>
        private static void OnIsFilledFilterChanged(DependencyObject dependencyObject,
                                                    DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            // Extract the strongly typed variables from the generic parameters.
            ViewerDebtBlotter viewerPrototype = dependencyObject as ViewerDebtBlotter;
            Boolean           isFilledFilter  = (Boolean)dependencyPropertyChangedEventArgs.NewValue;

            // This takes care of the actual work of setting the filter to display only the filled orders (or removing the filter).
            ViewerDebtBlotter.reportWorkingOrder.IsFilledFilter = isFilledFilter;

            // The user interface is modified here to reflect the change to the state of the filter.
            if (viewerPrototype.toggleButtonApplyFilledFilter.IsChecked != isFilledFilter)
            {
                viewerPrototype.toggleButtonApplyFilledFilter.IsChecked = isFilledFilter;
            }
        }