void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mAppIcon = ((BlueStacks.Common.CustomPictureBox)(target));
                return;

            case 2:
                this.mAppTitle = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.mBellNotificationStatus = ((BlueStacks.Common.CustomToggleButtonWithState)(target));

            #line 22 "..\..\..\..\controls\settingswindows\appnotificationstogglebutton.xaml"
                this.mBellNotificationStatus.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mBellNotificationStatus_PreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 4:
                this.mDesktopNotificationStatus = ((BlueStacks.Common.CustomToggleButtonWithState)(target));

            #line 24 "..\..\..\..\controls\settingswindows\appnotificationstogglebutton.xaml"
                this.mDesktopNotificationStatus.PreviewMouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mDesktopNotificationStatus_PreviewMouseLeftButtonUp);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 2:
                this.clipMask = ((System.Windows.Controls.Border)(target));
                return;

            case 3:
                this.mGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.lbl = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.img = ((BlueStacks.Common.CustomPictureBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #3
0
 private void CheckBox_Checked(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(this.mGroup))
     {
         if (this.IsThreeState)
         {
             if (CustomCheckbox.dictInterminentTags[this.mGroup].Item3.Count > 0)
             {
                 foreach (ToggleButton toggleButton in CustomCheckbox.dictInterminentTags[this.mGroup].Item3.ToArray())
                 {
                     toggleButton.IsChecked = new bool?(true);
                 }
             }
         }
         else
         {
             CustomCheckbox.dictInterminentTags[this.mGroup].Item2.Add(this);
             CustomCheckbox.dictInterminentTags[this.mGroup].Item3.Remove(this);
             if (CustomCheckbox.dictInterminentTags[this.mGroup].Item3.Count == 0)
             {
                 CustomCheckbox.dictInterminentTags[this.mGroup].Item1.IsChecked = new bool?(true);
             }
             else
             {
                 CustomCheckbox.dictInterminentTags[this.mGroup].Item1.SetInterminate();
             }
         }
     }
     if (this.Image == null)
     {
         return;
     }
     CustomPictureBox.SetBitmapImage(this.Image, "check_box_checked", false);
 }
예제 #4
0
        public static void SetBitmapImage(Image image, string fileName, bool isFullImagePath = false)
        {
            BitmapImage bitmapImage = CustomPictureBox.GetBitmapImage(fileName, "", isFullImagePath);

            if (bitmapImage != null)
            {
                bitmapImage.Freeze();
                BlueStacksUIBinding.Bind(image, Image.SourceProperty, fileName);
                if (image is CustomPictureBox)
                {
                    CustomPictureBox customPictureBox = image as CustomPictureBox;
                    customPictureBox.BitmapImage = bitmapImage;
                    if (customPictureBox.IsAlwaysHalfSize)
                    {
                        customPictureBox.maxSize   = new Point(customPictureBox.MaxWidth, customPictureBox.MaxHeight);
                        customPictureBox.MaxWidth  = bitmapImage.Width / 2.0;
                        customPictureBox.MaxHeight = bitmapImage.Height / 2.0;
                    }
                    else if (customPictureBox.maxSize != new Point())
                    {
                        customPictureBox.MaxWidth  = customPictureBox.maxSize.X;
                        customPictureBox.MaxHeight = customPictureBox.maxSize.Y;
                    }
                }
            }
        }
예제 #5
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mToastPopupBorder = (Border)target;
                break;

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

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

            case 4:
                this.mVerticalSeparator = (Grid)target;
                break;

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

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

            case 2:
                ((UIElement)target).MouseLeftButtonUp += new MouseButtonEventHandler(this.Grid_MouseLeftButtonUp);
                break;

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

            case 4:
                this.mSettingsWindowIcon = (CustomPictureBox)target;
                break;

            case 5:
                this.mLblBlueStacksSettings = (Label)target;
                break;

            case 6:
                this.mCrossButton = (CustomPictureBox)target;
                break;

            case 7:
                this.mEnableVTPopup = (CustomPopUp)target;
                break;

            case 8:
                this.EnableVtInfo = (TextBlock)target;
                this.EnableVtInfo.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.EnableVtInfo_PreviewMouseLeftButtonUp);
                break;

            case 9:
                this.mBottomGrid = (Grid)target;
                break;

            case 10:
                this.settingsStackPanel = (StackPanel)target;
                break;

            case 11:
                this.mSelectedLine = (Line)target;
                break;

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

            default:
                this._contentLoaded = true;
                break;
            }
        }
