本文整理汇总了C#中Deck.MakeAllCardsDragable方法的典型用法代码示例。如果您正苦于以下问题:C# Deck.MakeAllCardsDragable方法的具体用法?C# Deck.MakeAllCardsDragable怎么用?C# Deck.MakeAllCardsDragable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Deck
的用法示例。
在下文中一共展示了Deck.MakeAllCardsDragable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewGame
public void NewGame()
{
rowDecks = new List<Deck>();
stackDecks = new List<Deck>();
gameShape.Game = new Game();
//Dealer
dealer = new Deck(1, 13, gameShape.Game);
dealer.Shuffle(5);
dealer.FlipAllCards();
dealer.EnableAllCards(false);
dealer.MakeAllCardsDragable(false);
dealer.Enabled = false;
Dealer.Deck = dealer;
gameShape.DeckShapes.Add(Dealer);
Dealer.DeckMouseLeftButtonDown += new MouseButtonEventHandler(Dealer_DeckMouseLeftButtonDown);
//Ground
ground = new Deck(gameShape.Game);
Ground.Deck = ground;
Ground.UpdateCardShapes();
gameShape.DeckShapes.Add(Ground);
//Row Decks
for (int i = 0; i < 7; i++)
{
Deck deck = new Deck(gameShape.Game);
rowDecks.Add(deck);
DeckShape deckShape = new DeckShape();
gameShape.DeckShapes.Add(deckShape);
deckShape.CardSpacerY = 20;
deckShape.MaxCardsSpace = 10;
deckShape.Deck = deck;
this.LayoutRoot.Children.Add(deckShape);
Canvas.SetLeft(deckShape, 25 + (i * 85));
Canvas.SetTop(deckShape, 150);
dealer.Draw(deck, i + 1);
deck.TopCard.Visible = true;
deck.TopCard.Enabled = true;
deck.TopCard.IsDragable = true;
}
//Stack Decks
for (int i = 0; i < 4; i++)
{
Deck deck = new Deck(gameShape.Game);
stackDecks.Add(deck);
DeckShape deckShape = new DeckShape();
gameShape.DeckShapes.Add(deckShape);
deckShape.CardSpacerY = 1;
deckShape.MaxCardsSpace = 10;
deckShape.Deck = deck;
this.LayoutRoot.Children.Add(deckShape);
Canvas.SetLeft(deckShape, 280 + (i * 85));
Canvas.SetTop(deckShape, 24);
}
dealer.TopCard.Enabled = true;
dealer.TopCard.IsDragable = false;
}