本文整理汇总了C#中Client.Gump.SetTag方法的典型用法代码示例。如果您正苦于以下问题:C# Gump.SetTag方法的具体用法?C# Gump.SetTag怎么用?C# Gump.SetTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client.Gump
的用法示例。
在下文中一共展示了Gump.SetTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HuePicker_OnHueSelect
public static void HuePicker_OnHueSelect(int Hue, Gump Sender)
{
if ((Sender.HasTag("Dialog") && Sender.HasTag("Item Art")) && Sender.HasTag("ItemID"))
{
GItemArt art;
Gump tag = (Gump) Sender.GetTag("Dialog");
Gump g = (Gump) Sender.GetTag("Item Art");
Gumps.Destroy(g);
art = new GItemArt(0xb7, 3, (int) Sender.GetTag("ItemID"), Hues.GetItemHue((int) Sender.GetTag("ItemID"), Hue)) {
X = art.X + (((0x3a - (art.Image.xMax - art.Image.xMin)) / 2) - art.Image.xMin),
Y = art.Y + (((0x52 - (art.Image.yMax - art.Image.yMin)) / 2) - art.Image.yMin)
};
tag.Children.Add(art);
Sender.SetTag("Item Art", art);
}
}
示例2: Parse_Tag
private static bool Parse_Tag(XmlTextReader xml, Gump Parent)
{
string name = "";
string str2 = "";
object @int = "";
bool isEmptyElement = xml.IsEmptyElement;
while (xml.MoveToNextAttribute())
{
switch (xml.Name)
{
case "Name":
{
name = GetString(xml.Value);
continue;
}
case "Names":
{
name = xml.Value;
continue;
}
case "Type":
{
str2 = GetString(xml.Value);
continue;
}
case "Types":
{
str2 = xml.Value;
continue;
}
case "Value":
switch (str2)
{
case "String":
{
@int = GetString(xml.Value);
continue;
}
case "Integer":
{
@int = GetInt(xml.Value);
continue;
}
case "Boolean":
{
@int = GetBool(xml.Value);
continue;
}
case "Font":
{
@int = GetFont(xml.Value);
continue;
}
case "Hue":
{
@int = GetHue(xml.Value);
continue;
}
case "Gump":
{
@int = GetGump(xml.Value);
continue;
}
}
return false;
}
return false;
}
if (!isEmptyElement)
{
Skip(xml);
}
Parent.SetTag(name, @int);
return true;
}