本文整理汇总了C#中Client.Gump.GetTag方法的典型用法代码示例。如果您正苦于以下问题:C# Gump.GetTag方法的具体用法?C# Gump.GetTag怎么用?C# Gump.GetTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client.Gump
的用法示例。
在下文中一共展示了Gump.GetTag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Entry_OnHighlight
private void Entry_OnHighlight(Gump g)
{
if (g.HasTag("HueID"))
{
int tag = (int) g.GetTag("HueID");
if ((tag >= 2) && (tag < 0x3ea))
{
tag -= 2;
int num2 = tag % 5;
tag /= 5;
int num3 = tag % 20;
tag /= 20;
int num4 = tag;
this.m_Picker.Brightness = num2;
this.m_Picker.ShadeX = num3;
this.m_Picker.ShadeY = num4;
this.m_Brightness.Refresh();
}
}
}
示例2: YellHue_OnHueSelect
private static void YellHue_OnHueSelect(Gump g)
{
World.CharData.YellHue = ((GHuePicker) g.GetTag("Hue Picker")).Hue;
Renderer.SetText(m_Text);
((GTextButton) g.GetTag("Button")).DefaultHue = Hues.Load(((GHuePicker) g.GetTag("Hue Picker")).Hue);
Gumps.Destroy(g.Parent);
m_DyeWindowOpen = false;
}
示例3: AppearanceHuePicker_OnHueSelect
public static void AppearanceHuePicker_OnHueSelect(int Hue, Gump Sender)
{
GImage tag = (GImage) Sender.GetTag("Image");
if ((((int) tag.GetTag("ItemID")) == 0) || !Map.m_ItemFlags[((int) tag.GetTag("ItemID")) & 0x3fff][TileFlag.PartialHue])
{
Hue ^= 0x8000;
}
tag.Hue = Hues.Load(Hue);
}
示例4: StringQueryCancel_OnClick
public static void StringQueryCancel_OnClick(Gump Sender)
{
if ((Sender.HasTag("Dialog") && Sender.HasTag("Serial")) && Sender.HasTag("Type"))
{
Gumps.Destroy((Gump) Sender.GetTag("Dialog"));
Network.Send(new PStringQueryCancel((int) Sender.GetTag("Serial"), (short) Sender.GetTag("Type")));
}
}
示例5: UpdateStaticSlider_OnValueChange
public static void UpdateStaticSlider_OnValueChange(double Value, double Old, Gump Sender)
{
if ((((Sender.HasTag("Static") && Sender.HasTag("Font")) && (Sender.HasTag("Hue") && Sender.HasTag("Slider1"))) && (Sender.HasTag("Slider2") && Sender.HasTag("Slider3"))) && Sender.HasTag("Max"))
{
GLabel tag = (GLabel) Sender.GetTag("Static");
IFont font = (IFont) Sender.GetTag("Font");
IHue hue = (IHue) Sender.GetTag("Hue");
GSlider[] sliderArray = new GSlider[3];
for (int i = 0; i < 3; i++)
{
sliderArray[i] = (GSlider) Sender.GetTag(string.Format("Slider{0}", i + 1));
}
double num2 = (double) Sender.GetTag("Max");
if (((tag != null) && (font != null)) && (hue != null))
{
GSlider slider = null;
GSlider slider2 = null;
GSlider slider3 = null;
double num3 = -1000.0;
double num4 = 1000.0;
for (int j = 0; j < 3; j++)
{
if ((sliderArray[j] != Sender) && (sliderArray[j].GetValue() < num4))
{
num4 = sliderArray[j].GetValue();
slider2 = sliderArray[j];
}
else if (sliderArray[j] == Sender)
{
slider3 = sliderArray[j];
}
}
for (int k = 0; k < 3; k++)
{
if (((sliderArray[k] != Sender) && (sliderArray[k] != slider2)) && (sliderArray[k].GetValue() > num3))
{
num3 = sliderArray[k].GetValue();
slider = sliderArray[k];
}
}
if (((slider3 == null) || (slider == null)) || (slider2 == null))
{
tag.Text = Value.ToString();
}
else
{
slider2.SetValue(num2 - (Value + slider.GetValue()), false);
slider.SetValue(num2 - (Value + slider2.GetValue()), false);
slider3.SetValue(num2 - (slider2.GetValue() + slider.GetValue()), false);
Value = slider3.GetValue();
slider2.SetValue(num2 - (Value + slider.GetValue()), false);
slider.SetValue(num2 - (Value + slider2.GetValue()), false);
slider3.SetValue(num2 - (slider2.GetValue() + slider.GetValue()), false);
Value = slider3.GetValue();
tag.Text = slider3.GetValue().ToString();
if (((slider2.GetValue() + slider.GetValue()) + slider3.GetValue()) != num2)
{
tag.Hue = Hues.Load(0x66d);
}
else
{
tag.Hue = hue;
}
((GLabel) slider2.GetTag("Static")).Text = slider2.GetValue().ToString();
((GLabel) slider.GetTag("Static")).Text = slider.GetValue().ToString();
}
}
}
}
示例6: QuickLogin_OnClick
public static void QuickLogin_OnClick(Gump g)
{
int tag = (int) g.GetTag("Index");
Entry entry = (Entry) QuickLogin.Entries[tag];
m_QuickLogin = true;
m_QuickEntry = entry;
Cursor.Hourglass = true;
Gumps.Desktop.Children.Clear();
xGumps.Display("Connecting");
DrawNow();
if (Network.Connect())
{
Gumps.Desktop.Children.Clear();
xGumps.Display("AccountVerify");
}
else
{
Gumps.Desktop.Children.Clear();
xGumps.SetVariable("FailMessage", "Couldn't connect to the login server. Either the server is down, or you've entered an invalid host / port. Check Client.cfg.");
xGumps.Display("ConnectionFailed");
Cursor.Hourglass = false;
m_QuickLogin = false;
return;
}
Network.Send(new PLoginSeed());
Network.Send(new PAccount(entry.AccountName, entry.Password));
}
示例7: Server_OnClick
public static void Server_OnClick(Gump Sender)
{
Cursor.Hourglass = true;
NewConfig.LastServerID = (int) Sender.GetTag("ServerID");
NewConfig.Save();
Network.Send(new PHardwareInfo());
Network.Send(new PServerSelection((int) Sender.GetTag("ServerID")));
for (int i = 0; i < m_Servers.Length; i++)
{
if (m_Servers[i].ServerID == NewConfig.LastServerID)
{
m_ServerName = m_Servers[i].Name;
}
}
Gumps.Desktop.Children.Clear();
xGumps.Display("Connecting");
Macros.Load();
DrawNow();
}
示例8: CharSkill_OnClick
public static void CharSkill_OnClick(Gump Sender)
{
if (Sender.HasTag("Box"))
{
GTextButton tag = (GTextButton) Sender.GetTag("Box");
Skill skill = Skills[((GListItem) Sender.GetTag("Clicked")).Index];
tag.SetTag("Skill", ((GListItem) Sender.GetTag("Clicked")).Index);
tag.Text = skill.Name;
((GTextButton) Sender.GetTag("Box")).DefaultHue = Hues.Load(0x76b);
((GTextButton) Sender.GetTag("Box")).FocusHue = Hues.Load(0x961);
Sender.RemoveTag("Box");
}
}
示例9: CharSlot_OnClick
public static void CharSlot_OnClick(Gump Sender)
{
if (Sender.HasTag("CharID"))
{
int tag = (int) Sender.GetTag("CharID");
Entry e = new Entry {
AccountName = NewConfig.Username,
Password = NewConfig.Password,
CharID = tag,
CharName = m_CharacterNames[tag],
ServerID = NewConfig.LastServerID
};
for (int i = 0; i < m_Servers.Length; i++)
{
if (m_Servers[i].ServerID == e.ServerID)
{
e.ServerName = m_Servers[i].Name;
}
}
QuickLogin.Add(e);
Cursor.Hourglass = true;
Network.Send(new PCharSelect(m_CharacterNames[tag], tag));
if (Animations.IsLoading)
{
Gumps.Desktop.Children.Clear();
xGumps.Display("AnimationLoad");
do
{
DrawNow();
}
while (!Animations.WaitLoading());
}
Gumps.Desktop.Children.Clear();
xGumps.Display("EnterBritannia");
DrawNow();
}
}
示例10: CharGender_OnClick
public static void CharGender_OnClick(Gump Sender)
{
GImage tag = (GImage) Sender.GetTag("Image");
int num = (((int) Sender.GetTag("Gender")) == 0) ? 1 : 0;
GButton button = (GButton) Sender;
button.SetGumpID(0x710 - (num * 3));
button.SetTag("Gender", num);
((Gump) Sender.GetTag("Arrow")).SetTag("Gender", num);
int[,] numArray = new int[,] { { 0x761, 0x760 }, { 0x739, 0x714 }, { 0x738, 0x764 }, { 0x753, 0x737 }, { 0x759, 0 }, { 0x762, 0x763 } };
for (int i = 0; i < 6; i++)
{
((GImage) Sender.GetTag(string.Format("Image[{0}]", i))).GumpID = numArray[i, num];
}
bool flag = num == 0;
((Gump) Sender.GetTag("HideHS")).Visible = flag;
((Gump) Sender.GetTag("HideTB")).Visible = flag;
((Gump) Sender.GetTag("HideHP")).Visible = flag;
}
示例11: CharSkillBox_OnClick
public static void CharSkillBox_OnClick(Gump Sender)
{
if (((Gump) Sender.GetTag("List")).HasTag("Box"))
{
((GTextButton) ((Gump) Sender.GetTag("List")).GetTag("Box")).DefaultHue = Hues.Load(0x76b);
((GTextButton) ((Gump) Sender.GetTag("List")).GetTag("Box")).FocusHue = Hues.Load(0x961);
}
((Gump) Sender.GetTag("List")).SetTag("Box", Sender);
((GTextButton) Sender).DefaultHue = ((GTextButton) Sender).FocusHue = Hues.Load(0x676);
}
示例12: CharCreationSkillsArrow_OnClick
public static void CharCreationSkillsArrow_OnClick(Gump Sender)
{
int str = Convert.ToInt32(((GLabel) Sender.GetTag("Strength")).Text);
int dex = Convert.ToInt32(((GLabel) Sender.GetTag("Dexterity")).Text);
int @int = Convert.ToInt32(((GLabel) Sender.GetTag("Intelligence")).Text);
int num4 = Convert.ToInt32(((GLabel) Sender.GetTag("vSkill1")).Text);
int num5 = Convert.ToInt32(((GLabel) Sender.GetTag("vSkill2")).Text);
int num6 = Convert.ToInt32(((GLabel) Sender.GetTag("vSkill3")).Text);
int tag = (int) ((Gump) Sender.GetTag("iSkill1")).GetTag("Skill");
int num8 = (int) ((Gump) Sender.GetTag("iSkill2")).GetTag("Skill");
int num9 = (int) ((Gump) Sender.GetTag("iSkill3")).GetTag("Skill");
if (((num4 + num5) + num6) != 100)
{
Gumps.MessageBoxOk("The total of all your skills must equal 100.0", true, null);
}
else if (((str + dex) + @int) != 80)
{
Gumps.MessageBoxOk("The total of all your stats must equal 100.0", true, null);
}
else if (tag == -1)
{
GTextButton sender = (GTextButton) Sender.GetTag("iSkill1");
CharSkillBox_OnClick(sender);
Cursor.MoveTo(sender);
}
else if (num8 == -1)
{
GTextButton button2 = (GTextButton) Sender.GetTag("iSkill2");
CharSkillBox_OnClick(button2);
Cursor.MoveTo(button2);
}
else if (num9 == -1)
{
GTextButton button3 = (GTextButton) Sender.GetTag("iSkill3");
CharSkillBox_OnClick(button3);
Cursor.MoveTo(button3);
}
else if (tag == num8)
{
GTextButton button4 = (GTextButton) Sender.GetTag("iSkill2");
CharSkillBox_OnClick(button4);
Cursor.MoveTo(button4);
}
else if ((tag == num9) || (num8 == num9))
{
GTextButton button5 = (GTextButton) Sender.GetTag("iSkill3");
CharSkillBox_OnClick(button5);
Cursor.MoveTo(button5);
}
else
{
ShowCharAppearance(str, dex, @int, num4, num5, num6, tag, num8, num9);
}
}
示例13: CharCreationAppearanceArrow_OnClick
public static void CharCreationAppearanceArrow_OnClick(Gump Sender)
{
int tag = (int) Sender.GetTag("Strength");
int dex = (int) Sender.GetTag("Dexterity");
int @int = (int) Sender.GetTag("Intelligence");
int num4 = (int) Sender.GetTag("vSkill1");
int num5 = (int) Sender.GetTag("vSkill2");
int num6 = (int) Sender.GetTag("vSkill3");
int num7 = (int) Sender.GetTag("iSkill1");
int num8 = (int) Sender.GetTag("iSkill2");
int num9 = (int) Sender.GetTag("iSkill3");
int hSkinTone = ((GHuePreview) Sender.GetTag("Skin Tone")).Hue | 0x8000;
int hShirtColor = ((GHuePreview) Sender.GetTag("Shirt Color")).Hue & 0x7fff;
int hPantsColor = ((GHuePreview) Sender.GetTag("Pants Color")).Hue & 0x7fff;
int hHairColor = ((GHuePreview) Sender.GetTag("Hair Color")).Hue & 0x7fff;
int hFacialHairColor = ((GHuePreview) Sender.GetTag("Facial Hair Color")).Hue & 0x7fff;
string name = ((GTextBox) Sender.GetTag("Name")).String;
int gender = (int) Sender.GetTag("Gender");
if ((((num4 + num5) + num6) == 100) && ((((((tag + dex) + @int) == 80) && (num7 != -1)) && ((num8 != -1) && (num9 != -1))) && (((num7 != num8) && (num7 != num9)) && (num8 != num9))))
{
if ((name == null) || (name.Length <= 1))
{
((GTextBox) Sender.GetTag("Name")).Focus();
Cursor.MoveTo((GTextBox) Sender.GetTag("Name"));
}
else
{
ShowCharCitySelection(tag, dex, @int, num4, num5, num6, num7, num8, num9, hSkinTone, hShirtColor, hPantsColor, hHairColor, hFacialHairColor, name, gender);
}
}
}
示例14: Entry_OnClick
private void Entry_OnClick(Gump Sender)
{
int tag = (int) Sender.GetTag("EntryID");
Network.Send(new PPopupResponse(this.m_Owner, tag));
Gumps.Destroy(this);
}
示例15: ListView_OnValueChange
public static void ListView_OnValueChange(double Value, double Old, Gump Sender)
{
if (Sender.HasTag("ListBox"))
{
GListBox tag = (GListBox) Sender.GetTag("ListBox");
if (tag != null)
{
tag.StartIndex = (int) Value;
}
}
}