예제 #7
0
 private void CheckBox_MouseEnter(object sender, MouseEventArgs e)
 {
     if (!this.IsChecked.HasValue || this.IsChecked.Value)
     {
         return;
     }
     CustomPictureBox.SetBitmapImage(this.Image, "check_box_hover", false);
 }
예제 #8
0
 internal static void NotifyUIElements()
 {
     if (CustomPictureBox.SourceUpdatedEvent == null)
     {
         return;
     }
     CustomPictureBox.SourceUpdatedEvent((object)null, (EventArgs)null);
 }
예제 #9
0
 public void SetDefaultImage()
 {
     try
     {
         CustomPictureBox.SetBitmapImage((Image)this, this.ImageName, this.IsFullImagePath);
     }
     catch
     {
     }
 }
예제 #10
0
 public void ReloadImages()
 {
     CustomPictureBox.sImageAssetsDict.Remove(this.ClickImage);
     CustomPictureBox.sImageAssetsDict.Remove(this.ImageName);
     CustomPictureBox.sImageAssetsDict.Remove(this.HoverImage);
     CustomPictureBox.sImageAssetsDict.Remove(this.SelectedImage);
     CustomPictureBox.sImageAssetsDict.Remove(this.DisabledImage);
     this.SetDefaultImage();
     CustomPictureBox.GCCollectAsync();
 }
        public static void ReloadAppliedTheme(string themeName)
        {
            BluestacksUIColor bluestacksUiColor = BluestacksUIColor.Load(BlueStacksUIColorManager.GetThemeFilePath(themeName));

            if (bluestacksUiColor == null || bluestacksUiColor.DictBrush.Count <= 0)
            {
                return;
            }
            BlueStacksUIColorManager.AppliedTheme = bluestacksUiColor;
            RegistryManager.Instance.SetClientThemeNameInRegistry(themeName);
            CustomPictureBox.UpdateImagesFromNewDirectory("");
        }
예제 #12
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mBackgroundImage = (CustomPictureBox)target;
                break;

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

            case 3:
                this.mCloseButtonStackPanel = (StackPanel)target;
                break;

            case 4:
                this.mMuteButton = (CustomPictureBox)target;
                break;

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

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

            case 7:
                this.mGameIcon = (CustomPictureBox)target;
                break;

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

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

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

            case 11:
                this.mButton = (CustomButton)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
