本文整理汇总了C#中ChessGame.GetTagValue方法的典型用法代码示例。如果您正苦于以下问题:C# ChessGame.GetTagValue方法的具体用法?C# ChessGame.GetTagValue怎么用?C# ChessGame.GetTagValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChessGame
的用法示例。
在下文中一共展示了ChessGame.GetTagValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Set
public void Set(ChessGame g)
{
idx = -1;
move = null;
total_moves = 0;
if (g == null)
{
player = ChessGamePlayer.
CreatePlayer ();
return;
}
player = g.HasTag ("FEN") ? ChessGamePlayer.
CreateFromFEN (g.
GetTagValue ("FEN",
null)) :
ChessGamePlayer.CreatePlayer ();
game = g;
int n = game.Moves.Count;
if (n > 0)
{
total_moves = n;
}
if (total_moves == 0)
hasNext = false;
else
hasNext = true;
}
示例2: UpdateLabels
void UpdateLabels(ChessGame game)
{
string white, black;
if (game == null)
{
white = Catalog.GetString ("White");
black = Catalog.GetString ("Black");
}
else
{
white = game.GetTagValue
("White", "White");
black = game.
GetTagValue
("Black", "Black");
}
white = GetMarkupForTitle (white);
black = GetMarkupForTitle (black);
if (boardWidget.WhiteAtBottom)
{
topLabel.Markup = black;
bottomLabel.Markup = white;
}
else
{
topLabel.Markup = white;
bottomLabel.Markup = black;
}
}