当前位置: 首页>>代码示例>>C#>>正文


C# Deck.Clone方法代码示例

本文整理汇总了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();
		}
开发者ID:the-gods-are-cruel,项目名称:Hearthstone-Deck-Tracker,代码行数:16,代码来源:MainWindow.xaml.cs

示例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);
		}
开发者ID:JDurman,项目名称:Hearthstone-Deck-Tracker,代码行数:31,代码来源:MainWindow.NewDeck.cs

示例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);
			}
		}
开发者ID:kaosrq,项目名称:Hearthstone-Deck-Tracker,代码行数:30,代码来源:MainWindow_NewDeck.cs


注:本文中的Hearthstone_Deck_Tracker.Hearthstone.Deck.Clone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。