예제 #1
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mBorder            = (Border)target;
                this.mBorder.MouseDown += new MouseButtonEventHandler(this.DraggableGrid_MouseDown);
                break;

            case 2:
                this.MinimizeBtn = (CustomPictureBox)target;
                this.MinimizeBtn.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.MinimizeBtn_PreviewMouseLeftButtonUp);
                break;

            case 3:
                this.mProgressText = (TextBlock)target;
                break;

            case 4:
                this.mProgressBar = (BlueProgressBar)target;
                break;

            case 5:
                this.CancelGrid = (CustomButton)target;
                this.CancelGrid.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.CancelGrid_MouseLeftButtonUp);
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
예제 #2
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.clipMask = (Border)target;
                break;

            case 2:
                this.mProgressWindowGrid = (Grid)target;
                break;

            case 3:
                this.mLastRow = (RowDefinition)target;
                break;

            case 4:
                ((UIElement)target).MouseDown += new MouseButtonEventHandler(this.DraggableGrid_MouseDown);
                break;

            case 5:
                ((UIElement)target).MouseDown += new MouseButtonEventHandler(this.DraggableGrid_MouseDown);
                break;

            case 6:
                this.MinimizeBtn = (CustomPictureBox)target;
                this.MinimizeBtn.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.MinimizeBtn_PreviewMouseLeftButtonUp);
                break;

            case 7:
                ((UIElement)target).MouseDown += new MouseButtonEventHandler(this.DraggableGrid_MouseDown);
                break;

            case 8:
                this.mProgressHeader = (TextBlock)target;
                break;

            case 9:
                this.mProgressText = (TextBlock)target;
                break;

            case 10:
                this.mProgressBar = (BlueProgressBar)target;
                break;

            case 11:
                this.mBtnGrid = (CustomButton)target;
                this.mBtnGrid.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.CancelBtn_MouseLeftButtonUp);
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
예제 #3
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mUpdateDownloadProgressUserControl = (UpdateDownloadProgress)target;
                break;

            case 2:
                this.mMaskBorder = (Border)target;
                break;

            case 3:
                ((UIElement)target).MouseLeftButtonDown += new MouseButtonEventHandler(this.Grid_MouseLeftButtonDown);
                break;

            case 4:
                this.titleLabel = (TextBlock)target;
                break;

            case 5:
                this.mCloseBtn = (CustomPictureBox)target;
                this.mCloseBtn.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mCloseBtn_PreviewMouseLeftButtonUp);
                break;

            case 6:
                this.mDetailedChangeLogs = (Hyperlink)target;
                this.mDetailedChangeLogs.RequestNavigate += new RequestNavigateEventHandler(this.Hyperlink_RequestNavigate);
                break;

            case 7:
                this.mUpdateDownloadProgressBar = (BlueProgressBar)target;
                break;

            case 8:
                this.mUpdateDownloadProgressPercentage = (Label)target;
                break;

            case 9:
                this.mHideBtn        = (CustomButton)target;
                this.mHideBtn.Click += new RoutedEventHandler(this.HideBtn_Click);
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
예제 #4
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                ((FrameworkElement)target).Loaded += new RoutedEventHandler(this.UserControl_Loaded);
                break;

            case 2:
                this.mPromotionImageGrid = (Grid)target;
                break;

            case 3:
                this.mPromotionImage = (CustomPictureBox)target;
                break;

            case 4:
                this.mPromoButton        = (CustomButton)target;
                this.mPromoButton.Click += new RoutedEventHandler(this.mPromoButton_Click);
                break;

            case 5:
                this.mPromotionInfoBorder = (Border)target;
                break;

            case 6:
                this.mPromoInfoText = (TextBlock)target;
                break;

            case 7:
                this.mCloseButton = (CustomPictureBox)target;
                this.mCloseButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.CloseButton_PreviewMouseLeftButtonUp);
                break;

            case 8:
                this.mProgressBar = (BlueProgressBar)target;
                break;

            case 9:
                this.BootText = (TextBlock)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
