本文整理汇总了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 );
}
示例2: RotateReq
public void RotateReq(int card, CardOrientation rot)
{
broadcaster.Rotate(clients[sender].id, card, rot);
}
示例3: SetOrientation
internal void SetOrientation(CardOrientation value)
{
if (value == _rot) return;
_rot = value;
OnPropertyChanged("Orientation");
}
示例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());
}
示例5: RotateReq
public void RotateReq(int card, CardOrientation rot)
{
_broadcaster.Rotate(_clients[_sender].Id, card, rot);
}
示例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());
}
示例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();
}
示例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();
}
示例9: SetOrientation
internal void SetOrientation(CardOrientation value)
{
if(value != rot)
{
rot = value;
OnPropertyChanged("Orientation");
}
}
示例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;
}
}
示例11: Rotate
public Rotate(Player who, Card card, CardOrientation rot)
{
this.who = who; this.card = card; this.rot = rot;
oldRot = card.Orientation;
}
示例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());
}
示例13: Rotate
public Rotate(Player who, Card card, CardOrientation rot)
{
_who = who;
_card = card;
_rot = rot;
}
示例14: RotateReq
public void RotateReq(int card, CardOrientation rot)
{
_broadcaster.Rotate(State.Instance.GetPlayer(_sender).Id, card, rot);
}
示例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());
}