コード例 #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.bgBrush = ((System.Windows.Media.ImageBrush)(target));
                return;

            case 3:
                this.buttonLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.toggleRule1 = ((RedditModTools.UserControls.LittleToggle)(target));
                return;

            case 5:
                this.toggleRule2 = ((RedditModTools.UserControls.LittleToggle)(target));
                return;

            case 6:
                this.toggleRule3 = ((RedditModTools.UserControls.LittleToggle)(target));
                return;

            case 7:
                this.toggleRule4 = ((RedditModTools.UserControls.LittleToggle)(target));
                return;

            case 8:
                this.toggleRule5 = ((RedditModTools.UserControls.LittleToggle)(target));
                return;

            case 9:
                this.toggleRule6 = ((RedditModTools.UserControls.LittleToggle)(target));
                return;

            case 10:
                this.toggleRule7 = ((RedditModTools.UserControls.LittleToggle)(target));
                return;

            case 11:
                this.backButton = ((RedditModTools.UserControls.ForwardBackButton)(target));
                return;

            case 12:
                this.forwardButton = ((RedditModTools.UserControls.ForwardBackButton)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #2
0
        private void handleForwardBackClick(ForwardBackButton fbb, bool isBack)
        {
            //Refactor this

            if (isBack)
            {
                setForwardBackVisibility(System.Windows.Visibility.Collapsed);

                childHovered = false;
            }
            else
            {
                setForwardBackVisibility(System.Windows.Visibility.Collapsed);

                childHovered = false;

                if (ButtonPressed != null)
                {
                    ButtonPressed(this);
                }
            }
            this.stopBlockingClicks();
        }
コード例 #3
0
 private void handleForwardBackExit(ForwardBackButton fbb, bool isBack)
 {
     childHovered = false;
     this.stopBlockingClicks();
 }
コード例 #4
0
 private void handleForwardBackEnter(ForwardBackButton fbb, bool isBack)
 {
     childHovered = true;
     this.startBlockingClicks();
 }