本文整理汇总了C#中Client.Gump.HasTag方法的典型用法代码示例。如果您正苦于以下问题:C# Gump.HasTag方法的具体用法?C# Gump.HasTag怎么用?C# Gump.HasTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client.Gump
的用法示例。
在下文中一共展示了Gump.HasTag方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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")));
}
}
示例2: StringQueryOkay_OnClick
public static void StringQueryOkay_OnClick(Gump Sender)
{
if ((Sender.HasTag("Dialog") && Sender.HasTag("Serial")) && (Sender.HasTag("Type") && Sender.HasTag("Text")))
{
Gumps.Destroy((Gump) Sender.GetTag("Dialog"));
Network.Send(new PStringQueryResponse((int) Sender.GetTag("Serial"), (short) Sender.GetTag("Type"), ((GTextBox) Sender.GetTag("Text")).String));
}
}
示例3: 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;
}
}
}
示例4: ScrollUp_OnClick
public static void ScrollUp_OnClick(Gump Sender)
{
if (Sender.HasTag("Scroller"))
{
GVSlider tag = (GVSlider) Sender.GetTag("Scroller");
if (tag != null)
{
tag.SetValue(tag.GetValue() - tag.Increase, true);
}
}
}
示例5: HuePickerSlider_OnValueChange
public static void HuePickerSlider_OnValueChange(double Value, double Old, Gump Sender)
{
if (Sender.HasTag("Hue Picker"))
{
GHuePicker tag = (GHuePicker) Sender.GetTag("Hue Picker");
if (tag != null)
{
tag.Brightness = (int) Value;
}
}
}
示例6: 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);
}
}
示例7: HuePickerOk_OnClick
public static void HuePickerOk_OnClick(Gump Sender)
{
if ((Sender.HasTag("Dialog") && Sender.HasTag("Hue Picker")) && (Sender.HasTag("Serial") && Sender.HasTag("Relay")))
{
Gump tag = (Gump) Sender.GetTag("Dialog");
if (tag != null)
{
GHuePicker picker = (GHuePicker) Sender.GetTag("Hue Picker");
if (picker == null)
{
Gumps.Destroy(tag);
}
else
{
int serial = (int) Sender.GetTag("Serial");
short relay = (short) Sender.GetTag("Relay");
Network.Send(new PSelectHueResponse(serial, relay, (short) picker.Hue));
Gumps.Destroy(tag);
}
}
}
}
示例8: Entry_OnClick
private void Entry_OnClick(Gump g)
{
if ((g.HasTag("HueID") && g.HasTag("Buttons")) && g.HasTag("Index"))
{
int tag = (int) g.GetTag("HueID");
MouseButtons buttons = (MouseButtons) g.GetTag("Buttons");
int index = (int) g.GetTag("Index");
if ((buttons & MouseButtons.Right) != MouseButtons.None)
{
QuickHues.Remove(index);
Gumps.Destroy(this);
GQuickHues toAdd = new GQuickHues(this.m_Picker, this.m_Brightness, this.m_Okay);
if (this.m_Expanded)
{
toAdd.m_Expanded = true;
toAdd.Height = toAdd.m_ExpandedHeight;
}
base.m_Parent.Children.Add(toAdd);
}
else if ((tag >= 2) && (tag < 0x3ea))
{
tag -= 2;
int num3 = tag % 5;
tag /= 5;
int num4 = tag % 20;
tag /= 20;
int num5 = tag;
this.m_Picker.Brightness = num3;
this.m_Picker.ShadeX = num4;
this.m_Picker.ShadeY = num5;
this.m_Brightness.Refresh();
this.m_Okay.Click();
}
}
}
示例9: DestroyDialogShowAcctLogin_OnClick
public static void DestroyDialogShowAcctLogin_OnClick(Gump Sender)
{
World.Clear();
Gump g = null;
if (Sender.HasTag("Dialog"))
{
g = (Gump) Sender.GetTag("Dialog");
}
else
{
g = Sender.Parent;
}
if (g != null)
{
Gumps.Destroy(g);
Network.Disconnect();
ShowAcctLogin();
}
}
示例10: DestroyGump_OnClick
public static void DestroyGump_OnClick(Gump Sender)
{
if (Sender.HasTag("Gump"))
{
Gump tag = (Gump) Sender.GetTag("Gump");
if (tag != null)
{
Gumps.Destroy(tag);
}
}
}
示例11: 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();
}
}
示例12: 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");
}
}
示例13: 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();
}
}
}
示例14: 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();
}
}
}
}
示例15: HuePickerPicker_OnClick
public static void HuePickerPicker_OnClick(Gump Sender)
{
if (Sender.HasTag("Hue Picker") && Sender.HasTag("Brightness Bar"))
{
GHuePicker tag = (GHuePicker) Sender.GetTag("Hue Picker");
GBrightnessBar bar = (GBrightnessBar) Sender.GetTag("Brightness Bar");
if ((tag != null) && (bar != null))
{
TargetHandler = new HuePickerTargetHandler(tag, bar);
}
}
}