void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\..\Controls\ucCardIcon.xaml"
                ((Dominion.NET_WPF.Controls.ucCardIcon)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);

            #line default
            #line hidden

            #line 7 "..\..\..\Controls\ucCardIcon.xaml"
                ((Dominion.NET_WPF.Controls.ucCardIcon)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);

            #line default
            #line hidden

            #line 9 "..\..\..\Controls\ucCardIcon.xaml"
                ((Dominion.NET_WPF.Controls.ucCardIcon)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.dpName = ((System.Windows.Controls.DockPanel)(target));
                return;

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

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

            case 5:
                this.tbName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.ttCard = ((System.Windows.Controls.ToolTip)(target));
                return;

            case 7:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\..\Controls\ucCardSettings.xaml"
                ((Dominion.NET_WPF.Controls.ucCardSettings)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.gbCardName = ((System.Windows.Controls.GroupBox)(target));
                return;

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

            #line 11 "..\..\..\Controls\ucCardSettings.xaml"
                this.lName.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.lName_MouseDown);

            #line default
            #line hidden

            #line 11 "..\..\..\Controls\ucCardSettings.xaml"
                this.lName.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.lName_MouseUp);

            #line default
            #line hidden
                return;

            case 4:
                this.ttCard = ((System.Windows.Controls.ToolTip)(target));
                return;

            case 5:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;

            case 6:
                this.icCardSetting = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 19 "..\..\wCardViewer.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Window_Close_Click);

            #line default
            #line hidden
                return;

            case 2:
                this.cbSets = ((System.Windows.Controls.ComboBox)(target));

            #line 24 "..\..\wCardViewer.xaml"
                this.cbSets.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbSets_SelectionChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.cbCards = ((System.Windows.Controls.ComboBox)(target));

            #line 38 "..\..\wCardViewer.xaml"
                this.cbCards.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbCards_SelectionChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 19 "..\..\wCardViewer.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Window_Close_Click);
     
     #line default
     #line hidden
     return;
     case 2:
     this.cbSets = ((System.Windows.Controls.ComboBox)(target));
     
     #line 24 "..\..\wCardViewer.xaml"
     this.cbSets.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbSets_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 3:
     this.cbCards = ((System.Windows.Controls.ComboBox)(target));
     
     #line 38 "..\..\wCardViewer.xaml"
     this.cbCards.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbCards_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 4:
     this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 7 "..\..\..\Controls\ucICardCheckBox.xaml"
     ((Dominion.NET_WPF.Controls.ucICardCheckBox)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);
     
     #line default
     #line hidden
     
     #line 7 "..\..\..\Controls\ucICardCheckBox.xaml"
     ((Dominion.NET_WPF.Controls.ucICardCheckBox)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);
     
     #line default
     #line hidden
     
     #line 9 "..\..\..\Controls\ucICardCheckBox.xaml"
     ((Dominion.NET_WPF.Controls.ucICardCheckBox)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.spMain = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 3:
     this.cbSelected = ((System.Windows.Controls.CheckBox)(target));
     
     #line 11 "..\..\..\Controls\ucICardCheckBox.xaml"
     this.cbSelected.Checked += new System.Windows.RoutedEventHandler(this.cbSelected_Checked);
     
     #line default
     #line hidden
     return;
     case 4:
     this.lName = ((System.Windows.Controls.Label)(target));
     return;
     case 5:
     this.tbName = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.imName = ((System.Windows.Controls.Image)(target));
     return;
     case 7:
     this.ttCard = ((System.Windows.Controls.ToolTip)(target));
     return;
     case 8:
     this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
     return;
     }
     this._contentLoaded = true;
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\..\Controls\CardStackControl.xaml"
                ((Dominion.NET_WPF.Controls.CardStackControl)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);

            #line default
            #line hidden

            #line 7 "..\..\..\Controls\CardStackControl.xaml"
                ((Dominion.NET_WPF.Controls.CardStackControl)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);

            #line default
            #line hidden

            #line 9 "..\..\..\Controls\CardStackControl.xaml"
                ((Dominion.NET_WPF.Controls.CardStackControl)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.dpMain = ((System.Windows.Controls.DockPanel)(target));
                return;

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

            case 4:
                this.bImages = ((System.Windows.Controls.Button)(target));

            #line 12 "..\..\..\Controls\CardStackControl.xaml"
                this.bImages.Click += new System.Windows.RoutedEventHandler(this.b_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.dpVPCount = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 6:
                this.lVPCount = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.lVP = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.dpName = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 9:
                this.spExtraStuff = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 10:
                this.lCount = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.lName = ((System.Windows.Controls.Label)(target));
                return;

            case 12:
                this.tbName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 13:
                this.bName = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\..\Controls\CardStackControl.xaml"
                this.bName.Click += new System.Windows.RoutedEventHandler(this.b_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.ttCard = ((System.Windows.Controls.ToolTip)(target));
                return;

            case 15:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\..\Controls\SupplyControl.xaml"
                ((Dominion.NET_WPF.SupplyControl)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);

            #line default
            #line hidden

            #line 7 "..\..\..\Controls\SupplyControl.xaml"
                ((Dominion.NET_WPF.SupplyControl)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);

            #line default
            #line hidden

            #line 7 "..\..\..\Controls\SupplyControl.xaml"
                ((Dominion.NET_WPF.SupplyControl)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.stackPanel1 = ((System.Windows.Controls.StackPanel)(target));
                return;

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

            case 4:
                this.tbName = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            case 6:
                this.lCost = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.lCount = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.imCardIcon = ((System.Windows.Controls.Image)(target));
                return;

            case 9:
                this.imCardGone = ((System.Windows.Controls.Image)(target));
                return;

            case 10:
                this.imBuyOverlay = ((System.Windows.Controls.Image)(target));
                return;

            case 11:
                this.imSelectOverlay = ((System.Windows.Controls.Image)(target));
                return;

            case 12:
                this.imDisableOverlay = ((System.Windows.Controls.Image)(target));
                return;

            case 13:
                this.bBuy = ((System.Windows.Controls.Button)(target));

            #line 34 "..\..\..\Controls\SupplyControl.xaml"
                this.bBuy.Click += new System.Windows.RoutedEventHandler(this.bBuy_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.ttCard = ((System.Windows.Controls.ToolTip)(target));
                return;

            case 15:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 7 "..\..\..\Controls\ucICardButton.xaml"
     ((Dominion.NET_WPF.Controls.ucICardButton)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);
     
     #line default
     #line hidden
     
     #line 7 "..\..\..\Controls\ucICardButton.xaml"
     ((Dominion.NET_WPF.Controls.ucICardButton)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);
     
     #line default
     #line hidden
     
     #line 9 "..\..\..\Controls\ucICardButton.xaml"
     ((Dominion.NET_WPF.Controls.ucICardButton)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.bControl = ((System.Windows.Controls.Border)(target));
     return;
     case 3:
     this.bHover = ((System.Windows.Controls.Border)(target));
     return;
     case 4:
     this.lOrdinal = ((System.Windows.Controls.Label)(target));
     return;
     case 5:
     this.tbOrdinal = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.lName = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.tbName = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 8:
     this.bName = ((System.Windows.Controls.Primitives.ToggleButton)(target));
     
     #line 20 "..\..\..\Controls\ucICardButton.xaml"
     this.bName.Click += new System.Windows.RoutedEventHandler(this.b_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.ttCard = ((System.Windows.Controls.ToolTip)(target));
     return;
     case 10:
     this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 8 "..\..\..\Controls\ucCardSettings.xaml"
     ((Dominion.NET_WPF.Controls.ucCardSettings)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.gbCardName = ((System.Windows.Controls.GroupBox)(target));
     return;
     case 3:
     this.lName = ((System.Windows.Controls.Label)(target));
     
     #line 11 "..\..\..\Controls\ucCardSettings.xaml"
     this.lName.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.lName_MouseDown);
     
     #line default
     #line hidden
     
     #line 11 "..\..\..\Controls\ucCardSettings.xaml"
     this.lName.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.lName_MouseUp);
     
     #line default
     #line hidden
     return;
     case 4:
     this.ttCard = ((System.Windows.Controls.ToolTip)(target));
     return;
     case 5:
     this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
     return;
     case 6:
     this.icCardSetting = ((System.Windows.Controls.ItemsControl)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 7 "..\..\..\Controls\SupplyControl.xaml"
     ((Dominion.NET_WPF.SupplyControl)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);
     
     #line default
     #line hidden
     
     #line 7 "..\..\..\Controls\SupplyControl.xaml"
     ((Dominion.NET_WPF.SupplyControl)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);
     
     #line default
     #line hidden
     
     #line 7 "..\..\..\Controls\SupplyControl.xaml"
     ((Dominion.NET_WPF.SupplyControl)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.stackPanel1 = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 3:
     this.lName = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.tbName = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 5:
     this.spExtraStuff = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 6:
     this.lCost = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.lCount = ((System.Windows.Controls.Label)(target));
     return;
     case 8:
     this.imCardIcon = ((System.Windows.Controls.Image)(target));
     return;
     case 9:
     this.imCardGone = ((System.Windows.Controls.Image)(target));
     return;
     case 10:
     this.imBuyOverlay = ((System.Windows.Controls.Image)(target));
     return;
     case 11:
     this.imSelectOverlay = ((System.Windows.Controls.Image)(target));
     return;
     case 12:
     this.imDisableOverlay = ((System.Windows.Controls.Image)(target));
     return;
     case 13:
     this.bBuy = ((System.Windows.Controls.Button)(target));
     
     #line 34 "..\..\..\Controls\SupplyControl.xaml"
     this.bBuy.Click += new System.Windows.RoutedEventHandler(this.bBuy_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.ttCard = ((System.Windows.Controls.ToolTip)(target));
     return;
     case 15:
     this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #11
0
        public void UpdateCardDisplay()
        {
            wpCardCollections.Children.Clear();
            wpCardCollections2.Children.Clear();
            wpToolTipCards.Children.Clear();
            nPileName.Content = PileName;

            if (this.CardSize == NET_WPF.CardSize.Full && this.Pile != null && this.PileCount > 0)
            {
                foreach (DominionBase.Cards.Card card in this.Pile)
                {
                    ToolTipCard ttc = new ToolTipCard();
                    ttc.ICard  = card;
                    ttc.Margin = new Thickness(3);
                    wpToolTipCards.Children.Add(ttc);
                }
            }
            else
            {
                if (String.IsNullOrEmpty(this.PileName))
                {
                    nPileName.Visibility = System.Windows.Visibility.Collapsed;
                }
                else
                {
                    nPileName.Visibility = System.Windows.Visibility.Visible;
                }

                if (ExactCount && this.Pile != null && this.PileCount > 0)
                {
                    lCount.Visibility = System.Windows.Visibility.Visible;
                    lCount.Content    = String.Format("({0})", StringUtility.Plural("Card", this.PileCount, true));
                }
                else
                {
                    lCount.Visibility = System.Windows.Visibility.Collapsed;
                }

                WrapPanel currentWrapPanel = wpCardCollections;
                foreach (DominionBase.Cards.CardCollection cardStack in GenerateCardStacks())
                {
                    Controls.CardStackControl csc = new Controls.CardStackControl()
                    {
                        MinWidth = this.MinStackWidth
                    };
                    csc.CardSize       = this.CardSize;
                    csc.ExactCount     = this.ExactCount;
                    csc.IsCardsVisible = this.IsCardsVisible;
                    csc.Phase          = this._PlayerPhase;
                    csc.PlayerMode     = this._PlayerMode;
                    csc.PileVisibility = this.PileVisibility;
                    if (this.TokenDict != null && this.TokenDict.ContainsKey(cardStack[0]))
                    {
                        csc.Tokens = this.TokenDict[cardStack[0]];
                    }
                    csc.CardCollection = cardStack;
                    if (this.IsVPsVisible && (
                            (cardStack[0].Category & DominionBase.Cards.Category.Victory) == DominionBase.Cards.Category.Victory ||
                            (cardStack[0].Category & DominionBase.Cards.Category.Curse) == DominionBase.Cards.Category.Curse))
                    {
                        csc.CountVPs(this.Pile);
                    }
                    else
                    {
                        csc.HideVPs();
                    }

                    if (this.SplitAt != null && csc.CardCollection.Count() > 0 && csc.CardCollection.First().CardType == this.SplitAt.CardType)
                    {
                        currentWrapPanel = wpCardCollections2;
                    }

                    currentWrapPanel.Children.Add(csc);
                }
            }

            InvalidateVisual();
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 7 "..\..\..\Controls\CardStackControl.xaml"
     ((Dominion.NET_WPF.Controls.CardStackControl)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);
     
     #line default
     #line hidden
     
     #line 7 "..\..\..\Controls\CardStackControl.xaml"
     ((Dominion.NET_WPF.Controls.CardStackControl)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);
     
     #line default
     #line hidden
     
     #line 9 "..\..\..\Controls\CardStackControl.xaml"
     ((Dominion.NET_WPF.Controls.CardStackControl)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.dpMain = ((System.Windows.Controls.DockPanel)(target));
     return;
     case 3:
     this.gImages = ((System.Windows.Controls.Grid)(target));
     return;
     case 4:
     this.bImages = ((System.Windows.Controls.Button)(target));
     
     #line 12 "..\..\..\Controls\CardStackControl.xaml"
     this.bImages.Click += new System.Windows.RoutedEventHandler(this.b_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.dpVPCount = ((System.Windows.Controls.DockPanel)(target));
     return;
     case 6:
     this.lVPCount = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.lVP = ((System.Windows.Controls.Label)(target));
     return;
     case 8:
     this.dpName = ((System.Windows.Controls.DockPanel)(target));
     return;
     case 9:
     this.spExtraStuff = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 10:
     this.lCount = ((System.Windows.Controls.Label)(target));
     return;
     case 11:
     this.lName = ((System.Windows.Controls.Label)(target));
     return;
     case 12:
     this.tbName = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 13:
     this.bName = ((System.Windows.Controls.Button)(target));
     
     #line 24 "..\..\..\Controls\CardStackControl.xaml"
     this.bName.Click += new System.Windows.RoutedEventHandler(this.b_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.ttCard = ((System.Windows.Controls.ToolTip)(target));
     return;
     case 15:
     this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
     return;
     }
     this._contentLoaded = true;
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.This = ((Dominion.NET_WPF.Controls.ucCardConstraint)(target));

            #line 11 "..\..\..\Controls\ucCardConstraint.xaml"
                this.This.IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.This_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.Testing = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 3:
                this.tbFrom = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.cbMinimum = ((System.Windows.Controls.ComboBox)(target));

            #line 34 "..\..\..\Controls\ucCardConstraint.xaml"
                this.cbMinimum.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbMinimum_SelectionChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.tbTo = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.cbMaximum = ((System.Windows.Controls.ComboBox)(target));

            #line 56 "..\..\..\Controls\ucCardConstraint.xaml"
                this.cbMaximum.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbMaximum_SelectionChanged);

            #line default
            #line hidden
                return;

            case 7:
                this.bRemove = ((System.Windows.Controls.Button)(target));

            #line 77 "..\..\..\Controls\ucCardConstraint.xaml"
                this.bRemove.Click += new System.Windows.RoutedEventHandler(this.bRemove_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.cbCriteria = ((System.Windows.Controls.ComboBox)(target));

            #line 97 "..\..\..\Controls\ucCardConstraint.xaml"
                this.cbCriteria.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbCriteria_SelectionChanged);

            #line default
            #line hidden
                return;

            case 9:
                this.cbValue = ((System.Windows.Controls.ComboBox)(target));

            #line 104 "..\..\..\Controls\ucCardConstraint.xaml"
                this.cbValue.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbValue_SelectionChanged);

            #line default
            #line hidden

            #line 104 "..\..\..\Controls\ucCardConstraint.xaml"
                this.cbValue.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.cbValue_MouseDown);

            #line default
            #line hidden

            #line 104 "..\..\..\Controls\ucCardConstraint.xaml"
                this.cbValue.PreviewMouseUp += new System.Windows.Input.MouseButtonEventHandler(this.cbValue_MouseUp);

            #line default
            #line hidden
                return;

            case 10:
                this.ttCard = ((System.Windows.Controls.ToolTip)(target));
                return;

            case 11:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.This = ((Dominion.NET_WPF.Controls.ucCardConstraint)(target));
     
     #line 11 "..\..\..\Controls\ucCardConstraint.xaml"
     this.This.IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.This_IsVisibleChanged);
     
     #line default
     #line hidden
     return;
     case 2:
     this.Testing = ((System.Windows.Controls.DockPanel)(target));
     return;
     case 3:
     this.tbFrom = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 4:
     this.cbMinimum = ((System.Windows.Controls.ComboBox)(target));
     
     #line 34 "..\..\..\Controls\ucCardConstraint.xaml"
     this.cbMinimum.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbMinimum_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 5:
     this.tbTo = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 6:
     this.cbMaximum = ((System.Windows.Controls.ComboBox)(target));
     
     #line 56 "..\..\..\Controls\ucCardConstraint.xaml"
     this.cbMaximum.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbMaximum_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.bRemove = ((System.Windows.Controls.Button)(target));
     
     #line 77 "..\..\..\Controls\ucCardConstraint.xaml"
     this.bRemove.Click += new System.Windows.RoutedEventHandler(this.bRemove_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.cbCriteria = ((System.Windows.Controls.ComboBox)(target));
     
     #line 97 "..\..\..\Controls\ucCardConstraint.xaml"
     this.cbCriteria.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbCriteria_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 9:
     this.cbValue = ((System.Windows.Controls.ComboBox)(target));
     
     #line 104 "..\..\..\Controls\ucCardConstraint.xaml"
     this.cbValue.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbValue_SelectionChanged);
     
     #line default
     #line hidden
     
     #line 104 "..\..\..\Controls\ucCardConstraint.xaml"
     this.cbValue.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(this.cbValue_MouseDown);
     
     #line default
     #line hidden
     
     #line 104 "..\..\..\Controls\ucCardConstraint.xaml"
     this.cbValue.PreviewMouseUp += new System.Windows.Input.MouseButtonEventHandler(this.cbValue_MouseUp);
     
     #line default
     #line hidden
     return;
     case 10:
     this.ttCard = ((System.Windows.Controls.ToolTip)(target));
     return;
     case 11:
     this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
     return;
     }
     this._contentLoaded = true;
 }
		public void UpdateCardDisplay()
		{
			wpCardCollections.Children.Clear();
			wpCardCollections2.Children.Clear();
			wpToolTipCards.Children.Clear();
			nPileName.Content = PileName;

			if (this.CardSize == NET_WPF.CardSize.Full && this.Pile != null && this.PileCount > 0)
			{
				foreach (DominionBase.Cards.Card card in this.Pile)
				{
					ToolTipCard ttc = new ToolTipCard();
					ttc.ICard = card;
					ttc.Margin = new Thickness(3);
					wpToolTipCards.Children.Add(ttc);
				}
			}
			else
			{
				if (String.IsNullOrEmpty(this.PileName))
					nPileName.Visibility = System.Windows.Visibility.Collapsed;
				else
					nPileName.Visibility = System.Windows.Visibility.Visible;

				if (ExactCount && this.Pile != null && this.PileCount > 0)
				{
					lCount.Visibility = System.Windows.Visibility.Visible;
					lCount.Content = String.Format("({0})", StringUtility.Plural("Card", this.PileCount, true));
				}
				else
				{
					lCount.Visibility = System.Windows.Visibility.Collapsed;
				}

				WrapPanel currentWrapPanel = wpCardCollections;
				foreach (DominionBase.Cards.CardCollection cardStack in GenerateCardStacks())
				{
					Controls.CardStackControl csc = new Controls.CardStackControl() { MinWidth = this.MinStackWidth };
					csc.CardSize = this.CardSize;
					csc.ExactCount = this.ExactCount;
					csc.IsCardsVisible = this.IsCardsVisible;
					csc.Phase = this._PlayerPhase;
					csc.PlayerMode = this._PlayerMode;
					csc.PileVisibility = this.PileVisibility;
					if (this.TokenDict != null && this.TokenDict.ContainsKey(cardStack[0]))
						csc.Tokens = this.TokenDict[cardStack[0]];
					csc.CardCollection = cardStack;
					if (this.IsVPsVisible && (
						(cardStack[0].Category & DominionBase.Cards.Category.Victory) == DominionBase.Cards.Category.Victory ||
						(cardStack[0].Category & DominionBase.Cards.Category.Curse) == DominionBase.Cards.Category.Curse))
						csc.CountVPs(this.Pile);
					else
						csc.HideVPs();

					if (this.SplitAt != null && csc.CardCollection.Count() > 0 && csc.CardCollection.First().CardType == this.SplitAt.CardType)
						currentWrapPanel = wpCardCollections2;

					currentWrapPanel.Children.Add(csc);
				}
			}

			InvalidateVisual();
		}
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\..\Controls\ucICardButton.xaml"
                ((Dominion.NET_WPF.Controls.ucICardButton)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseDown);

            #line default
            #line hidden

            #line 7 "..\..\..\Controls\ucICardButton.xaml"
                ((Dominion.NET_WPF.Controls.ucICardButton)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseUp);

            #line default
            #line hidden

            #line 9 "..\..\..\Controls\ucICardButton.xaml"
                ((Dominion.NET_WPF.Controls.ucICardButton)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.UserControl_IsVisibleChanged);

            #line default
            #line hidden
                return;

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

            case 3:
                this.bHover = ((System.Windows.Controls.Border)(target));
                return;

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

            case 5:
                this.tbOrdinal = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.lName = ((System.Windows.Controls.Label)(target));
                return;

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

            case 8:
                this.bName = ((System.Windows.Controls.Primitives.ToggleButton)(target));

            #line 20 "..\..\..\Controls\ucICardButton.xaml"
                this.bName.Click += new System.Windows.RoutedEventHandler(this.b_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.ttCard = ((System.Windows.Controls.ToolTip)(target));
                return;

            case 10:
                this.ttcCard = ((Dominion.NET_WPF.ToolTipCard)(target));
                return;
            }
            this._contentLoaded = true;
        }