示例#1
0
        private void InstanceCheckbox_Checked(object sender, RoutedEventArgs e)
        {
            if (this.mStopEventFromPropagatingFurther)
            {
                return;
            }
            this.mStopEventFromPropagatingFurther = true;
            CustomCheckbox customCheckbox = sender as CustomCheckbox;

            customCheckbox.IsChecked = new bool?(true);
            this.ParentWindow.mSelectedInstancesForSync.Add(customCheckbox.Tag.ToString());
            this.ToggleSelectAllCheckboxSelection();
            if (this.ParentWindow.mIsSynchronisationActive)
            {
                HTTPUtils.SendRequestToEngineAsync("startSyncConsumer", new Dictionary <string, string>()
                {
                    {
                        "instance",
                        this.ParentWindow.mVmName
                    }
                }, BlueStacksUIUtils.DictWindows[(sender as CustomCheckbox).Tag.ToString()].mVmName, 0, (Dictionary <string, string>)null, false, 1, 0, "bgp");
                BlueStacksUIUtils.DictWindows[customCheckbox.Tag.ToString()]._TopBar.ShowSyncPanel(false);
                if (!BlueStacksUIUtils.sSyncInvolvedInstances.Contains(customCheckbox.Tag.ToString()))
                {
                    BlueStacksUIUtils.sSyncInvolvedInstances.Add(customCheckbox.Tag.ToString());
                }
                this.UpdateOtherSyncWindows(false);
            }
            else
            {
                this.ToggleStartSyncButton();
            }
            this.mStopEventFromPropagatingFurther = false;
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                ((FrameworkElement)target).Loaded += new RoutedEventHandler(this.InstanceView_Loaded);
                break;

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

            case 3:
                this.mInstanceCheckbox = (CustomCheckbox)target;
                break;

            case 4:
                this.mInstanceName = (CustomTextBox)target;
                break;

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

            case 6:
                this.mUpdateDownloadProgressBar = (ProgressBarControl)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mMaskBorder = (Border)target;
                break;

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

            case 3:
                this.mScriptsListScrollbar = (ScrollViewer)target;
                break;

            case 4:
                this.mSelectAllBtn        = (CustomCheckbox)target;
                this.mSelectAllBtn.Click += new RoutedEventHandler(this.SelectAllBtn_Click);
                break;

            case 5:
                this.mExportBtn        = (CustomButton)target;
                this.mExportBtn.Click += new RoutedEventHandler(this.ExportBtn_Click);
                break;

            case 6:
                this.mLoadingGrid = (ProgressBar)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mContent            = (CustomCheckbox)target;
                this.mContent.Checked   += new RoutedEventHandler(this.box_Checked);
                this.mContent.Unchecked += new RoutedEventHandler(this.box_Unchecked);
                break;

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

            case 3:
                this.mImportName = (CustomTextBox)target;
                break;

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

            default:
                this._contentLoaded = true;
                break;
            }
        }
 internal void Init()
 {
     try
     {
         foreach (MacroRecording vertex in (Collection <BiDirectionalVertex <MacroRecording> >)MacroGraph.Instance.Vertices)
         {
             this.ParentWindow.mIsScriptsPresent = true;
             if (!this.mNameRecordingDict.ContainsKey(vertex.Name.ToLower(CultureInfo.InvariantCulture)))
             {
                 this.mNameRecordingDict.Add(vertex.Name.ToLower(CultureInfo.InvariantCulture), vertex);
                 CustomCheckbox customCheckbox1 = new CustomCheckbox();
                 customCheckbox1.Content      = (object)vertex.Name;
                 customCheckbox1.TextFontSize = 12.0;
                 customCheckbox1.Margin       = new Thickness(0.0, 6.0, 0.0, 6.0);
                 CustomCheckbox customCheckbox2 = customCheckbox1;
                 customCheckbox2.Checked    += new RoutedEventHandler(this.Box_Checked);
                 customCheckbox2.Unchecked  += new RoutedEventHandler(this.Box_Unchecked);
                 customCheckbox2.ImageMargin = new Thickness(2.0);
                 customCheckbox2.MaxHeight   = 20.0;
                 this.mScriptsStackPanel.Children.Add((UIElement)customCheckbox2);
             }
         }
         this.mNumberOfFilesSelectedForExport = 0;
     }
     catch (Exception ex)
     {
         Logger.Error("Error in export window init err: " + ex.ToString());
     }
 }
 public static void InitializeControl(
     CustomCheckbox custom,
     DocumentContainer container,
     ErrorProvider provider)
 {
     custom.DocumentLoaded = true;
     custom.Initialize(container);
 }