예제 #13
0
        private static void IsAlwaysHalfSizeChanged(
            DependencyObject source,
            DependencyPropertyChangedEventArgs e)
        {
            CustomPictureBox customPictureBox = source as CustomPictureBox;

            if (DesignerProperties.GetIsInDesignMode((DependencyObject)customPictureBox))
            {
                return;
            }
            customPictureBox.SetDefaultImage();
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mMacroName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 2:
                this.mAddMacro = ((BlueStacks.Common.CustomPictureBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #15
0
 public void SetDisabledImage()
 {
     try
     {
         if (this.IsFullImagePath)
         {
             return;
         }
         CustomPictureBox.SetBitmapImage((Image)this, this.DisabledImage, false);
     }
     catch (Exception ex)
     {
     }
 }
예제 #16
0
 private void CheckBox_MouseLeave(object sender, MouseEventArgs e)
 {
     if (!this.IsChecked.HasValue)
     {
         CustomPictureBox.SetBitmapImage(this.Image, "check_box_Indeterminate", false);
     }
     else if (this.IsChecked.Value)
     {
         CustomPictureBox.SetBitmapImage(this.Image, "check_box_checked", false);
     }
     else
     {
         CustomPictureBox.SetBitmapImage(this.Image, "check_box", false);
     }
 }
예제 #17
0
 private void CheckBox_Indeterminate(object sender, RoutedEventArgs e)
 {
     if (!this._mSetInterminate)
     {
         this.IsChecked = new bool?(false);
     }
     else
     {
         this._mSetInterminate = false;
         if (this.Image == null)
         {
             return;
         }
         CustomPictureBox.SetBitmapImage(this.Image, "check_box_Indeterminate", false);
     }
 }
예제 #18
0
 public static void UpdateImagesFromNewDirectory(string path = "")
 {
     foreach (Tuple <string, bool> tuple in CustomPictureBox.sImageAssetsDict.Select <KeyValuePair <string, Tuple <BitmapImage, bool> >, Tuple <string, bool> >((Func <KeyValuePair <string, Tuple <BitmapImage, bool> >, Tuple <string, bool> >)(_ => new Tuple <string, bool>(_.Key, _.Value.Item2))).ToList <Tuple <string, bool> >())
     {
         if (tuple.Item1.IndexOfAny(new char[2]
         {
             Path.AltDirectorySeparatorChar,
             Path.DirectorySeparatorChar
         }) == -1)
         {
             CustomPictureBox.sImageAssetsDict.Remove(tuple.Item1);
             CustomPictureBox.GetBitmapImage(tuple.Item1, path, tuple.Item2);
         }
     }
     CustomPictureBox.NotifyUIElements();
 }
예제 #19
0
        public static BitmapImage GetBitmapImage(
            string fileName,
            string assetDirectory = "",
            bool isFullImagePath  = false)
        {
            if (string.IsNullOrEmpty(fileName))
            {
                return((BitmapImage)null);
            }
            if (CustomPictureBox.sImageAssetsDict.ContainsKey(fileName))
            {
                return(CustomPictureBox.sImageAssetsDict[fileName].Item1);
            }
            BitmapImage bitmapImage = (BitmapImage)null;

            if (fileName.IndexOfAny(new char[2]
            {
                Path.AltDirectorySeparatorChar,
                Path.DirectorySeparatorChar
            }) != -1)
            {
                if (!isFullImagePath)
                {
                    Logger.Warning("Full image path not marked false for image: " + fileName);
                }
                bitmapImage = CustomPictureBox.BitmapFromPath(fileName);
            }
            else if (isFullImagePath)
            {
                Logger.Warning("Full image path marked true for image: " + fileName);
            }
            if (bitmapImage == null)
            {
                if (string.IsNullOrEmpty(assetDirectory))
                {
                    assetDirectory = CustomPictureBox.AssetsDir;
                }
                bitmapImage = CustomPictureBox.BitmapFromPath(Path.Combine(assetDirectory, Path.GetFileNameWithoutExtension(fileName) + ".png")) ?? CustomPictureBox.BitmapFromPath(Path.Combine(assetDirectory, fileName)) ?? CustomPictureBox.BitmapFromPath(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets"), Path.GetFileNameWithoutExtension(fileName) + ".png")) ?? CustomPictureBox.BitmapFromPath(Path.Combine(Path.Combine(RegistryManager.Instance.ClientInstallDir, "Assets"), Path.GetFileNameWithoutExtension(fileName) + ".png"));
            }
            CustomPictureBox.sImageAssetsDict.Add(fileName, new Tuple <BitmapImage, bool>(bitmapImage, isFullImagePath));
            if (bitmapImage == null)
            {
                Logger.Warning("Returning a null image for {0}", (object)fileName);
            }
            return(bitmapImage);
        }
예제 #20
0
        private static void IsImageHoverChanged(
            DependencyObject source,
            DependencyPropertyChangedEventArgs e)
        {
            CustomPictureBox customPictureBox = source as CustomPictureBox;

            if (DesignerProperties.GetIsInDesignMode((DependencyObject)customPictureBox))
            {
                return;
            }
            if (customPictureBox.IsImageHover)
            {
                customPictureBox.SetHoverImage();
            }
            else
            {
                customPictureBox.SetDefaultImage();
            }
        }
예제 #21
0
        private void CheckBox_Loaded(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode((DependencyObject)this))
            {
                return;
            }
            if (this.mOrientaion == Orientation.Vertical)
            {
                Grid.SetRowSpan((UIElement)this.Image, 1);
                this.colDefHorizontalLabel.Width = new GridLength(0.0);
                this.BottomLabel.Visibility      = Visibility.Visible;
            }
            if (this.mLabelVisibility == Visibility.Hidden)
            {
                this.CheckboxText.Visibility = Visibility.Hidden;
                this.BottomLabel.Visibility  = Visibility.Hidden;
            }
            if (this.Image == null)
            {
                return;
            }
            bool?isChecked = this.IsChecked;

            if (!isChecked.HasValue)
            {
                CustomPictureBox.SetBitmapImage(this.Image, "check_box__Indeterminate", false);
            }
            else
            {
                isChecked = this.IsChecked;
                if (isChecked.HasValue)
                {
                    isChecked = this.IsChecked;
                    if (isChecked.Value)
                    {
                        CustomPictureBox.SetBitmapImage(this.Image, "check_box_checked", false);
                        return;
                    }
                }
                CustomPictureBox.SetBitmapImage(this.Image, "check_box", false);
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                ((ScrollViewer)target).ScrollChanged += new ScrollChangedEventHandler(this.ScrollViewer_ScrollChanged);
                break;

            case 2:
                this.mCompatibilityMode = (CustomRadioButton)target;
                break;

            case 3:
                this.mPerformanceMode = (CustomRadioButton)target;
                break;

            case 4:
                this.mDirectX = (CustomRadioButton)target;
                break;

            case 5:
                this.mGlMode = (CustomRadioButton)target;
                break;

            case 6:
                this.softwareDecoding = (CustomRadioButton)target;
                break;

            case 7:
                this.mVSyncHelp = (CustomPictureBox)target;
                break;

            case 8:
                this.mHelpCenterImage = (CustomPictureBox)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        private NotificationPopup(
            string imagePath,
            string title,
            string displayMsg,
            bool autoClose,
            int duration,
            MouseButtonEventHandler clickHandler,
            bool hideMute,
            string vmName,
            MouseButtonEventHandler buttonClickHandler = null,
            MouseButtonEventHandler closeButtonHandler = null,
            MouseButtonEventHandler muteButtonHandler  = null,
            bool showOnlyMute     = false,
            string buttonText     = "",
            string id             = "0",
            bool showOnlySettings = false,
            string package        = "")
        {
            this.InitializeComponent();
            this.SetProperties();
            this.Width                 = NotificationWindow.Instance.ActualWidth;
            this.mTimer.Tick          += new EventHandler(this.MyTimer_Tick);
            this.mTimer.Interval       = duration;
            this.Title                 = title;
            this.mLblContent.Text      = displayMsg;
            this.VmName                = vmName;
            this.PackageName           = package;
            this.AndroidNotificationId = id;
            if (clickHandler != null)
            {
                this.mPopup.MouseUp += clickHandler;
                this.mClickHandler   = clickHandler;
            }
            if (buttonClickHandler != null)
            {
                this.mButton.PreviewMouseLeftButtonUp += buttonClickHandler;
                this.mButton.Visibility = Visibility.Visible;
                if (!string.IsNullOrEmpty(buttonText))
                {
                    this.mButton.Content = (object)buttonText;
                }
            }
            if (hideMute)
            {
                this.mImgMute.Visibility     = Visibility.Hidden;
                this.mImgSettings.Visibility = Visibility.Hidden;
            }
            if (showOnlyMute)
            {
                this.mImgMute.Visibility     = Visibility.Visible;
                this.mImgSettings.Visibility = Visibility.Collapsed;
            }
            if (showOnlySettings)
            {
                this.mImgMute.Visibility     = Visibility.Collapsed;
                this.mImgSettings.Visibility = Visibility.Visible;
            }
            if (closeButtonHandler != null)
            {
                this.mImgDismiss.MouseLeftButtonUp += closeButtonHandler;
            }
            if (muteButtonHandler != null)
            {
                this.mOuterGridPopUp.PreviewMouseLeftButtonUp += muteButtonHandler;
            }
            this.AutoClose = autoClose;
            if (!NotificationWindow.Instance.AppNotificationCountDictForEachVM.ContainsKey(this.VmName))
            {
                NotificationWindow.Instance.AppNotificationCountDictForEachVM[this.VmName] = new Dictionary <string, int>();
            }
            if (!NotificationWindow.Instance.AppNotificationCountDictForEachVM[this.VmName].ContainsKey(this.Title))
            {
                NotificationWindow.Instance.AppNotificationCountDictForEachVM[this.VmName].Add(this.Title, 0);
            }
            NotificationWindow.Instance.AppNotificationCountDictForEachVM[this.VmName][this.Title]++;
            JsonParser jsonParser = new JsonParser(vmName);

            this.AppName = string.IsNullOrEmpty(jsonParser.GetAppNameFromPackage(this.PackageName)) ? title : jsonParser.GetAppNameFromPackage(this.PackageName);
            CustomPictureBox.SetBitmapImage(this.mImage, "bluestackslogo", false);
            if (!string.IsNullOrEmpty(imagePath))
            {
                CustomPictureBox.SetBitmapImage(this.mImage, imagePath, true);
            }
            else
            {
                try
                {
                    if (string.IsNullOrEmpty(this.AppName))
                    {
                        return;
                    }
                    AppInfo infoFromPackageName = jsonParser.GetAppInfoFromPackageName(this.PackageName);
                    Logger.Info("For notification {0}: AppName-{1} Package-{2}", (object)id, (object)this.AppName, (object)this.PackageName);
                    if (infoFromPackageName == null)
                    {
                        return;
                    }
                    Logger.Info("For notification {0}: ImageName-{1}", (object)id, (object)infoFromPackageName.Img);
                    if (!File.Exists(Path.Combine(RegistryStrings.GadgetDir, infoFromPackageName.Img)))
                    {
                        return;
                    }
                    CustomPictureBox.SetBitmapImage(this.mImage, Path.Combine(RegistryStrings.GadgetDir, infoFromPackageName.Img), true);
                }
                catch
                {
                    Logger.Error("Error loading app icon file");
                }
            }
        }
예제 #24
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\..\keymap\keymapcanvaswindow.xaml"
                ((BlueStacks.BlueStacksUI.KeymapCanvasWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.KeymapCanvasWindow_Closing);

            #line default
            #line hidden

            #line 8 "..\..\..\keymap\keymapcanvaswindow.xaml"
                ((BlueStacks.BlueStacksUI.KeymapCanvasWindow)(target)).Closed += new System.EventHandler(this.CustomWindow_Closed);

            #line default
            #line hidden

            #line 8 "..\..\..\keymap\keymapcanvaswindow.xaml"
                ((BlueStacks.BlueStacksUI.KeymapCanvasWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 9 "..\..\..\keymap\keymapcanvaswindow.xaml"
                ((BlueStacks.BlueStacksUI.KeymapCanvasWindow)(target)).LocationChanged += new System.EventHandler(this.CustomWindow_LocationChanged);

            #line default
            #line hidden

            #line 9 "..\..\..\keymap\keymapcanvaswindow.xaml"
                ((BlueStacks.BlueStacksUI.KeymapCanvasWindow)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.CustomWindow_MouseDown);

            #line default
            #line hidden

            #line 10 "..\..\..\keymap\keymapcanvaswindow.xaml"
                ((BlueStacks.BlueStacksUI.KeymapCanvasWindow)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.CustomWindow_SizeChanged);

            #line default
            #line hidden
                return;

            case 2:

            #line 13 "..\..\..\keymap\keymapcanvaswindow.xaml"
                ((System.Windows.Controls.Grid)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Canvas_MouseDown);

            #line default
            #line hidden
                return;

            case 3:
                this.mCanvas = ((System.Windows.Controls.Canvas)(target));

            #line 14 "..\..\..\keymap\keymapcanvaswindow.xaml"
                this.mCanvas.MouseEnter += new System.Windows.Input.MouseEventHandler(this.Canvas_MouseEnter);

            #line default
            #line hidden

            #line 14 "..\..\..\keymap\keymapcanvaswindow.xaml"
                this.mCanvas.PreviewMouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Canvas_MouseUp);

            #line default
            #line hidden

            #line 14 "..\..\..\keymap\keymapcanvaswindow.xaml"
                this.mCanvas.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.CustomWindow_MouseDown);

            #line default
            #line hidden
                return;

            case 4:
                this.mCanvasImage = ((BlueStacks.Common.CustomPictureBox)(target));
                return;

            case 5:
                this.mGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.mCanvas2 = ((System.Windows.Controls.Canvas)(target));
                return;

            case 7:
                this.mOnboardingControl = ((BlueStacks.BlueStacksUI.OnboardingOverlayControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #25
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mMaskBorder = (Border)target;
                break;

            case 2:
                this.mParentGrid            = (Grid)target;
                this.mParentGrid.MouseDown += new MouseButtonEventHandler(this.HandleMouseDrag);
                break;

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

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

            case 5:
                this.mTitleText = (TextBlock)target;
                break;

            case 6:
                this.mCustomMessageBoxMinimizeButton = (CustomPictureBox)target;
                break;

            case 7:
                this.mCustomMessageBoxCloseButton = (CustomPictureBox)target;
                break;

            case 8:
                this.mMessageIcon = (CustomPictureBox)target;
                break;

            case 9:
                this.mTextBlockGrid = (Grid)target;
                break;

            case 10:
                this.mBodyTextStackPanel = (StackPanel)target;
                break;

            case 11:
                this.mBodyTextBlockTitle = (TextBlock)target;
                break;

            case 12:
                this.mAboveBodyWarningTextBlock = (TextBlock)target;
                break;

            case 13:
                this.mBodyTextBlock = (TextBlock)target;
                break;

            case 14:
                this.mBodyWarningTextBlock = (TextBlock)target;
                break;

            case 15:
                this.mUrlTextBlock = (TextBlock)target;
                break;

            case 16:
                this.mUrlLink = (Hyperlink)target;
                break;

            case 17:
                this.mCheckBox = (CustomCheckbox)target;
                break;

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

            case 19:
                this.mProgressbar = (BlueProgressBar)target;
                break;

            case 20:
                this.mProgressUpdatesGrid = (Grid)target;
                break;

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

            case 22:
                this.mProgressPercentage = (Label)target;
                break;

            case 23:
                this.mStackPanel = (StackPanel)target;
                break;

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

            #line 8 "..\..\..\controls\pikanotificationcontrol.xaml"
                ((BlueStacks.BlueStacksUI.PikaNotificationControl)(target)).AddHandler(System.Windows.Input.Mouse.MouseUpEvent, new System.Windows.Input.MouseButtonEventHandler(this.pikanotificationcontrol_MouseUp));

            #line default
            #line hidden

            #line 8 "..\..\..\controls\pikanotificationcontrol.xaml"
                ((BlueStacks.BlueStacksUI.PikaNotificationControl)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.PikaNotificationControl_MouseEnter);

            #line default
            #line hidden

            #line 9 "..\..\..\controls\pikanotificationcontrol.xaml"
                ((BlueStacks.BlueStacksUI.PikaNotificationControl)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.PikaNotificationControl_MouseLeave);

            #line default
            #line hidden

            #line 9 "..\..\..\controls\pikanotificationcontrol.xaml"
                ((BlueStacks.BlueStacksUI.PikaNotificationControl)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);

            #line default
            #line hidden
                return;

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

            case 3:
                this.ribbonBack = ((System.Windows.Shapes.Path)(target));
                return;

            case 4:
                this.ribbonStroke = ((System.Windows.Shapes.Path)(target));
                return;

            case 5:
                this.backgroundPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 6:
                this.pikaGif = ((BlueStacks.Common.CustomPictureBox)(target));
                return;

            case 7:
                this.titleText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.messageText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.notificationBorder = ((System.Windows.Controls.Border)(target));
                return;

            case 10:
                this.mCloseBtn = ((BlueStacks.Common.CustomPictureBox)(target));

            #line 55 "..\..\..\controls\pikanotificationcontrol.xaml"
                this.mCloseBtn.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.CloseBtn_MouseLeftButtonUp);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mOrientation = (CustomComboBox)target;
                break;

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

            case 3:
                this.mResolution960x540 = (CustomRadioButton)target;
                break;

            case 4:
                this.mResolution1280x720 = (CustomRadioButton)target;
                break;

            case 5:
                this.mResolution1600x900 = (CustomRadioButton)target;
                break;

            case 6:
                this.mResolution1920x1080 = (CustomRadioButton)target;
                break;

            case 7:
                this.mResolution2560x1440 = (CustomRadioButton)target;
                break;

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

            case 9:
                this.CustomResolutionWidth = (CustomTextBox)target;
                break;

            case 10:
                this.CustomResolutionHeight = (CustomTextBox)target;
                break;

            case 11:
                this.mDpi160 = (CustomRadioButton)target;
                break;

            case 12:
                this.mDpi240 = (CustomRadioButton)target;
                break;

            case 13:
                this.mDpi320 = (CustomRadioButton)target;
                break;

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

            case 15:
                this.mSaveButton = (CustomButton)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.slideControl = ((BlueStacks.BlueStacksUI.SlideShowControl)(target));

            #line 8 "..\..\..\controls\slideshowcontrol.xaml"
                this.slideControl.Loaded += new System.Windows.RoutedEventHandler(this.SlideShowControl_Loaded);

            #line default
            #line hidden
                return;

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

            case 3:
                this.image1 = ((BlueStacks.Common.CustomPictureBox)(target));

            #line 25 "..\..\..\controls\slideshowcontrol.xaml"
                this.image1.MouseEnter += new System.Windows.Input.MouseEventHandler(this.image1_MouseEnter);

            #line default
            #line hidden

            #line 25 "..\..\..\controls\slideshowcontrol.xaml"
                this.image1.MouseLeave += new System.Windows.Input.MouseEventHandler(this.image1_MouseLeave);

            #line default
            #line hidden
                return;

            case 4:
                this.mPrevBtn = ((BlueStacks.Common.CustomPictureBox)(target));

            #line 27 "..\..\..\controls\slideshowcontrol.xaml"
                this.mPrevBtn.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mPrevBtn_MouseLeftButtonUp);

            #line default
            #line hidden

            #line 27 "..\..\..\controls\slideshowcontrol.xaml"
                this.mPrevBtn.MouseLeave += new System.Windows.Input.MouseEventHandler(this.image1_MouseLeave);

            #line default
            #line hidden
                return;

            case 5:
                this.mNextBtn = ((BlueStacks.Common.CustomPictureBox)(target));

            #line 29 "..\..\..\controls\slideshowcontrol.xaml"
                this.mNextBtn.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.mNextBtn_MouseLeftButtonUp);

            #line default
            #line hidden

            #line 29 "..\..\..\controls\slideshowcontrol.xaml"
                this.mNextBtn.MouseLeave += new System.Windows.Input.MouseEventHandler(this.image1_MouseLeave);

            #line default
            #line hidden
                return;

            case 6:
                this.SlideshowName = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }