本文整理汇总了C#中Hearthstone_Deck_Tracker.Hearthstone.Deck.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Deck.Clone方法的具体用法?C# Deck.Clone怎么用?C# Deck.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hearthstone_Deck_Tracker.Hearthstone.Deck
的用法示例。
在下文中一共展示了Deck.Clone方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UseDeck
public async void UseDeck(Deck selected)
{
Core.Game.Reset();
if(selected != null)
{
DeckList.Instance.ActiveDeck = selected;
Core.Game.SetPremadeDeck((Deck)selected.Clone());
UpdateMenuItemVisibility();
}
//needs to be true for automatic deck detection to work
await LogReaderManager.Restart();
Core.Overlay.Update(false);
Core.Overlay.UpdatePlayerCards();
Core.Windows.PlayerWindow.UpdatePlayerCards();
}
示例2: SetNewDeck
public void SetNewDeck(Deck deck, bool editing = false)
{
if(deck == null)
return;
ClearNewDeckSection();
SelectDeck(null, false);
EditingDeck = editing;
if(editing)
{
_editedDeckName = deck.Name;
_originalDeck = deck;
}
_newDeck = (Deck)deck.Clone();
_newDeck.Cards.Clear();
foreach(var card in deck.GetSelectedDeckVersion().Cards)
_newDeck.Cards.Add(card.Clone() as Card);
_newDeck.SelectedVersion = _newDeck.Version;
UpdateExpansionIcons();
ListViewDeck.ItemsSource = _newDeck.Cards;
Helper.SortCardCollection(ListViewDeck.ItemsSource, false);
TextBoxDeckName.Text = _newDeck.Name;
BorderConstructedCardLimits.Visibility = _newDeck.IsArenaDeck ? Collapsed : Visible;
CheckBoxConstructedCardLimits.IsChecked = true;
UpdateDeckHistoryPanel(deck, !editing);
UpdateDbListView();
ExpandNewDeck();
UpdateCardCount();
ManaCurveMyDecks.SetDeck(_newDeck);
}
示例3: SetNewDeck
public void SetNewDeck(Deck deck, bool editing = false)
{
if(deck != null)
{
ClearNewDeckSection();
SelectDeck(null, false);
EditingDeck = editing;
if(editing)
{
editedDeckName = deck.Name;
_originalDeck = deck;
}
_newDeck = (Deck)deck.Clone();
_newDeck.Cards.Clear();
foreach(var card in deck.GetSelectedDeckVersion().Cards)
_newDeck.Cards.Add(card.Clone() as Card);
_newDeck.SelectedVersion = _newDeck.Version;
UpdateExpansionIcons();
ListViewDeck.ItemsSource = _newDeck.Cards;
Helper.SortCardCollection(ListViewDeck.ItemsSource, false);
TextBoxDeckName.Text = _newDeck.Name;
UpdateDeckHistoryPanel(deck, !editing);
UpdateDbListView();
ExpandNewDeck();
UpdateCardCount();
ManaCurveMyDecks.SetDeck(_newDeck);
}
}