本文整理汇总了C#中System.Windows.Forms.ComboBox.SetEnumValues方法的典型用法代码示例。如果您正苦于以下问题:C# ComboBox.SetEnumValues方法的具体用法?C# ComboBox.SetEnumValues怎么用?C# ComboBox.SetEnumValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ComboBox
的用法示例。
在下文中一共展示了ComboBox.SetEnumValues方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowEventType
public static void ShowEventType(ComboBox combobox, ComboBox cb1, ComboBox cb2, ComboBox cb3, ComboBox cb4, Label l1, Label l2, Label l3, Label l4)
{
((GroupBox)combobox.Parent).Reset();
switch ((EventType)combobox.SelectedValue.ToUInt32())
{
case EventType.ПО_ТАЙМЕРУ_В_БОЮ:
case EventType.ПО_ТАЙМЕРУ_ВНЕ_БОЯ:
l1.Text = "Минимальное время до срабатывания (мс)";
l2.Text = "Максимальное время до срабатывания (мс)";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_ЗНАЧЕНИИ_ЖИЗНИ:
case EventType.ПРИ_ЗНАЧЕНИИ_ЖИЗНИ_ЦЕЛИ:
l1.Text = "Максимальное значение жизни %";
l2.Text = "Минимальное значение жизни %";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_ЗНАЧЕНИИ_МАНЫ:
case EventType.ПРИ_ЗНАЧЕНИИ_МАНЫ_У_ЦЕЛИ:
l1.Text = "Максимальное значение маны %";
l2.Text = "Минимальное значение маны %";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_УБИЙСТВЕ_ЦЕЛИ:
case EventType.ЕСЛИ_ЦЕЛЬ_ЧИТАЕТ_ЗАКЛИНАНИЕ:
l1.Text = "Минимальное время до повтора (мс)";
l2.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_УРОНЕ_ЗАКЛИНАНИЕМ:
l1.Text = "ID Заклинания";
new ButtonHandler(cb1, BType.SPELL, cb2, -1);
l2.Text = "Школа";
new ButtonHandler(cb2, typeof(School), cb1, 0);
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_ДИСТАНЦИИ:
l1.Text = "Минимальная дистанция до цели";
l2.Text = "Максимальная дистанция до цели";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_ПОЯВЛЕНИИ_В_ЗОНЕ_ВИДИМОСТИ:
l1.Text = "Тип цели:";
cb1.SetEnumValues<TargetFrends>();
l2.Text = "Максимальная дистанция до цели";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_ЗНАЧЕНИИ_ЖИЗНИ_ДРУЖЕСТВЕННОЙ_ЦЕЛИ:
l1.Text = "Дефицит жизни дружественной цели";
l2.Text = "В радиусе";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ЕСЛИ_ДРУЖЕСТВЕННАЯ_ЦЕЛЬ_ПОД_КОНТРОЛЕМ:
l1.Text = "Тип диспелла";
cb1.SetEnumValues<DispelType>("", "DISPEL_");
l2.Text = "В радиусе";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ЕСЛИ_ТЕРЯЕТ_БАФФ:
l1.Text = "ID спелла (заклинания)";
new ButtonHandler(cb1, BType.SPELL);
l2.Text = "В радиусе";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_ВЫЗОВЕ_СУЩЕСТВА:
l1.Text = "ID существа";
new ButtonHandler(cb1, BType.CREATURE);
l2.Text = "Минимальное время до повтора (мс)";
l3.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_ПОЛУЧЕНИИ_ЭМОЦИИ:
l1.Text = "ID эмоции";
l2.Text = "Условие";
cb1.SetDbcData(DBC.Emotes);
cb2.SetEnumValues<ConditionType>();
break;
case EventType.ПРИ_ЗНАЧЕНИИ_БАФФА:
case EventType.ПРИ_ЗНАЧЕНИИ_БАФФА_ЦЕЛИ:
l1.Text = "ID спелла";
new ButtonHandler(cb1, BType.SPELL);
l2.Text = "Количество";
l3.Text = "Минимальное время до повтора (мс)";
l4.Text = "Максимальное время до повтора (мс)";
break;
case EventType.ПРИ_СМЕРТИ_ВЫЗВАННОГО_СУЩЕСТВА:
case EventType.ПРИ_ИСЧЕЗНОВЕНИИ_ВЫЗВАННОГО_СУЩЕСТВА:
l1.Text = "ID существа";
new ButtonHandler(cb1, BType.CREATURE);
l2.Text = "Минимальное время до повтора (мс)";
l3.Text = "Максимальное время до повтора (мс)";
break;
//.........这里部分代码省略.........
示例2: ShowActionParametr
public static void ShowActionParametr(ComboBox combobox, ComboBox cb1, ComboBox cb2, ComboBox cb3, Label l1, Label l2, Label l3)
{
((GroupBox)combobox.Parent).Reset();
switch ((ActionType)combobox.SelectedValue.ToUInt32())
{
case ActionType.ТЕКСТ:
l1.Text = "ID текста 1";
//new ButtonHandler(cb1, BType.TEXT);
l2.Text = "ID текста 2";
l3.Text = "ID текста 3";
break;
case ActionType.УСТАНОВИТЬ_ФРАКЦИЮ:
l1.Text = "ID фракции";
cb1.SetDbcData(DBC.Faction);
break;
case ActionType.ИЗМЕНИТЬ_МОДЕЛЬ_СУЩЕСТВА:
l1.Text = "ID существа";
new ButtonHandler(cb1, BType.CREATURE);
l2.Text = "ID модели";
break;
case ActionType.ЗВУК:
l1.Text = "ID звука";
break;
case ActionType.ЭМОЦИЯ:
l1.Text = "ID эмоции";
cb1.SetDbcData(DBC.Emotes);
break;
case ActionType.ЧТЕНИЕ_ЗАКЛИНАНИЯ:
l1.Text = "ID спелла";
new ButtonHandler(cb1, BType.SPELL);
l2.Text = "Цель";
cb2.SetEnumValues<CastTarget>();
l3.Text = "Флаг каста";
new ButtonHandler(cb3, typeof(CastFlags));
break;
case ActionType.ПРИЗЫВ:
l1.Text = "ID существа";
new ButtonHandler(cb1, BType.CREATURE);
l2.Text = "Цель";
l3.Text = "Продолжительность (мс)";
cb2.SetEnumValues<CastTarget>();
break;
case ActionType.ИЗМЕНИТЬ_УГРОЗУ:
l1.Text = "Угроза %";
l2.Text = "Цель";
cb2.SetEnumValues<CastTarget>();
break;
case ActionType.ИЗМЕНИТЬ_УГРОЗУ_ДЛЯ_ВСЕХ:
l1.Text = "Угроза %";
break;
case ActionType.ВЫПОЛНИТЬ_УСЛОВИЕ_КВЕСТА:
l1.Text = "ID квеста";
new ButtonHandler(cb1, BType.QUEST);
l2.Text = "Цель";
cb2.SetEnumValues<CastTarget>();
break;
case ActionType.ЗАСТАВИТЬ_ЧИТАТЬ_ЗАКЛИНАНИЕ:
l1.Text = "ID существа";
new ButtonHandler(cb1, BType.CREATURE);
l2.Text = "ID спелла";
new ButtonHandler(cb2, BType.SPELL);
l3.Text = "Цель";
cb3.SetEnumValues<CastTarget>();
break;
case ActionType.ИЗМЕНИТЬ_UNIT_FIELD:
l1.Text = "Номер поля Data";
cb1.SetEnumValues<EUnitFields>("", "UNIT_FIELD_");
l2.Text = "Значение";
l3.Text = "Цель";
cb3.SetEnumValues<CastTarget>();
break;
case ActionType.ИЗМЕНИТЬ_UNIT_FLAG:
l1.Text = "Флаг существа";
new ButtonHandler(cb1, typeof(UnitFlags));
l2.Text = "Цель";
cb2.SetEnumValues<CastTarget>();
break;
case ActionType.УБРАТЬ_UNIT_FLAG:
l1.Text = "Флаг существа";
new ButtonHandler(cb1, typeof(UnitFlags));
l2.Text = "Цель";
cb2.SetEnumValues<CastTarget>();
break;
case ActionType.АВТО_АТАКА_БЛИЖНЕГО_БОЯ:
l1.Text = "Разрешить атаку в ближнем бою";
cb1.SetEnumValues<YesNO>();
break;
case ActionType.ДВИЖЕНИЕ_В_БОЮ:
l1.Text = "Разрешить движение в бою";
l2.Text = "Остановить, стартовать режим боя";
cb1.SetEnumValues<YesNO>();
cb2.SetEnumValues<YesNO>();
break;
case ActionType.УСТАНОВИТЬ_ФАЗУ:
l1.Text = "Фаза";
new ButtonHandler(cb1, typeof(Phase));
break;
case ActionType.ПОВЫСИТЬ_ФАЗУ:
l1.Text = "Значение";
//.........这里部分代码省略.........
示例3: ShowActionParametr
public static void ShowActionParametr(ComboBox combobox, ComboBox cb1, ComboBox cb2, ComboBox cb3, Label l1, Label l2, Label l3)
{
((GroupBox)combobox.Parent).Reset();
switch ((ActionType)combobox.SelectedValue.ToUInt32())
{
case ActionType.TEXT:
l1.Text = "ID Text 1";
//new ButtonHandler(cb1, BType.TEXT);
l2.Text = "ID Text 2";
l3.Text = "ID Text 3";
break;
case ActionType.SET_FACTION:
l1.Text = "FactionID";
cb1.SetDbcData(DBC.Faction, null);
break;
case ActionType.MORPH_TO_ENTRY_OR_MODEL:
l1.Text = "CreatureID";
new ButtonHandler(cb1, BType.CREATURE, null, 0);
l2.Text = "ModelID";
break;
case ActionType.SOUND:
l1.Text = "ID sound";
break;
case ActionType.EMOTE:
l1.Text = "EmoteID";
cb1.SetDbcData(DBC.Emotes, null);
break;
case ActionType.CAST:
l1.Text = "SpellId";
new ButtonHandler(cb1, BType.SPELL, null, 0);
l2.Text = "Target";
cb2.SetEnumValues<CastTarget>("", "", true);
l3.Text = "CastFlags";
new ButtonHandler(cb3, typeof(CastFlags), null, 0);
break;
case ActionType.TEMP_SUMMON:
l1.Text = "CreatureID";
new ButtonHandler(cb1, BType.CREATURE, null , 0);
l2.Text = "Target";
l3.Text = "Duration (ms)";
cb2.SetEnumValues<CastTarget>("", "", true);
break;
case ActionType.THREAT_SINGLE_PCT:
l1.Text = "Threat %";
l2.Text = "Target";
cb2.SetEnumValues<CastTarget>("", "", true);
break;
case ActionType.THREAT_ALL_PCT:
l1.Text = "Threat %";
break;
case ActionType.QUEST_EVENT:
l1.Text = "QuestID";
new ButtonHandler(cb1, BType.QUEST, null, 0);
l2.Text = "Target";
cb2.SetEnumValues<CastTarget>("", "", true);
break;
case ActionType.CASTCREATUREGO:
l1.Text = "CreatureID";
new ButtonHandler(cb1, BType.CREATURE, null , 0);
l2.Text = "SpellID";
new ButtonHandler(cb2, BType.SPELL, null , 0);
l3.Text = "Target";
cb3.SetEnumValues<CastTarget>("", "", true);
break;
case ActionType.SET_UNIT_FIELD:
l1.Text = "Field_Number";
cb1.SetEnumValues<EUnitFields>("", "UNIT_FIELD_", true);
l2.Text = "Value";
l3.Text = "Target";
cb3.SetEnumValues<CastTarget>("", "", true);
break;
case ActionType.SET_UNIT_FLAG:
l1.Text = "Flag being";
new ButtonHandler(cb1, typeof(UnitFlags), null, 0);
l2.Text = "Target";
cb2.SetEnumValues<CastTarget>("", "", true);
break;
case ActionType.REMOVE_UNIT_FLAG:
l1.Text = "Flag being";
new ButtonHandler(cb1, typeof(UnitFlags), null, 0);
l2.Text = "Target";
cb2.SetEnumValues<CastTarget>("", "", true);
break;
case ActionType.AUTO_ATTACK:
l1.Text = "AllowAutoAttack";
cb1.SetEnumValues<YesNO>("", "", true);
break;
case ActionType.COMBAT_MOVEMENT:
l1.Text = "Allow movement in battle";
l2.Text = "Stop, start combat mode";
cb1.SetEnumValues<YesNO>("", "", true);
cb2.SetEnumValues<YesNO>("", "", true);
break;
case ActionType.SET_PHASE:
l1.Text = "Phase";
new ButtonHandler(cb1, typeof(Phase), null, 0);
break;
case ActionType.INC_PHASE:
l1.Text = "Value";
//.........这里部分代码省略.........
示例4: ShowActionTyteCondition
public static void ShowActionTyteCondition(ComboBox combobox, ComboBox cb2, ComboBox cb3, ComboBox cb4, Label l3, Label l4)
{
if ((EventType)combobox.SelectedValue.ToInt32() == EventType.ПРИ_ПОЛУЧЕНИИ_ЭМОЦИИ)
{
((GroupBox)combobox.Parent).ResetButton();
l3.Text = l4.Text = string.Empty;
cb3.Reset();
cb4.Reset();
switch ((ConditionType)cb2.SelectedValue.ToUInt32())
{
case ConditionType.ПРИ_НАЛИЧИИ_АУРЫ:
l3.Text = "ID спелла";
new ButtonHandler(cb3, BType.SPELL);
l4.Text = "Время до повтора (мс)";
break;
case ConditionType.ПРИ_НАЛИЧИИ_ПРЕЕДМЕТА:
case ConditionType.ЕСЛИ_ПРЕДМЕТ_НА_ПЕРСОНАЖЕ:
l3.Text = "ID предмета";
new ButtonHandler(cb3, BType.ITEM);
l4.Text = "Количество";
break;
case ConditionType.ЕСЛИ_НАХОДИТСЯ_В_ЗОНЕ:
l3.Text = "ID зоны";
cb3.SetDbcData(DBC.AreaTable);
break;
case ConditionType.ПРИ_НАЛИЧИИ_РЕПУТАЦИИ:
l3.Text = "ID фракции";
cb3.SetDbcData(DBC.Faction);
l4.Text = "Минимальный ранг";
break;
case ConditionType.КОМАНДА:
l3.Text = "Команда";
cb3.SetEnumValues<ConditionTeam>();
break;
case ConditionType.ПРИ_НАЛИЧИИ_УМЕНИЯ:
l3.Text = "ID умения";
cb3.SetDbcData(DBC.SkillLine);
l4.Text = "Минимальный уровень прокачки";
break;
case ConditionType.ЕСЛИ_КВЕСТ_СДАН:
case ConditionType.ЕСЛИ_КВЕСТ_НЕ_СДАН:
l3.Text = "ID квеста";
new ButtonHandler(cb3, BType.QUEST);
break;
case ConditionType.ПРИ_АКТИВНОМ_ЭВЕНТЕ:
l3.Text = "ID эвента";
cb3.SetDbcData(DBC.HolidayNames);
break;
}
cb3.Visible = l3.Text != string.Empty;
cb4.Visible = l4.Text != string.Empty;
}
}
示例5: ShowGossipCondition
public static void ShowGossipCondition(ComboBox combobox, ComboBox cb1, ComboBox cb2, Label l1, Label l2)
{
((GroupBox)combobox.Parent).Reset();
switch ((Gossip_Conditions)combobox.SelectedValue.ToUInt32())
{
case Gossip_Conditions.AURA:
case Gossip_Conditions.NO_AURA:
l1.Text = "SpellID";
l2.Text = "EffIndex";
break;
case Gossip_Conditions.ITEM:
case Gossip_Conditions.NO_ITEM:
case Gossip_Conditions.ITEM_WITH_BANK:
case Gossip_Conditions.NOITEM_WITH_BANK:
l1.Text = "ItemID";
l2.Text = "Count";
break;
case Gossip_Conditions.ITEM_EQUIPPED:
l1.Text = "ItemID";
break;
case Gossip_Conditions.AREAID:
l1.Text = "Area_id";
l2.Text = "Sub or Not";
cb1.SetDbcData(DBC.AreaTable, null);
cb2.SetEnumValues<SubArea>("", "", true);
break;
case Gossip_Conditions.REPUTATION_RANK:
l1.Text = "Faction_id";
l2.Text = "minimum rank";
cb1.SetDbcData(DBC.Faction, null);
break;
case Gossip_Conditions.TEAM:
l1.Text = "Player Team";
cb1.SetEnumValues<ConditionTeam>("", "", true);
break;
case Gossip_Conditions.SKILL:
l1.Text = "Skill ID";
l2.Text = "Value";
cb1.SetDbcData(DBC.SkillLine, null);
break;
case Gossip_Conditions.QUEST_REWARDED:
case Gossip_Conditions.QUEST_TAKEN:
case Gossip_Conditions.QUEST_AVAILBLE:
case Gossip_Conditions.QUEST_NONE:
l1.Text = "Quest ID";
break;
case Gossip_Conditions.ACTIVE_EVENT:
case Gossip_Conditions.NOT_ACTIVE_GAME_EVENT:
l1.Text = "Event ID";
cb1.SetDbcData(DBC.HolidayNames, null);
break;
case Gossip_Conditions.AREA_FLAG:
l1.Text = "Flag";
l2.Text = "Not Flag";
break;
case Gossip_Conditions.RACE_CLASS:
l1.Text = "Race";
l2.Text = "Class";
cb1.SetEnumValues<Race>("", "", true);
cb2.SetEnumValues<Class>("", "", true);
break;
case Gossip_Conditions.LEVEL:
l1.Text = "Player level";
l2.Text = "status";
cb2.SetEnumValues<PlayerLevel>("", "", true);
break;
case Gossip_Conditions.SPELL:
l1.Text = "Spell ID";
l2.Text = "status";
cb2.SetEnumValues<HasOrNot>("", "", true);
break;
case Gossip_Conditions.INSTANCE_SCRIPT:
l1.Text = "Map ID";
l2.Text = "Instance Condition";
cb1.SetDbcData(DBC.Map, null);
cb2.SetEnumValues<instanceData>("", "", true);
break;
case Gossip_Conditions.ACHIEVEMENT:
l1.Text = "Achievemnt ID";
l2.Text = "status";
cb1.SetDbcData(DBC.Achievement, null);
cb2.SetEnumValues<HasOrNot>("", "", true);
break;
case Gossip_Conditions.ACHIEVEMENTREALM:
l1.Text = "Achievemnt ID";
l2.Text = "status";
cb1.SetDbcData(DBC.Achievement, null);
cb2.SetEnumValues<HasOrNot>("", "", true);
break;
case Gossip_Conditions.ACTIVE_HOLIDAY:
case Gossip_Conditions.NOT_ACTIVE_HOLIDAY:
l1.Text = "Holiday ID";
cb1.SetDbcData(DBC.HolidayNames, null);
break;
}
cb1.Visible = l1.Text != string.Empty;
cb2.Visible = l2.Text != string.Empty;
}
示例6: ShowEventType
public static void ShowEventType(ComboBox combobox, ComboBox cb1, ComboBox cb2, ComboBox cb3, ComboBox cb4, Label l1, Label l2, Label l3, Label l4)
{
((GroupBox)combobox.Parent).Reset();
switch ((EventType)combobox.SelectedValue.ToUInt32())
{
case EventType.TIMER:
case EventType.TIMER_OOC:
l1.Text = "InitialMin (мs)";
l2.Text = "InitialMax (мs)";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.HP:
case EventType.TARGET_HP:
l1.Text = "HPMax%";
l2.Text = "HPMin%";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.MANA:
case EventType.TARGET_MANA:
l1.Text = "ManaMax%";
l2.Text = "ManaMin%";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.KILL:
case EventType.TARGET_CASTING:
l1.Text = "RepeatMin (мs)";
l2.Text = "RepeatMax (мs)";
break;
case EventType.SPELLHIT:
l1.Text = "SpellID";
new ButtonHandler(cb1, BType.SPELL, cb2, -1);
l2.Text = "School";
new ButtonHandler(cb2, typeof(School), cb1, 0);
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.RANGE:
l1.Text = "MinDist";
l2.Text = "MaxDist";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.OOC_LOS:
l1.Text = "Hostile-or-Not";
cb1.SetEnumValues<TargetFrends>("", "", true);
l2.Text = "MaxAllowedRange";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.FRIENDLY_HP:
l1.Text = "HPDeficit";
l2.Text = "Radius";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.FRIENDLY_IS_CC:
l1.Text = "DispelType";
cb1.SetEnumValues<DispelType>("", "DISPEL_", true);
l2.Text = "Radius";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.FRIENDLY_MISSING_BUFF:
l1.Text = "SpellId";
new ButtonHandler(cb1, BType.SPELL, null, 0);
l2.Text = "Radius";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case EventType.SUMMONED_UNIT:
l1.Text = "CreatureId";
new ButtonHandler(cb1, BType.CREATURE, null, 0);
l2.Text = "RepeatMin (ms)";
l3.Text = "RepeatMax (ms)";
break;
case EventType.RECEIVE_EMOTE:
l1.Text = "EmoteID";
l2.Text = "condition";
cb1.SetDbcData(DBC.Emotes, null);
cb2.SetEnumValues<ConditionType>("", "", true);
break;
case EventType.AURA:
case EventType.TARGET_AURA:
case EventType.MISSING_AURA:
case EventType.TARGET_MISSING_AURA:
l1.Text = "SpellID";
new ButtonHandler(cb1, BType.SPELL, null, 0);
l2.Text = "Amount";
l3.Text = "RepeatMin (ms)";
l4.Text = "RepeatMax (ms)";
break;
case EventType.SUMMONED_JUST_DIED:
case EventType.SUMMONED_JUST_DESPAWN:
l1.Text = "CreatureId";
new ButtonHandler(cb1, BType.CREATURE, null, 0);
l2.Text = "RepeatMin (ms)";
//.........这里部分代码省略.........
示例7: ShowActionTyteCondition
public static void ShowActionTyteCondition(ComboBox combobox, ComboBox cb2, ComboBox cb3, ComboBox cb4, Label l3, Label l4)
{
if ((EventType)combobox.SelectedValue.ToInt32() == EventType.RECEIVE_EMOTE)
{
((GroupBox)combobox.Parent).ResetButton();
l3.Text = l4.Text = string.Empty;
cb3.Reset();
cb4.Reset();
switch ((ConditionType)cb2.SelectedValue.ToUInt32())
{
case ConditionType.AURA:
l3.Text = "SpellID";
new ButtonHandler(cb3, BType.SPELL, null, 0);
l4.Text = "Time to repeat (ms)";
break;
case ConditionType.ITEM:
case ConditionType.ITEM_EQUIPPED:
l3.Text = "ItemID";
new ButtonHandler(cb3, BType.ITEM, null, 0);
l4.Text = "count";
break;
case ConditionType.ZONEID:
l3.Text = "ZoneID";
cb3.SetDbcData(DBC.AreaTable, null);
break;
case ConditionType.REPUTATION_RANK:
l3.Text = "FactionID";
cb3.SetDbcData(DBC.Faction, null);
l4.Text = "Minimum Rank";
break;
case ConditionType.TEAM:
l3.Text = "Team";
cb3.SetEnumValues<ConditionTeam>("", "", true);
break;
case ConditionType.SKILL:
l3.Text = "SkillID";
cb3.SetDbcData(DBC.SkillLine, null);
l4.Text = "Minimum Skill Value";
break;
case ConditionType.QUESTREWARDED:
case ConditionType.QUESTTAKEN:
l3.Text = "QuestId";
new ButtonHandler(cb3, BType.QUEST, null, 0);
break;
case ConditionType.ACTIVE_EVENT:
l3.Text = "EventId";
cb3.SetDbcData(DBC.HolidayNames, null);
break;
}
cb3.Visible = l3.Text != string.Empty;
cb4.Visible = l4.Text != string.Empty;
}
}
示例8: ShowActionType
public static void ShowActionType(ComboBox combobox, ComboBox cb1, ComboBox cb2, ComboBox cb3, ComboBox cb4, ComboBox cb5, ComboBox cb6,
Label l1, Label l2, Label l3, Label l4, Label l5, Label l6)
{
((GroupBox)combobox.Parent).Reset();
switch ((action_type)combobox.SelectedValue.ToUInt32())
{
case action_type.TALK:
l1.Text = "GroupID";
l2.Text = "Duration Before Triggered";
break;
case action_type.SET_FACTION:
l1.Text = " FactionID ";
break;
case action_type.MORPH_TO_ENTRY_OR_MODEL:
case action_type.MOUNT_TO_ENTRY_OR_MODEL:
l1.Text = "Entry";
l2.Text = "ModelID";
break;
case action_type.SOUND:
l1.Text = "SoundId";
l2.Text = "TextRange";
break;
case action_type.PLAY_EMOTE:
case action_type.SET_EMOTE_STATE:
l1.Text = "EmoteId";
break;
case action_type.ADD_QUEST:
case action_type.FAIL_QUEST:
case action_type.CALL_AREAEXPLOREDOREVENTHAPPENS:
case action_type.CALL_GROUPEVENTHAPPENS:
l1.Text = "QuestID";
break;
case action_type.SET_REACT_STATE:
l1.Text = "State";
cb1.SetEnumValues<ReactStates>("", "", true);
break;
case action_type.RANDOM_EMOTE:
l1.Text = "EmoteId1";
l2.Text = "EmoteId2";
l3.Text = "EmoteId3";
break;
case action_type.CAST:
case action_type.INVOKER_CAST:
l1.Text = "SpellId";
l2.Text = "CastFlags";
cb2.SetEnumValues<CastFlags>("", "", true);
break;
case action_type.SUMMON_CREATURE:
l1.Text = "CreatureID";
l2.Text = "SummonType";
cb2.SetEnumValues<SummonTypes>("", "", true);
l3.Text = "Duration(ms)";
l4.Text = "StorageID (always 0)";
cb4.SelectedText = "0";
l5.Text = "AttackInvoker";
break;
case action_type.THREAT_ALL_PCT:
case action_type.THREAT_SINGLE_PCT:
l1.Text = "Threat%";
break;
case action_type.SEND_CASTCREATUREORGO:
l1.Text = "QuestID";
l2.Text = "SpellID";
break;
case action_type.SET_UNIT_FLAG:
case action_type.REMOVE_UNIT_FLAG:
l1.Text = "UnitFlag"; //add enum
break;
case action_type.AUTO_ATTACK:
l1.Text = "AllowAttackState";
break;
case action_type.ALLOW_COMBAT_MOVEMENT:
l1.Text = "AllowCombatMovement";
break;
case action_type.SET_EVENT_PHASE:
case action_type.SET_INGAME_PHASE_MASK:
l1.Text = "PhaseMask"; //Implement
break;
case action_type.INC_EVENT_PHASE:
l1.Text = "Increment";
l1.Text = "Decrement";
break;
case action_type.CALL_CASTEDCREATUREORGO:
l1.Text = "Entry";
l2.Text = "SpellID";
break;
case action_type.REMOVEAURASFROMSPELL:
l1.Text = "SpellId";
break;
case action_type.FOLLOW:
l1.Text = "Distance";
l2.Text = "Angle";
l3.Text = "EndCreatureEntry";
l4.Text = "Credit";
l5.Text = "CreditType";
break;
case action_type.RANDOM_PHASE:
l1.Text = "PhaseMask1"; //Implement
l2.Text = "PhaseMask2"; //Implement
//.........这里部分代码省略.........
示例9: ShowEventType
public static void ShowEventType(ComboBox combobox, ComboBox cb1, ComboBox cb2, ComboBox cb3, ComboBox cb4, Label l1, Label l2, Label l3, Label l4)
{
((GroupBox)combobox.Parent).Reset();
switch ((event_type)combobox.SelectedValue.ToUInt32())
{
case event_type.TIMER:
case event_type.TIMER_OOC:
case event_type.UPDATE:
l1.Text = "InitialMin (мs)";
l2.Text = "InitialMax (мs)";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case event_type.HP:
case event_type.TARGET_HP:
l1.Text = "HPMax%";
l2.Text = "HPMin%";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case event_type.MANA:
case event_type.TARGET_MANA:
l1.Text = "ManaMax%";
l2.Text = "ManaMin%";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case event_type.KILL:
l1.Text = "CooldownMin (мs)";
l2.Text = "CooldownMax (мs)";
l3.Text = "playerOnly2";
l4.Text = "creature entry3";
break;
case event_type.TARGET_CASTING:
l1.Text = "RepeatMin (мs)";
l2.Text = "RepeatMax (мs)";
break;
case event_type.SPELLHIT:
case event_type.SPELLHIT_TARGET:
l1.Text = "SpellID";
l2.Text = "School";
l3.Text = "CooldownMin (мs)";
l4.Text = "CooldownMax (мs)";
break;
case event_type.RANGE:
l1.Text = "MinDist";
l2.Text = "MaxDist";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case event_type.OOC_LOS:
l1.Text = "Hostile-or-Not";
cb1.SetEnumValues<TargetFrends>("", "", true);
l2.Text = "MaxAllowedRange";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case event_type.RESPAWN:
l1.Text = "Type";
l2.Text = "MapId";
l3.Text = "ZoneId";
break;
case event_type.FRIENDLY_HP:
l1.Text = "HPDeficit";
l2.Text = "Radius";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case event_type.FRIENDLY_IS_CC:
case event_type.IC_LOS:
l1.Text = "Radius";
l2.Text = "RepeatMin (мs)";
l3.Text = "RepeatMax (мs)";
break;
case event_type.FRIENDLY_MISSING_BUFF:
l1.Text = "SpellId";
l2.Text = "Radius";
l3.Text = "RepeatMin (мs)";
l4.Text = "RepeatMax (мs)";
break;
case event_type.SUMMONED_UNIT:
case event_type.SUMMON_DESPAWNED:
l1.Text = "CreatureId";
l2.Text = "CooldownMin (ms)";
l3.Text = "CooldownMax (ms)";
break;
case event_type.REWARD_QUEST:
case event_type.ACCEPTED_QUEST:
l1.Text = "QuestID";
break;
case event_type.RECEIVE_EMOTE:
l1.Text = "EmoteID";
l2.Text = "CooldownMin (ms)";
l3.Text = "CooldownMax (ms)";
l4.Text = "condition";
break;
case event_type.HAS_AURA:
case event_type.TARGET_BUFFED:
l1.Text = "SpellID";
//.........这里部分代码省略.........