當前位置: 首頁>>代碼示例>>C#>>正文


C# CardOrientation類代碼示例

本文整理匯總了C#中CardOrientation的典型用法代碼示例。如果您正苦於以下問題:C# CardOrientation類的具體用法?C# CardOrientation怎麽用?C# CardOrientation使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CardOrientation類屬於命名空間,在下文中一共展示了CardOrientation類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Card

 public Card( int rank, CardSuit suit, CardOrientation orientation = CardOrientation.FaceDown )
 {
     if ( rank < (int)CardRank.Ace || rank > (int)CardRank.King )
      {
     throw new ArgumentException( "Invalid card rank" );
      }
      InitCard( (CardRank) rank, suit, orientation );
 }
開發者ID:arudnitsky,項目名稱:Solitaire,代碼行數:8,代碼來源:Card.cs

示例2: RotateReq

 public void RotateReq(int card, CardOrientation rot)
 {
     broadcaster.Rotate(clients[sender].id, card, rot);
 }
開發者ID:YoshiEnVerde,項目名稱:OCTGN,代碼行數:4,代碼來源:Handler.cs

示例3: SetOrientation

 internal void SetOrientation(CardOrientation value)
 {
     if (value == _rot) return;
     _rot = value;
     OnPropertyChanged("Orientation");
 }
開發者ID:voidbeast,項目名稱:OCTGN,代碼行數:6,代碼來源:Card.cs

示例4: RotateReq

		public void RotateReq(Card card, CardOrientation rot)
		{
						//Log.Info("[ProtOut] RotateReq");
					    if(Program.Client == null)return;
			MemoryStream stream = new MemoryStream(512);
			stream.Seek(4, SeekOrigin.Begin);
			BinaryWriter writer = new BinaryWriter(stream);

      if (Program.Client.Muted != 0)
          writer.Write(Program.Client.Muted);
      else
          writer.Write(0);
			writer.Write((byte)46);
			writer.Write(card.Id);
			writer.Write((byte)rot);
			writer.Flush(); writer.Seek(0, SeekOrigin.Begin);
			writer.Write((int)stream.Length);
			writer.Close();
			Send(stream.ToArray());
		}
開發者ID:rexperalta,項目名稱:OCTGN,代碼行數:20,代碼來源:BinaryStubs.cs

示例5: RotateReq

 public void RotateReq(int card, CardOrientation rot)
 {
     _broadcaster.Rotate(_clients[_sender].Id, card, rot);
 }
開發者ID:saturnattack,項目名稱:OCTGN,代碼行數:4,代碼來源:Handler.cs

示例6: RotateReq

        public void RotateReq(Card card, CardOrientation rot)
        {
            var sb = new StringBuilder();
            XmlWriter writer = XmlWriter.Create(sb, XmlSettings);

            writer.WriteStartElement("RotateReq");
            if (Program.Client.Muted != 0)
                writer.WriteAttributeString("muted", Program.Client.Muted.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString("card", card.Id.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString("rot", rot.ToString());
            writer.WriteEndElement();
            writer.Close();
            Send(sb.ToString());
        }
開發者ID:0M3G4,項目名稱:OCTGN,代碼行數:14,代碼來源:XmlStubs.cs

示例7: Rotate

 public void Rotate(Player player, Card card, CardOrientation rot)
 {
     // Ignore the moves we made ourselves
     if (player == Player.LocalPlayer)
         return;
     new Rotate(player, card, rot).Do();
 }
開發者ID:Kamalisk,項目名稱:OCTGN,代碼行數:7,代碼來源:ClientHandler.cs

示例8: Rotate

 public void Rotate(byte player, int card, CardOrientation rot)
 {
     if (xml != null)
     xml.Rotate(player, card, rot);
       if (bin != null)
     bin.Rotate(player, card, rot);
       Send();
 }
開發者ID:kellyelton,項目名稱:octgnwlobby,代碼行數:8,代碼來源:Broadcaster.cs

示例9: SetOrientation

 internal void SetOrientation(CardOrientation value)
 {
     if(value != rot)
     {
         rot = value;
         OnPropertyChanged("Orientation");
     }
 }
開發者ID:YoshiEnVerde,項目名稱:OCTGN,代碼行數:8,代碼來源:Card.cs

示例10: InitCard

 private void InitCard( CardRank rank, CardSuit suit, CardOrientation orientation )
 {
     Orientation = orientation;
      Rank = rank;
      Suit = suit;
      if ( Suit == CardSuit.Hearts || Suit == CardSuit.Diamonds )
      {
     Color = CardColor.Red;
      }
      else
      {
     Color = CardColor.Black;
      }
 }
開發者ID:arudnitsky,項目名稱:Solitaire,代碼行數:14,代碼來源:Card.cs

示例11: Rotate

 public Rotate(Player who, Card card, CardOrientation rot)
 {
     this.who = who; this.card = card; this.rot = rot;
     oldRot = card.Orientation;
 }
開發者ID:kellyelton,項目名稱:octgnwlobby,代碼行數:5,代碼來源:Rotate.cs

示例12: RotateReq

        public void RotateReq(Card card, CardOrientation rot)
        {
            MemoryStream stream = new MemoryStream(512);
            stream.Seek(4, SeekOrigin.Begin);
            BinaryWriter writer = new BinaryWriter(stream);

              if (Script.ScriptEngine.CurrentScript != null && Script.ScriptEngine.CurrentScript.muted)
              writer.Write(Script.ScriptEngine.CurrentScript.GetUniqueId());
              else if (Program.Client.Muted != 0)
              writer.Write(Program.Client.Muted);
              else
              writer.Write(0);
            writer.Write((byte)50);
            writer.Write(card.Id);
            writer.Write((byte)rot);
            writer.Flush(); writer.Seek(0, SeekOrigin.Begin);
            writer.Write((int)stream.Length);
            writer.Close();
            Send(stream.ToArray());
        }
開發者ID:kellyelton,項目名稱:octgnwlobby,代碼行數:20,代碼來源:BinaryStubs.cs

示例13: Rotate

 public Rotate(Player who, Card card, CardOrientation rot)
 {
     _who = who;
     _card = card;
     _rot = rot;
 }
開發者ID:rexperalta,項目名稱:OCTGN,代碼行數:6,代碼來源:Rotate.cs

示例14: RotateReq

 public void RotateReq(int card, CardOrientation rot)
 {
     _broadcaster.Rotate(State.Instance.GetPlayer(_sender).Id, card, rot);
 }
開發者ID:Keterr,項目名稱:OCTGN,代碼行數:4,代碼來源:Handler.cs

示例15: Rotate

        public void Rotate(byte player, int card, CardOrientation rot)
        {
            StringBuilder sb = new StringBuilder();
            XmlWriter writer = XmlWriter.Create(sb, xmlSettings);

            writer.WriteStartElement("Rotate");
            if (handler.muted != 0)
                writer.WriteAttributeString("muted", handler.muted.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString("player", player.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString("card", card.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString("rot", rot.ToString());
            writer.WriteEndElement();
            writer.Close();
            Send(sb.ToString());
        }
開發者ID:kellyelton,項目名稱:octgnwlobby,代碼行數:15,代碼來源:XmlStubs.cs


注:本文中的CardOrientation類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。