예제 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((BPiaoBao.Client.DomesticTicket.View.TicketBookingWindow)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.VisualStateGroup = ((System.Windows.VisualStateGroup)(target));
                return;

            case 4:
                this.collapsedVisualState = ((System.Windows.VisualState)(target));
                return;

            case 5:
                this.payBtn = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.SearchBtn = ((System.Windows.Controls.Button)(target));
                return;

            case 7:
                this.sprocketControl = ((WPFSpark.SprocketControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #2
0
        /// <summary>
        /// Handles changes to the AlphaTicksPercentage property.
        /// </summary>
        private static void OnAlphaTicksPercentageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket = (SprocketControl)d;
            double          oldAlphaTicksPercentage = (double)e.OldValue;
            double          newAlphaTicksPercentage = sprocket.AlphaTicksPercentage;

            sprocket.OnAlphaTicksPercentageChanged(oldAlphaTicksPercentage, newAlphaTicksPercentage);
        }
예제 #3
0
        /// <summary>
        /// Handles changes to the LowestAlpha property.
        /// </summary>
        private static void OnLowestAlphaChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket       = (SprocketControl)d;
            Int32           oldLowestAlpha = (Int32)e.OldValue;
            Int32           newLowestAlpha = sprocket.LowestAlpha;

            sprocket.OnLowestAlphaChanged(oldLowestAlpha, newLowestAlpha);
        }
예제 #4
0
        /// <summary>
        /// Handles changes to the TickStyle property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket     = (SprocketControl)d;
            PenLineCap      oldTickStyle = (PenLineCap)e.OldValue;
            PenLineCap      newTickStyle = sprocket.TickStyle;

            sprocket.OnTickStyleChanged(oldTickStyle, newTickStyle);
        }
예제 #5
0
        /// <summary>
        /// Handles changes to the TickWidth property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickWidthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl target       = (SprocketControl)d;
            double          oldTickWidth = (double)e.OldValue;
            double          newTickWidth = target.TickWidth;

            target.OnTickWidthChanged(oldTickWidth, newTickWidth);
        }
예제 #6
0
        /// <summary>
        /// Handles changes to the TickColor property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket     = (SprocketControl)d;
            Color           oldTickColor = (Color)e.OldValue;
            Color           newTickColor = sprocket.TickColor;

            sprocket.OnTickColorChanged(oldTickColor, newTickColor);
        }
예제 #7
0
        /// <summary>
        /// Handles changes to the TickCount property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnTickCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket     = (SprocketControl)d;
            int             oldTickCount = (int)e.OldValue;
            int             newTickCount = sprocket.TickCount;

            sprocket.OnTickCountChanged(oldTickCount, newTickCount);
        }
예제 #8
0
        /// <summary>
        /// Handles changes to the StartAngle property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnStartAngleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket      = (SprocketControl)d;
            double          oldStartAngle = (double)e.OldValue;
            double          newStartAngle = sprocket.StartAngle;

            sprocket.OnStartAngleChanged(oldStartAngle, newStartAngle);
        }
예제 #9
0
        /// <summary>
        /// Handles changes to the Rotation property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnRotationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket    = (SprocketControl)d;
            Direction       oldRotation = (Direction)e.OldValue;
            Direction       newRotation = sprocket.Rotation;

            sprocket.OnRotationChanged(oldRotation, newRotation);
        }
예제 #10
0
        /// <summary>
        /// Handles changes to the Progress property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnProgressChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket    = (SprocketControl)d;
            double          oldProgress = (double)e.OldValue;
            double          newProgress = sprocket.Progress;

            sprocket.OnProgressChanged(oldProgress, newProgress);
        }
예제 #11
0
        /// <summary>
        /// Handles changes to the IsIndeterminate property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnIsIndeterminateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl target             = (SprocketControl)d;
            bool            oldIsIndeterminate = (bool)e.OldValue;
            bool            newIsIndeterminate = target.IsIndeterminate;

            target.OnIsIndeterminateChanged(oldIsIndeterminate, newIsIndeterminate);
        }
예제 #12
0
        /// <summary>
        /// Handles changes to the Interval property.
        /// </summary>
        /// <param name="d">SprocketControl</param>
        /// <param name="e">DependencyProperty changed event arguments</param>
        private static void OnIntervalChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SprocketControl sprocket    = (SprocketControl)d;
            double          oldInterval = (double)e.OldValue;
            double          newInterval = sprocket.Interval;

            sprocket.OnIntervalChanged(oldInterval, newInterval);
        }
예제 #13
0
        /// <summary>
        /// Coerces the AlphaTicksPercentage value.
        /// </summary>
        private static object CoerceAlphaTicksPercentage(DependencyObject d, object value)
        {
            SprocketControl target = (SprocketControl)d;
            double          desiredAlphaTicksPercentage = (double)value;

            if (desiredAlphaTicksPercentage > 100.0)
            {
                return(100.0);
            }
            if (desiredAlphaTicksPercentage < ALPHA_TICK_PERCENTAGE_LOWER_LIMIT)
            {
                return(ALPHA_TICK_PERCENTAGE_LOWER_LIMIT);
            }

            return(desiredAlphaTicksPercentage);
        }
예제 #14
0
        /// <summary>
        /// Coerces the LowestAlpha value.
        /// </summary>
        private static object CoerceLowestAlpha(DependencyObject d, object value)
        {
            SprocketControl sprocket           = (SprocketControl)d;
            Int32           desiredLowestAlpha = (Int32)value;

            if (desiredLowestAlpha < ALPHA_LOWER_LIMIT)
            {
                return(ALPHA_LOWER_LIMIT);
            }
            else if (desiredLowestAlpha > ALPHA_UPPER_LIMIT)
            {
                return(ALPHA_UPPER_LIMIT);
            }

            return(desiredLowestAlpha);
        }
예제 #15
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.stWebBrower = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.webBrowser = ((System.Windows.Forms.WebBrowser)(target));
                return;

            case 3:
                this.stProcess = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 4:
                this.sprocketControl = ((WPFSpark.SprocketControl)(target));
                return;
            }
            this._contentLoaded = true;
        }