示例#7
0
        public WinFormsToggle(Widget shellobject, string caption, bool isbutton)
            : base(shellobject)
        {
            checkbox                   = new CustomCheckbox();
            checkbox.Text              = caption;
            checkbox.CheckedChanged   += delegate { ((Toggle)shellobject).OnChanged(); };
            checkbox.Enter            += delegate { ((Toggle)ShellObject).OnEnter(); };
            checkbox.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;

            if (isbutton)
            {
                checkbox.Appearance = System.Windows.Forms.Appearance.Button;
                checkbox.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mBackground = (Border)target;
                break;

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

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

            case 4:
                this.mClosebtn = (CustomPictureBox)target;
                this.mClosebtn.MouseLeftButtonUp += new MouseButtonEventHandler(this.mClosebtn_MouseLeftButtonUp);
                break;

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

            case 6:
                this.mYesBtn             = (Button)target;
                this.mYesBtn.Click      += new RoutedEventHandler(this.mYesBtn_Click);
                this.mYesBtn.MouseEnter += new MouseEventHandler(this.mYesBtn_MouseEnter);
                this.mYesBtn.MouseLeave += new MouseEventHandler(this.mYesBtn_MouseLeave);
                break;

            case 7:
                this.mCloseBluestacks = (TextBlock)target;
                this.mCloseBluestacks.MouseLeftButtonUp += new MouseButtonEventHandler(this.mCloseBluestacks_MouseLeftButtonUp);
                break;

            case 8:
                this.mPreferenceCheckBox          = (CustomCheckbox)target;
                this.mPreferenceCheckBox.Checked += new RoutedEventHandler(this.mPreferenceCheckBox_Checked);
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        private void GenerateCheckBox()
        {
            CustomCheckbox customCheckbox = new CustomCheckbox();

            BlueStacksUIBinding.Bind((ToggleButton)customCheckbox, "STRING_DOWNLOAD_GOOGLE_APP_POPUP_STRING_04");
            if (customCheckbox.Image != null)
            {
                customCheckbox.Image.Height = 14.0;
                customCheckbox.Image.Width  = 14.0;
            }
            customCheckbox.Height     = 20.0;
            customCheckbox.Margin     = new Thickness(0.0, 10.0, 0.0, 0.0);
            customCheckbox.IsChecked  = new bool?(false);
            customCheckbox.Checked   += new RoutedEventHandler(this.DontShowAgainCB_Checked);
            customCheckbox.Unchecked += new RoutedEventHandler(this.DontShowAgainCB_Unchecked);
            this.mOptionsStackPanel.Children.Add((UIElement)customCheckbox);
        }
示例#10
0
 private static void IsCheckedPropertyChanged
     (DependencyObject source, DependencyPropertyChangedEventArgs e)
 {
     if (source is CustomCheckbox)
     {
         CustomCheckbox control = source as CustomCheckbox;
         bool           value   = (bool)e.NewValue;
         if (value)
         {
             control.diagonal1.Visibility = Visibility.Visible;
             control.diagonal2.Visibility = Visibility.Visible;
         }
         else
         {
             control.diagonal1.Visibility = Visibility.Hidden;
             control.diagonal2.Visibility = Visibility.Hidden;
         }
     }
 }
示例#11
0
        private void InstanceCheckbox_Unchecked(object sender, RoutedEventArgs e)
        {
            if (this.mStopEventFromPropagatingFurther)
            {
                return;
            }
            this.mStopEventFromPropagatingFurther = true;
            CustomCheckbox customCheckbox = sender as CustomCheckbox;

            customCheckbox.IsChecked = new bool?(false);
            this.ParentWindow.mSelectedInstancesForSync.Remove(customCheckbox.Tag.ToString());
            this.ToggleSelectAllCheckboxSelection();
            if (this.ParentWindow.mIsSynchronisationActive)
            {
                HTTPUtils.SendRequestToEngineAsync("stopSyncConsumer", (Dictionary <string, string>)null, customCheckbox.Tag.ToString(), 0, (Dictionary <string, string>)null, false, 1, 0, "bgp");
                BlueStacksUIUtils.DictWindows[customCheckbox.Tag.ToString()]._TopBar.HideSyncPanel();
                if (BlueStacksUIUtils.sSyncInvolvedInstances.Contains(customCheckbox.Tag.ToString()))
                {
                    BlueStacksUIUtils.sSyncInvolvedInstances.Remove(customCheckbox.Tag.ToString());
                }
                if (this.ParentWindow.mSelectedInstancesForSync.Count == 0)
                {
                    this.ParentWindow.mIsSynchronisationActive = false;
                    this.ParentWindow.mIsSyncMaster            = false;
                    if (BlueStacksUIUtils.sSyncInvolvedInstances.Contains(this.ParentWindow.mVmName))
                    {
                        BlueStacksUIUtils.sSyncInvolvedInstances.Remove(this.ParentWindow.mVmName);
                    }
                    this.ParentWindow._TopBar.HideSyncPanel();
                    this.ParentWindow.mFrontendHandler.SendFrontendRequestAsync("stopOperationsSync", new Dictionary <string, string>());
                }
                this.UpdateOtherSyncWindows(false);
            }
            if (!this.ParentWindow.mIsSynchronisationActive)
            {
                this.ToggleStartSyncButton();
            }
            this.mStopEventFromPropagatingFurther = false;
        }
        internal void Init()
        {
            try
            {
                this.mNumberOfSchemesSelectedForExport = 0;
                this.ParentWindow.OriginalLoadedConfig.ControlSchemes.Where <IMControlScheme>((Func <IMControlScheme, bool>)(scheme => scheme.BuiltIn)).ToList <IMControlScheme>().ForEach((System.Action <IMControlScheme>)(scheme => AddSchemeToExportCheckbox(scheme)));
                this.ParentWindow.OriginalLoadedConfig.ControlSchemes.Where <IMControlScheme>((Func <IMControlScheme, bool>)(scheme => !scheme.BuiltIn)).ToList <IMControlScheme>().ForEach((System.Action <IMControlScheme>)(scheme =>
                {
                    if (this.dict.Keys.Contains <string>(scheme.Name.ToLower(CultureInfo.InvariantCulture).Trim()))
                    {
                        scheme.Name += " (Edited)";
                        scheme.Name  = KMManager.GetUniqueName(scheme.Name, (IEnumerable <string>) this.ParentWindow.OriginalLoadedConfig.ControlSchemesDict.Keys);
                    }
                    AddSchemeToExportCheckbox(scheme);
                }));
            }
            catch (Exception ex)
            {
                Logger.Error("Error in export window init err: " + ex.ToString());
            }

            void AddSchemeToExportCheckbox(IMControlScheme scheme)
            {
                this.dict.Add(scheme.Name.ToLower(CultureInfo.InvariantCulture).Trim(), scheme);
                CustomCheckbox customCheckbox1 = new CustomCheckbox();

                customCheckbox1.Content      = (object)scheme.Name;
                customCheckbox1.TextFontSize = 14.0;
                customCheckbox1.ImageMargin  = new Thickness(2.0);
                customCheckbox1.Margin       = new Thickness(0.0, 1.0, 0.0, 1.0);
                customCheckbox1.MaxHeight    = 20.0;
                CustomCheckbox customCheckbox2 = customCheckbox1;

                customCheckbox2.Checked   += new RoutedEventHandler(this.Box_Checked);
                customCheckbox2.Unchecked += new RoutedEventHandler(this.Box_Unchecked);
                this.mSchemesStackPanel.Children.Add((UIElement)customCheckbox2);
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mTitleGrid = (Grid)target;
                break;

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

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

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

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

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

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

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

            case 9:
                this.mDoNotShowChkBox = (CustomCheckbox)target;
                break;

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

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

            case 12:
                this.mMinimizeBtn = (CustomButton)target;
                break;

            case 13:
                this.mQuitBtn = (CustomButton)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
示例#14
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 2:
                this.mBorder = (Border)target;
                break;

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

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

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

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

            case 7:
                this.mLoadingImage = (Image)target;
                break;

            case 8:
                this.mCategoryStackPanel = (StackPanel)target;
                break;

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

            case 10:
                this.mCategoryComboBox = (CustomComboBox)target;
                this.mCategoryComboBox.PreviewMouseDown += new MouseButtonEventHandler(this.mCategoryComboBox_PreviewMouseDown);
                this.mCategoryComboBox.SelectionChanged += new SelectionChangedEventHandler(this.CategoryChanged);
                break;

            case 11:
                this.mSubCategoryStackPanel = (StackPanel)target;
                break;

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

            case 13:
                this.mSubCategoryCombobox = (CustomComboBox)target;
                this.mSubCategoryCombobox.PreviewMouseDown += new MouseButtonEventHandler(this.mSubCategoryCombobox_PreviewMouseDown);
                this.mSubCategoryCombobox.SelectionChanged += new SelectionChangedEventHandler(this.SubCategoryChanged);
                break;

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

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

            case 16:
                this.mAppListComboBox = (CustomComboBox)target;
                this.mAppListComboBox.PreviewMouseDown += new MouseButtonEventHandler(this.mAppListComboBox_PreviewMouseDown);
                break;

            case 17:
                this.mAppNameGrid = (Grid)target;
                break;

            case 18:
                this.mAppNameTextBox = (CustomTextBox)target;
                break;

            case 19:
                this.mDescribeProblemTextBlock = (TextBlock)target;
                break;

            case 20:
                this.mDescribeProblemTextBox = (CustomTextBox)target;
                this.mDescribeProblemTextBox.GotKeyboardFocus += new KeyboardFocusChangedEventHandler(this.DescribeProblemTextBox_GotKeyboardFocus);
                break;

            case 21:
                this.mChooseButton = (CustomButton)target;
                this.mChooseButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mChooseButton_PreviewMouseLeftButtonUp);
                break;

            case 22:
                this.mAttachedFilesListBox = (ListBox)target;
                break;

            case 23:
                this.mEmailTextBlock = (TextBlock)target;
                break;

            case 24:
                this.mEmailTextBox = (CustomTextBox)target;
                this.mEmailTextBox.GotKeyboardFocus += new KeyboardFocusChangedEventHandler(this.EmailTextBox_GotKeyboardFocus);
                break;

            case 25:
                this.mAlIOemsCheckbox            = (CustomCheckbox)target;
                this.mAlIOemsCheckbox.Unchecked += new RoutedEventHandler(this.mAllInstancesCheckbox_Unchecked);
                break;

            case 26:
                this.mHelpIcon            = (CustomPictureBox)target;
                this.mHelpIcon.MouseDown += new MouseButtonEventHandler(this.CustomPictureBox_MouseDown);
                break;

            case 27:
                this.mStartAllOemsCheckbox = (CustomCheckbox)target;
                break;

            case 28:
                this.mBtn = (CustomButton)target;
                this.mBtn.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mSubmitBtn_PreviewMouseLeftButtonUp);
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mScrollBar = (ScrollViewer)target;
                break;

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

            case 3:
                this.mNoInternetWarning = (Border)target;
                break;

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

            case 5:
                this.mChooseProfile          = (CustomRadioButton)target;
                this.mChooseProfile.Checked += new RoutedEventHandler(this.Profile_Checked);
                break;

            case 6:
                this.mPredefinedProfilesComboBox = (CustomComboBox)target;
                this.mPredefinedProfilesComboBox.SelectionChanged += new SelectionChangedEventHandler(this.mPredefinedProfilesComboBox_SelectionChanged);
                break;

            case 7:
                this.mCustomProfile          = (CustomRadioButton)target;
                this.mCustomProfile.Checked += new RoutedEventHandler(this.Profile_Checked);
                break;

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

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

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

            case 11:
                this.mModelNumberTextBox = (CustomTextBox)target;
                break;

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

            case 13:
                ((ButtonBase)target).Click += new RoutedEventHandler(this.TryAgainBtn_Click);
                break;

            case 14:
                this.mMobileOperatorGrid = (Grid)target;
                break;

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

            case 16:
                this.mMobileNetworkSetupText = (TextBlock)target;
                break;

            case 17:
                this.mMobileOperatorsCombobox = (CustomComboBox)target;
                this.mMobileOperatorsCombobox.SelectionChanged += new SelectionChangedEventHandler(this.MobileOperatorsCombobox_SelectionChanged);
                break;

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

            case 19:
                this.mEnableRootAccessCheckBox        = (CustomCheckbox)target;
                this.mEnableRootAccessCheckBox.Click += new RoutedEventHandler(this.mEnableRootAccessCheckBox_Click);
                break;

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

            case 21:
                this.mSaveChangesBtn        = (CustomButton)target;
                this.mSaveChangesBtn.Click += new RoutedEventHandler(this.SaveChangesBtn_Click);
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
示例#16
0
 internal void Init(bool closeSyncWindowIfEmpty = false)
 {
     this.mIsActiveWindowPresent = false;
     this.mActiveWindowsPanel.Children.Clear();
     foreach (KeyValuePair <string, MainWindow> dictWindow in BlueStacksUIUtils.DictWindows)
     {
         if (dictWindow.Key != this.ParentWindow.mVmName && (!BlueStacksUIUtils.sSyncInvolvedInstances.Contains(dictWindow.Key) || this.ParentWindow.mSelectedInstancesForSync.Contains(dictWindow.Key)))
         {
             CustomCheckbox customCheckbox1 = new CustomCheckbox();
             customCheckbox1.Content = (object)SynchronizerWindow.GetInstanceGameOrDisplayName(dictWindow.Key);
             customCheckbox1.Tag     = (object)dictWindow.Key;
             CustomCheckbox customCheckbox2 = customCheckbox1;
             if (customCheckbox2.Image != null)
             {
                 customCheckbox2.Image.Height = 16.0;
                 customCheckbox2.Image.Width  = 16.0;
             }
             customCheckbox2.Height   = 25.0;
             customCheckbox2.FontSize = 16.0;
             customCheckbox2.Margin   = new Thickness(12.0, 8.0, 0.0, 0.0);
             if (this.ParentWindow.mSelectedInstancesForSync.Contains(customCheckbox2.Tag.ToString()))
             {
                 customCheckbox2.IsChecked = new bool?(true);
             }
             else
             {
                 customCheckbox2.IsChecked = new bool?(false);
             }
             customCheckbox2.MouseEnter += new MouseEventHandler(this.InstanceCheckbox_MouseEnter);
             customCheckbox2.MouseLeave += new MouseEventHandler(this.InstanceCheckbox_MouseLeave);
             customCheckbox2.Checked    += new RoutedEventHandler(this.InstanceCheckbox_Checked);
             customCheckbox2.Unchecked  += new RoutedEventHandler(this.InstanceCheckbox_Unchecked);
             this.mActiveWindowsPanel.Children.Add((UIElement)customCheckbox2);
             this.mIsActiveWindowPresent = true;
             this.mActiveWindowsListScrollbar.Visibility = Visibility.Visible;
         }
     }
     if (this.mIsActiveWindowPresent)
     {
         this.mLaunchInstanceManagerBtn.Visibility = Visibility.Collapsed;
         this.mNoActiveWindowsGrid.Visibility      = Visibility.Collapsed;
         this.mStartSyncBtn.Visibility             = Visibility.Visible;
         if (this.ParentWindow.mIsSynchronisationActive)
         {
             this.mStartSyncBtn.IsEnabled = false;
         }
         else
         {
             this.ToggleStartSyncButton();
         }
         this.ToggleSelectAllCheckboxSelection();
     }
     else if (closeSyncWindowIfEmpty || FeatureManager.Instance.IsCustomUIForNCSoft)
     {
         this.Close_MouseLeftButtonUp((object)null, (MouseButtonEventArgs)null);
     }
     else
     {
         this.mActiveWindowsListScrollbar.Visibility = Visibility.Collapsed;
         this.mNoActiveWindowsGrid.Visibility        = Visibility.Visible;
         this.mStartSyncBtn.Visibility             = Visibility.Collapsed;
         this.mLaunchInstanceManagerBtn.Visibility = Visibility.Visible;
     }
 }
示例#17
0
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                ((Window)target).Activated += new EventHandler(this.SynchronizerWindow_Activated);
                break;

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

            case 3:
                this.mTopGrid            = (Grid)target;
                this.mTopGrid.MouseDown += new MouseButtonEventHandler(this.Topbar_MouseDown);
                break;

            case 4:
                ((UIElement)target).MouseLeftButtonUp += new MouseButtonEventHandler(this.Close_MouseLeftButtonUp);
                break;

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

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

            case 7:
                this.mActiveWindowsListScrollbar = (ScrollViewer)target;
                break;

            case 8:
                this.mSelectAllCheckbox            = (CustomCheckbox)target;
                this.mSelectAllCheckbox.Checked   += new RoutedEventHandler(this.mSelectAll_Checked);
                this.mSelectAllCheckbox.Unchecked += new RoutedEventHandler(this.mSelectAll_Unchecked);
                break;

            case 9:
                this.mActiveWindowsPanel = (StackPanel)target;
                break;

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

            case 11:
                this.mLineSeperator1 = (Border)target;
                break;

            case 12:
                this.mStartSyncBtn        = (CustomButton)target;
                this.mStartSyncBtn.Click += new RoutedEventHandler(this.mStartSyncBtn_Click);
                break;

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

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

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

            default:
                this._contentLoaded = true;
                break;
            }
        }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mMainGrid = (Grid)target;
                break;

            case 2:
                this.mContent            = (CustomCheckbox)target;
                this.mContent.Checked   += new RoutedEventHandler(this.Box_Checked);
                this.mContent.Unchecked += new RoutedEventHandler(this.Box_Unchecked);
                break;

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

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

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

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

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

            case 8:
                this.mRenameBtn          = (CustomRadioButton)target;
                this.mRenameBtn.Checked += new RoutedEventHandler(this.ConflictingMacroHandlingRadioBtn_Checked);
                break;

            case 9:
                this.mImportName              = (CustomTextBox)target;
                this.mImportName.TextChanged += new TextChangedEventHandler(this.ImportName_TextChanged);
                break;

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

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

            case 12:
                this.mDependentScriptsPanel = (StackPanel)target;
                break;

            default:
                this._contentLoaded = true;
                break;
            }
        }
 public void Visit(CustomCheckbox control)
 {
     control.DocumentLoaded = true;
     control.Initialize(container);
 }
        void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mMOBASkillSettingsPopup = (MOBASkillSettingsPopup)target;
                break;

            case 2:
                this.popupPanel = (StackPanel)target;
                break;

            case 3:
                this.mBorder = (Border)target;
                break;

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

            case 5:
                this.mHeaderGrid = (Grid)target;
                break;

            case 6:
                this.mHelpIcon             = (CustomPictureBox)target;
                this.mHelpIcon.MouseEnter += new MouseEventHandler(this.HelpIcon_MouseEnter);
                break;

            case 7:
                this.mQuickSkill = (CustomRadioButton)target;
                this.mQuickSkill.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(this.MobaSkillsRadioButton_PreviewMouseLeftButtonDown);
                break;

            case 8:
                this.mAutoSkill = (CustomRadioButton)target;
                this.mAutoSkill.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(this.MobaSkillsRadioButton_PreviewMouseLeftButtonDown);
                break;

            case 9:
                this.mManualSkill = (CustomRadioButton)target;
                this.mManualSkill.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(this.MobaSkillsRadioButton_PreviewMouseLeftButtonDown);
                break;

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

            case 11:
                this.mOtherSettingsHelpIcon             = (CustomPictureBox)target;
                this.mOtherSettingsHelpIcon.MouseEnter += new MouseEventHandler(this.OtherSettingsHelpIcon_MouseEnter);
                break;

            case 12:
                this.mStopMovementCheckbox            = (CustomCheckbox)target;
                this.mStopMovementCheckbox.Checked   += new RoutedEventHandler(this.StopMovementCheckbox_Checked);
                this.mStopMovementCheckbox.Unchecked += new RoutedEventHandler(this.StopMovementCheckbox_Unchecked);
                break;

            case 13:
                this.mMoreSettingsGrid = (Grid)target;
                this.mMoreSettingsGrid.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.MoreSettingsGrid_PreviewMouseLeftButtonUp);
                break;

            case 14:
                this.DownArrow = (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.NotificationSettings_Loaded);
                break;

            case 2:
                this.mScroll = (ScrollViewer)target;
                break;

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

            case 4:
                this.mMinimzeOnCloseCheckBox        = (CustomCheckbox)target;
                this.mMinimzeOnCloseCheckBox.Click += new RoutedEventHandler(this.CheckBox_Click);
                break;

            case 5:
                this.mReadMoreSection = (Label)target;
                this.mReadMoreSection.MouseLeftButtonUp += new MouseButtonEventHandler(this.mReadMoreSection_MouseLeftButtonUp);
                break;

            case 6:
                this.mCollapsedArrow = (System.Windows.Shapes.Path)target;
                break;

            case 7:
                this.mExpandededArrow = (System.Windows.Shapes.Path)target;
                break;

            case 8:
                this.mNotificationModeToggleButton = (CustomToggleButtonWithState)target;
                this.mNotificationModeToggleButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mNotificationModeToggleButton_PreviewMouseLeftButtonUp);
                break;

            case 9:
                this.mNotifModeInfoGrid = (Border)target;
                break;

            case 10:
                ((UIElement)target).MouseLeftButtonDown += new MouseButtonEventHandler(this.ReadMoreLinkMouseLeftButtonUp);
                break;

            case 11:
                this.mNotificationSoundToggleButton = (CustomToggleButtonWithState)target;
                this.mNotificationSoundToggleButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mNotificationSoundToggleButton_PreviewMouseLeftButtonUp);
                break;

            case 12:
                this.mRibbonHelp             = (CustomPictureBox)target;
                this.mRibbonHelp.MouseEnter += new MouseEventHandler(this.mRibbonHelp_MouseEnter);
                this.mRibbonHelp.MouseLeave += new MouseEventHandler(this.mRibbonHelp_MouseLeave);
                break;

            case 13:
                this.mRibbonNotificationsToggleButton = (CustomToggleButtonWithState)target;
                this.mRibbonNotificationsToggleButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mRibbonNotificationsToggleButton_PreviewMouseLeftButtonUp);
                break;

            case 14:
                this.mRibbonPopup = (CustomPopUp)target;
                break;

            case 15:
                this.mToastHelp             = (CustomPictureBox)target;
                this.mToastHelp.MouseEnter += new MouseEventHandler(this.mToastHelp_MouseEnter);
                this.mToastHelp.MouseLeave += new MouseEventHandler(this.mToastHelp_MouseLeave);
                break;

            case 16:
                this.mToastNotificationsToggleButton = (CustomToggleButtonWithState)target;
                this.mToastNotificationsToggleButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mToastNotificationsToggleButton_PreviewMouseLeftButtonUp);
                break;

            case 17:
                this.mToastPopup = (CustomPopUp)target;
                break;

            case 18:
                this.mGamepadNotificationHelp             = (CustomPictureBox)target;
                this.mGamepadNotificationHelp.MouseEnter += new MouseEventHandler(this.mGamepadNotificationHelp_MouseEnter);
                this.mGamepadNotificationHelp.MouseLeave += new MouseEventHandler(this.mGamepadNotificationHelp_MouseLeave);
                break;

            case 19:
                this.mGamepadDesktopNotificationToggle = (CustomToggleButtonWithState)target;
                this.mGamepadDesktopNotificationToggle.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mGamepadDesktopNotificationToggleButton_PreviewMouseLeftButtonUp);
                break;

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

            case 21:
                this.mAppSpecificNotificationsToggleButton = (CustomToggleButtonWithState)target;
                this.mAppSpecificNotificationsToggleButton.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(this.mAppSpecificNotificationsToggleButton_PreviewMouseLeftButtonUp);
                break;

            case 22:
                this.mHeaders = (Grid)target;
                break;

            case 23:
                this.mBellHelp             = (CustomPictureBox)target;
                this.mBellHelp.MouseEnter += new MouseEventHandler(this.mBellHelp_MouseEnter);
                this.mBellHelp.MouseLeave += new MouseEventHandler(this.mBellHelp_MouseLeave);
                break;

            case 24:
                this.mBellPopup = (CustomPopUp)target;
                break;

            case 25:
                this.mDesktopHelp             = (CustomPictureBox)target;
                this.mDesktopHelp.MouseEnter += new MouseEventHandler(this.mDesktopHelp_MouseEnter);
                this.mDesktopHelp.MouseLeave += new MouseEventHandler(this.mDesktopHelp_MouseLeave);
                break;

            case 26:
                this.mDesktopPopup = (CustomPopUp)target;
                break;

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

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

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