Exemple #1
0
        /// <summary>
        /// Handles a change to the IsLayoutFrozen 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 OnIsLayoutFrozenChanged(DependencyObject dependencyObject,
                                                    DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            // Extract the strongly typed variables from the generic parameters.
            ViewerEquityBlotter viewerPrototype = dependencyObject as ViewerEquityBlotter;
            Boolean             isLayoutFrozen  = (Boolean)dependencyPropertyChangedEventArgs.NewValue;

            // This takes care of the actual work of setting the filter to display only the filled orders (or removing the filter).
            ViewerEquityBlotter.reportWorkingOrder.IsLayoutFrozen = isLayoutFrozen;
        }
Exemple #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.
            ViewerEquityBlotter viewerPrototype = dependencyObject as ViewerEquityBlotter;
            Double scale = (Double)dependencyPropertyChangedEventArgs.NewValue;

            // Set the animation speed on the report.
            ViewerEquityBlotter.reportWorkingOrder.Scale = scale;
            ViewerEquityBlotter.reportMatch.Scale        = scale;
            ViewerEquityBlotter.reportExecution.Scale    = scale;
        }
Exemple #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.
            ViewerEquityBlotter viewerPrototype         = dependencyObject as ViewerEquityBlotter;
            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;
            }
        }
Exemple #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.
            ViewerEquityBlotter viewerPrototype = dependencyObject as ViewerEquityBlotter;
            AnimationSpeed      animationSpeed  = (AnimationSpeed)dependencyPropertyChangedEventArgs.NewValue;

            // Set the animation speed on the report.
            ViewerEquityBlotter.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;
        }
Exemple #5
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.
            ViewerEquityBlotter viewerPrototype = dependencyObject as ViewerEquityBlotter;
            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).
            ViewerEquityBlotter.reportWorkingOrder.IsRunningFilter = isRunningFilter;

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