예제 #5
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                ((ButtonBase)target).Click        += new RoutedEventHandler(this.Button_Click);
                ((UIElement)target).MouseEnter    += new MouseEventHandler(this.Button_MouseEnter);
                ((UIElement)target).MouseLeave    += new MouseEventHandler(this.Button_MouseLeave);
                ((FrameworkElement)target).Loaded += new RoutedEventHandler(this.Button_Loaded);
                ((UIElement)target).PreviewMouseLeftButtonDown += new MouseButtonEventHandler(this.Button_PreviewMouseLeftButtonDown);
                ((UIElement)target).PreviewMouseLeftButtonUp   += new MouseButtonEventHandler(this.Button_PreviewMouseLeftButtonUp);
                break;

            case 2:
                this.mMainGrid = (Grid)target;
                break;

            case 3:
                this.mImageGrid = (Grid)target;
                break;

            case 4:
                this.mAppImageBorder = (Border)target;
                break;

            case 5:
                this.mAppImage = (CustomPictureBox)target;
                break;

            case 6:
                this.mProgressGrid = (Grid)target;
                break;

            case 7:
                this.CustomProgressBar = (BlueProgressBar)target;
                break;

            case 8:
                this.mBusyGrid = (Grid)target;
                break;

            case 9:
                this.mBusyImage = (CustomPictureBox)target;
                break;

            case 10:
                this.mErrorGrid = (Grid)target;
                break;

            case 11:
                this.mRetryGrid = (Grid)target;
                break;

            case 12:
                this.mSuggestedAppPromotionImage = (CustomPictureBox)target;
                break;

            case 13:
                this.mUnInstallTabButton = (CustomPictureBox)target;
                break;

            case 14:
                this.mGl3ErrorIcon = (CustomPictureBox)target;
                break;

            case 15:
                this.mGl3InfoIcon = (CustomPictureBox)target;
                break;

            case 16:
                this.mRedDotNotifIcon = (CustomPictureBox)target;
                break;

            case 17:
                this.AppNameTextBox = (TextBlock)target;
                break;

            case 18:
                this.mGamePadGrid = (Grid)target;
                break;

            case 19:
                this.mGamepadIcon             = (CustomPictureBox)target;
                this.mGamepadIcon.MouseEnter += new MouseEventHandler(this.GamepadIcon_MouseEnter);
                this.mGamepadIcon.MouseLeave += new MouseEventHandler(this.GamepadIcon_MouseLeave);
                break;

            case 20:
                this.mGamePadToolTipPopup = (CustomPopUp)target;
                break;

            case 21:
                this.mMaskBorder = (Border)target;
                break;

            case 22:
                this.mIconText = (TextBlock)target;
                break;

            case 23:
                this.mUpArrow = (System.Windows.Shapes.Path)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                ((FrameworkElement)target).Loaded += new RoutedEventHandler(this.MainWindow_Loaded);
                break;

            case 2:
                this.mTitleIcon = (CustomPictureBox)target;
                break;

            case 3:
                this.mTitle            = (TextBlock)target;
                this.mTitle.MouseDown += new MouseButtonEventHandler(this.TitleBar_MouseDown);
                break;

            case 4:
                this.mMinimizeButton = (CustomPictureBox)target;
                this.mMinimizeButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.MinimizeButton_MouseLeftButtonUp);
                break;

            case 5:
                this.mCrossButton = (CustomPictureBox)target;
                this.mCrossButton.MouseLeftButtonUp += new MouseButtonEventHandler(this.CloseButton_MouseLeftButtonUp);
                break;

            case 6:
                this.mBodyPanel = (StackPanel)target;
                break;

            case 7:
                this.mBodyText = (TextBlock)target;
                break;

            case 8:
                this.mProgressGrid = (Grid)target;
                break;

            case 9:
                this.mProgressStatus = (TextBlock)target;
                break;

            case 10:
                this.mProgressPercent = (TextBlock)target;
                break;

            case 11:
                this.mProgressBar = (BlueProgressBar)target;
                break;

            case 12:
                this.mButtonGrid = (Grid)target;
                break;

            case 13:
                this.mCancelBtn        = (CustomButton)target;
                this.mCancelBtn.Click += new RoutedEventHandler(this.Btn_Click);
                break;

            case 14:
                this.mBtn        = (CustomButton)target;
                this.mBtn.Click += new RoutedEventHandler(this.Launch_Click);
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }