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


C# Deck.Clone方法代码示例

本文整理汇总了C#中Deck.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Deck.Clone方法的具体用法?C# Deck.Clone怎么用?C# Deck.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Deck的用法示例。


在下文中一共展示了Deck.Clone方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UseDeck

		public void UseDeck(Deck selected)
		{
			_game.Reset();

			if(selected != null)
			{
				DeckList.Instance.ActiveDeck = selected;
				_game.SetPremadeDeck((Deck)selected.Clone());
				UpdateMenuItemVisibility();
			}
			//needs to be true for automatic deck detection to work
			HsLogReaderV2.Instance.Reset(true);
			Overlay.Update(false);
			Overlay.SortViews();
		}
开发者ID:ZaxariasOmorths,项目名称:Hearthstone-Deck-Tracker,代码行数:15,代码来源:MainWindow.xaml.cs

示例2: UseDeck

		public async void UseDeck(Deck selected)
		{
			_game.Reset();

			if(selected != null)
			{
				DeckList.Instance.ActiveDeck = selected;
				_game.SetPremadeDeck((Deck)selected.Clone());
				UpdateMenuItemVisibility();
			}
			//needs to be true for automatic deck detection to work
			await LogReaderManager.Restart();
			Overlay.Update(false);
			Overlay.UpdatePlayerCards();
			PlayerWindow.UpdatePlayerCards();
		}
开发者ID:JeromeDane,项目名称:Hearthstone-Deck-Tracker,代码行数:16,代码来源:MainWindow.xaml.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:christopher7694,项目名称:Hearthstone-Deck-Tracker,代码行数:30,代码来源:MainWindow_NewDeck.cs

示例4: RunTests

        public static void RunTests()
        {
            Console.WriteLine("Testing the Deck class");

            Deck d = new Deck();
            Deck dc = d.Clone();

            for (int i = 0; i < 20; i++)
            {
                d.shuffle();

                Console.WriteLine("Shuffle {0}:", i + 1);
                Console.WriteLine("Original:" + Environment.NewLine + dc.ToString());
                Console.WriteLine("Shuffled:" + Environment.NewLine + d.ToString());
                Console.WriteLine("Returned to original order: {0}", d.Equals(dc));
                Console.WriteLine("-----------------------");

                if (d.Equals(dc))
                {
                    return;
                }
            }
        }
开发者ID:vtsvang,项目名称:cis-23,代码行数:23,代码来源:DeckTester.cs

示例5: SetNewDeck

        public void SetNewDeck(Deck deck, bool editing = false)
        {
            if (deck != null)
            {
                ClearNewDeckSection();
                _newContainsDeck = true;
                EditingDeck = editing;

                NewDeck = (Deck)deck.Clone();
                ListViewNewDeck.ItemsSource = NewDeck.Cards;
                Helper.SortCardCollection(ListViewNewDeck.ItemsSource, false);

                if (ComboBoxSelectClass.Items.Contains(NewDeck.Class))
                    ComboBoxSelectClass.SelectedValue = NewDeck.Class;

                TextBoxDeckName.Text = NewDeck.Name;
                UpdateNewDeckHeader(true);
                UpdateDbListView();
            }
        }
开发者ID:WodeCraft,项目名称:Hearthstone-Deck-Tracker,代码行数:20,代码来源:MainWindow.xaml.cs

示例6: SetNewDeck

		private void SetNewDeck(Deck deck, bool editing = false)
		{
			if (deck != null)
			{
				ClearNewDeckSection();
				_newContainsDeck = true;
				_editingDeck = editing;

				_newDeck = (Deck)deck.Clone();
				ListViewNewDeck.ItemsSource = _newDeck.Cards;

				if (ComboBoxSelectClass.Items.Contains(_newDeck.Class))
					ComboBoxSelectClass.SelectedValue = _newDeck.Class;

				TextBoxDeckName.Text = _newDeck.Name;
				UpdateNewDeckHeader(true);
				UpdateDbListView();
			}
		}
开发者ID:noonanes,项目名称:Hearthstone-Deck-Tracker,代码行数:19,代码来源:MainWindow.xaml.cs

示例7: UseDeck

		private void UseDeck(Deck selected)
		{
			_game.Reset();

			if (selected != null)
				_game.SetPremadeDeck((Deck)selected.Clone());

			_logReader.Reset(true);

			_overlay.SortViews();

		}
开发者ID:noonanes,项目名称:Hearthstone-Deck-Tracker,代码行数:12,代码来源:MainWindow.xaml.cs

示例8: SetNewDeck

		public void SetNewDeck(Deck deck, bool editing = false)
		{
			if(deck != null)
			{
				ClearNewDeckSection();
				DeselectDeck();
				EditingDeck = editing;
				if(editing)
					editedDeckName = deck.Name;
				_newDeck = (Deck)deck.Clone();
				ListViewDeck.ItemsSource = _newDeck.Cards;
				Helper.SortCardCollection(ListViewDeck.ItemsSource, false);
				TextBoxDeckName.Text = _newDeck.Name;
				UpdateDbListView();
				ExpandNewDeck();
				UpdateTitle();
			}
		}
开发者ID:JulioCL,项目名称:Hearthstone-Deck-Tracker,代码行数:18,代码来源:MainWindow_NewDeck.cs


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