当前位置: 首页>>代码示例>>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;未经允许,请勿转载。