public static IScriptHandler CreateFlowHandler(ScriptInfo pScript, ISession pSession) { if (pScript == null || pSession == null) { throw new Exception("SessionFactory.Createinstance Error: Script or Session == null"); } var _instance = Activator <ScriptType, IScriptHandler> .CreateInstance(pScript.ScriptType, new object[] { pScript, pSession }); if (_instance == null) // Create a type and Add it to the generic Factory, so it can be cached and returned next time. { var _typeName = string.Format("Timok.IVR.Scripting.{0}CallScript", pScript.ScriptType); var _type = Assembly.GetCallingAssembly().GetType(_typeName); if (_type == null) { T.LogRbr(LogSeverity.Error, "SessionFactory.Createinstance", string.Format("Error creating type={0}", _typeName)); return(null); } Activator <ScriptType, ISessionHandler> .Add(pScript.ScriptType, _type); _instance = Activator <ScriptType, IScriptHandler> .CreateInstance(pScript.ScriptType, new object[] { pScript, pSession }); } return(_instance); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Auto QSS if :"); Activator.Add("Blind", new CheckBox("Blind", false)); Activator.Add("Charm", new CheckBox("Charm")); Activator.Add("Fear", new CheckBox("Fear")); Activator.Add("Polymorph", new CheckBox("Polymorph")); Activator.Add("Stun", new CheckBox("Stun")); Activator.Add("Snare", new CheckBox("Snare")); Activator.Add("Silence", new CheckBox("Silence", false)); Activator.Add("Taunt", new CheckBox("Taunt")); Activator.Add("Suppression", new CheckBox("Suppression")); Activator.AddGroupLabel("Items usage:"); Activator.AddSeparator(); Activator.Add("bilgewater", new CheckBox("Use Bilgewater Cutlass")); Activator.Add("bilgewater.HP", new Slider("Use Bilgewater Cutlass if hp is lower than {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("botrk", new CheckBox("Use Blade of The Ruined King")); Activator.Add("botrk.HP", new Slider("Use Blade of The Ruined King if hp is lower than {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("youmus", new CheckBox("Use Youmus Ghostblade")); Activator.Add("items.Youmuss.HP", new Slider("Use Youmuss Ghostblade if hp is lower than {0}(%)", 60, 1)); Activator.Add("youmus.Enemies", new Slider("Use Youmus Ghostblade when there are {0} enemies in range", 3, 1, 5)); Activator.AddSeparator(); Activator.AddGroupLabel("Potion Settings"); Activator.Add("spells.Potions.Check", new CheckBox("Use Potions")); Activator.Add("spells.Potions.HP", new Slider("Use Potions when HP is lower than {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Use Potions when Mana is lower than {0}(%)", 60, 1)); Activator.AddSeparator(); Activator.AddGroupLabel("Spells settings:"); Activator.AddGroupLabel("Barrier settings:"); Activator.Add("spells.Barrier.Hp", new Slider("Use Barrier when HP is lower than {0}(%)", 30, 1)); Activator.AddGroupLabel("Heal settings:"); Activator.Add("spells.Heal.Hp", new Slider("Use Heal when HP is lower than {0}(%)", 30, 1)); Activator.AddGroupLabel("Ignite settings:"); Activator.Add("spells.Ignite.Focus", new Slider("Use Ignite when target HP is lower than {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Auto QSS if :"); Activator.Add("Blind", new CheckBox("Kör", false)); Activator.Add("Charm", new CheckBox("Çekiliyorsa(ahri)")); Activator.Add("Fear", new CheckBox("Korkmuþsa")); Activator.Add("Polymorph", new CheckBox("Polymorph")); Activator.Add("Stun", new CheckBox("Sabitlenmiþse")); Activator.Add("Snare", new CheckBox("Tuzaða düþünce")); Activator.Add("Silence", new CheckBox("Sustutulduysa", false)); Activator.Add("Taunt", new CheckBox("Alay ediliyorsa")); Activator.Add("Suppression", new CheckBox("Durdurulmuþsa")); Activator.AddGroupLabel("Item Kullanýmý:"); Activator.AddSeparator(); Activator.Add("bilgewater", new CheckBox("Bilgewater palasý Kullan")); Activator.Add("bilgewater.HP", new Slider("Kullanmak için can {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("botrk", new CheckBox("Mahvolmuþ kýlýcý kullan")); Activator.Add("botrk.HP", new Slider("mahvolmuþ için can {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("youmus", new CheckBox("Kullan Youmus")); Activator.Add("items.Youmuss.HP", new Slider("Youumu için can {0}(%)", 60, 1)); Activator.Add("youmus.Enemies", new Slider("Youumu için kaç düþman menzilde olsun", 3, 1, 5)); Activator.AddSeparator(); Activator.AddGroupLabel("Ýksir Ayarlarý"); Activator.Add("spells.Potions.Check", new CheckBox("Kullan Ýksirler")); Activator.Add("spells.Potions.HP", new Slider("Caným þundan azsa {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Manam þundan azsa {0}(%)", 60, 1)); Activator.AddSeparator(); Activator.AddGroupLabel("Büyü Ayarlarý:"); Activator.AddGroupLabel("Bariyer Ayarlarý:"); Activator.Add("spells.Barrier.Hp", new Slider("Bariyer kullanmak için gereken can {0}(%)", 30, 1)); Activator.AddGroupLabel("Ýyileþtirme Ayarlarý:"); Activator.Add("spells.Heal.Hp", new Slider("Ýyileþtirme için gereken can {0}(%)", 30, 1)); Activator.AddGroupLabel("Tutuþtur Ayarlarý:"); Activator.Add("spells.Ignite.Focus", new Slider("Tutuþtur kullanmak için hedefin caný {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Auto QSS if :"); Activator.Add("Blind", new CheckBox("Kör", false)); Activator.Add("Charm", new CheckBox("Cazibe")); Activator.Add("Fear", new CheckBox("Korku")); Activator.Add("Polymorph", new CheckBox("Polymorph")); Activator.Add("Stan", new CheckBox("Stun")); Activator.Add("Snare", new CheckBox("Kapan")); Activator.Add("Silence", new CheckBox("Susturma", false)); Activator.Add("Taunt", new CheckBox("Taunt")); Activator.Add("Suppression", new CheckBox("Engellenme")); Activator.Add("delay", new Slider("Gecikme kullan", 100, 0, 500)); Activator.AddGroupLabel("Items usage:"); Activator.AddSeparator(); Activator.Add("bilgewater", new CheckBox("Kullan Bilgewater Palasý")); Activator.Add("bilgewater.HP", new Slider("Eger hp daha düþük ise Bilgewater palasý kullan {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("botrk", new CheckBox("Kullan Mahvolmus")); Activator.Add("botrk.HP", new Slider("Mahvolmus kullan hp daha düþükse {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("youmus", new CheckBox("Kullan Youmu")); Activator.Add("items.Youmuss.HP", new Slider("Youmuss kullan hp daha düþükse {0}(%)", 60, 1)); Activator.Add("youmus.Enemies", new Slider("Youmuu var olduðunda kullan {0} Menzilde düþmanlar", 3, 1, 5)); Activator.AddSeparator(); Activator.AddGroupLabel("Potion Settings"); Activator.Add("spells.Potions.Check", new CheckBox("Kullan Ýksir")); Activator.Add("spells.Potions.HP", new Slider("HP daha düþük olduðunda Ýksir kullanýn {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Mana daha düþük olduðunda Ýksir kullanýn {0}(%)", 60, 1)); Activator.AddSeparator(); Activator.AddGroupLabel("Spells settings:"); Activator.AddGroupLabel("Heal settings:"); Activator.Add("spells.Heal.Hp", new Slider("HP daha düþük olduðunda Sifa kullanýn {0}(%)", 30, 1)); Activator.AddGroupLabel("Ignite settings:"); Activator.Add("spells.Ignite.Focus", new Slider("HP hedefi daha düþük olduðunda Tutuþtur kullanýn. {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Auto QSS if :"); Activator.Add("Blind", new CheckBox("Kor olunca", false)); Activator.Add("Charm", new CheckBox("Cazibe")); Activator.Add("Fear", new CheckBox("Korku")); Activator.Add("Polymorph", new CheckBox("Polymorph")); Activator.Add("Stun", new CheckBox("Sabitlenme")); Activator.Add("Snare", new CheckBox("Kapan")); Activator.Add("Silence", new CheckBox("Susturma", false)); Activator.Add("Taunt", new CheckBox("Taunt")); Activator.Add("Suppression", new CheckBox("Engellenme")); Activator.AddLabel("Items usage:"); Activator.Add("bilgewater", new CheckBox("Kullan Bilgewater Palasi")); Activator.Add("bilgewater.HP", new Slider("Kullan Bilgewater Palasi canim az ise {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("botrk", new CheckBox("Mahvolmus kullan")); Activator.Add("botrk.HP", new Slider("Mahvolmus icin gereken can {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("youmus", new CheckBox("Kullan Youmus")); Activator.Add("items.Youmuss.HP", new Slider("Kullan Youmus icin gereken can {0}(%)", 60, 1)); Activator.Add("youmus.Enemies", new Slider("Kullan Youmus yakindaki {0} dusman sayisi", 3, 1, 5)); Activator.AddLabel("Potion Settings"); Activator.Add("spells.Potions.Check", new CheckBox("Iksir kullan")); Activator.Add("spells.Potions.HP", new Slider("Canim sundan az ise iksir kullan {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Mana sundan az ise iksir kullan {0}(%)", 60, 1)); Activator.AddLabel("Spells settings:"); Activator.AddLabel("Heal settings:"); Activator.Add("spells.Heal.Hp", new Slider("Canim sundan az ise sifa kullan {0}(%)", 30, 1)); Activator.AddLabel("Ignite settings:"); Activator.Add("spells.Ignite.Focus", new Slider("Hedef cani sundan az ise tutustur birak {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Otomatik QSS Kullan Eðer :"); Activator.Add("Blind", new CheckBox("Körse", false)); Activator.Add("Charm", new CheckBox("Çekilmiþse(Ahri)")); Activator.Add("Fear", new CheckBox("Kokrmuþsa")); Activator.Add("Polymorph", new CheckBox("Polymorph(Lulu W)")); Activator.Add("Stun", new CheckBox("Sersemlemiþse")); Activator.Add("Snare", new CheckBox("Snare")); Activator.Add("Silence", new CheckBox("Susturulmuþsa", false)); Activator.Add("Taunt", new CheckBox("Alay ediliyorsa")); Activator.Add("Suppression", new CheckBox("WW,Urgot RS(Suppression)")); Activator.AddLabel("Ýtem Kullanýmý:"); Activator.Add("bilgewater", new CheckBox("Bilgewater palasý kullan")); Activator.Add("bilgewater.HP", new Slider("Bilgewater palasý için gereken can {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("botrk", new CheckBox("Mahvolmuþ kýlýç kullan")); Activator.Add("botrk.HP", new Slider("Mahvolmuþ kýlýç için gereken can {0}(%)", 60)); Activator.AddSeparator(); Activator.Add("youmus", new CheckBox("Kullan Youmus Kýlýcý")); Activator.Add("items.Youmuss.HP", new Slider("Youmuss için gereken can {0}(%)", 60, 1)); Activator.Add("youmus.Enemies", new Slider("Eðer menzilde þu kadar {0} düþman varsa Kullan", 3, 1, 5)); Activator.AddLabel("Ýksir Ayarlarý"); Activator.Add("spells.Potions.Check", new CheckBox("Kullan Ýksirler")); Activator.Add("spells.Potions.HP", new Slider("Caným þundan azsa {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Manam þundan azsa {0}(%)", 60, 1)); Activator.AddLabel("Büyü Ayarlarý:"); Activator.AddLabel("Ýyileþtirme ayarlarý:"); Activator.Add("spells.Heal.Hp", new Slider("Eðer caným þundan düþükse kullan {0}(%)", 30, 1)); Activator.AddLabel("Tutuþtur Ayarlarý:"); Activator.Add("spells.Ignite.Focus", new Slider("Tutuþtur kullanmak için hedefin caný þundan az {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Auto QSS if :"); Activator.Add("Blind", new CheckBox("Körse", false)); Activator.Add("Charm", new CheckBox("Çekilmiþse(ahri)")); Activator.Add("Fear", new CheckBox("Korkmuþsa")); Activator.Add("Polymorph", new CheckBox("Polymorph(Lulu W)")); Activator.Add("Stun", new CheckBox("Sersemlemiþse")); Activator.Add("Snare", new CheckBox("Tuzaða Düþmüþse(cait)")); Activator.Add("Silence", new CheckBox("Susturulmuþsa", false)); Activator.Add("Taunt", new CheckBox("Alay Ediliyorsa")); Activator.Add("Suppression", new CheckBox("WW,Urgot R(Suppression)")); Activator.Add("delay", new Slider("Gecikme Kullan", 100, 0, 500)); Activator.AddLabel("Ýtem Kullanýmlarý:"); Activator.Add("bilgewater", new CheckBox("Bilgewater palasý Kullan")); Activator.Add("bilgewater.HP", new Slider("Bilgewater Palasý Kullanmak için can þunun altýnda {0}(%)", 60)); Activator.Add("botrk", new CheckBox("Mahvolmuþ Kýlýç Kullan")); Activator.Add("botrk.HP", new Slider("Mahvolmuþ Kýlýç kullanmak için can þunun altýnda {0}(%)", 60)); Activator.Add("youmus", new CheckBox("Youmu'nun Kýlýcý Kullan")); Activator.Add("items.Youmuss.HP", new Slider("Youumu'nun Kýlýcý Kullanmak için caným þundan altta {0}(%)", 60, 1)); Activator.Add("youmus.Enemies", new Slider("Youumu'nun Kýlýcý için menzilde {0} Kadar düþman olsun", 3, 1, 5)); Activator.AddLabel("Ýksir Ayarlarý"); Activator.Add("spells.Potions.Check", new CheckBox("Ýksirleri Kullan")); Activator.Add("spells.Potions.HP", new Slider("Ýksir kullanmak için caným þunun altýnda {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Ýksir Kullanmak için Manam þunun altýnda {0}(%)", 60, 1)); Activator.AddLabel("Büyü Ayarlarý:"); Activator.AddLabel("Ýyileþtirme Ayarlarý:"); Activator.Add("spells.Heal.Hp", new Slider("Ýyileþtirme için caným þunun altýnda {0}(%)", 30, 1)); Activator.AddLabel("Tutuþtur Ayarlarý:"); Activator.Add("spells.Ignite.Focus", new Slider("Tutuþtur için hedefin caný þunun altýnda {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Zhonyas Settings"); Activator.Add("Zhonyas", new CheckBox("Use Zhonyas Hourglass")); Activator.Add("ZhonyasHp", new Slider("Use Zhonyas Hourglass If Your HP%", 20, 0, 100)); Activator.AddLabel("Potion Settings"); Activator.Add("spells.Potions.Check", new CheckBox("Use Potions")); Activator.Add("spells.Potions.HP", new Slider("Use Potions when HP is lower than {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Use Potions when Mana is lower than {0}(%)", 60, 1)); Activator.AddLabel("Heal settings:"); Activator.Add("spells.Heal.Hp", new Slider("Use Heal when HP is lower than {0}(%)", 30, 1)); Activator.AddLabel("Ignite settings:"); Activator.Add("spells.Ignite.Focus", new Slider("Use Ignite when target HP is lower than {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddGroupLabel("Zhonyas Ayarlarý"); Activator.Add("Zhonyas", new CheckBox("Zhonya Kullan")); Activator.Add("ZhonyasHp", new Slider("Zhonya için caným þundan azsa Kullan%", 20, 0, 100)); Activator.AddLabel("Ýksir Ayarlarý"); Activator.Add("spells.Potions.Check", new CheckBox("Ýksir Kullan")); Activator.Add("spells.Potions.HP", new Slider("Caným þundan azsa iksir Kullan {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Manam þundan azsa Ýksir Kullan {0}(%)", 60, 1)); Activator.AddLabel("Ýyileþtirme Ayarlarý:"); Activator.Add("spells.Heal.Hp", new Slider("Ýyileþtirme kullanmak için caným þundan az {0}(%)", 30, 1)); Activator.AddLabel("Tutuþtur Ayarlarý:"); Activator.Add("spells.Ignite.Focus", new Slider("Tutuþtur için gereken düþman caný þundan az {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("Activator Settings", "Items"); Activator.AddLabel("Zhonyas Ayarlarý"); Activator.Add("Zhonyas", new CheckBox("Zhonya Kullan")); Activator.Add("ZhonyasHp", new Slider("Benim caným þu kadarda zhonya kullan%", 20, 0, 100)); Activator.AddSeparator(); Activator.AddGroupLabel("Ýksir Ayarlarý"); Activator.Add("spells.Potions.Check", new CheckBox("Kullan Ýksirleri")); Activator.Add("spells.Potions.HP", new Slider("Ýksirleri kullanmak için caným þundan az {0}(%)", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("Manam þundan az {0}(%)", 60, 1)); Activator.AddSeparator(); Activator.AddGroupLabel("Büyü ayarlarý:"); Activator.AddGroupLabel("Ýyileþtirme ayarlarý:"); Activator.Add("spells.Heal.Hp", new Slider("Ýyileþtirme kullanmak için gereken caným {0}(%)", 30, 1)); Activator.AddGroupLabel("Ignite settings:"); Activator.Add("spells.Ignite.Focus", new Slider("Tutuþtur için gereken düþman cnaý {0}(%)", 10, 1)); }
private static void ActivatorPage() { Activator = _myMenu.AddSubMenu("活化剂", "Items"); Activator.AddLabel("中亚设置"); Activator.Add("Zhonyas", new CheckBox("使用中亚")); Activator.Add("ZhonyasHp", new Slider("血量低于 X % 使用中亚", 20, 0, 100)); Activator.AddSeparator(); Activator.AddGroupLabel("药水"); Activator.Add("spells.Potions.Check", new CheckBox("使用药水")); Activator.Add("spells.Potions.HP", new Slider("最低血量% 使用药水", 60, 1)); Activator.Add("spells.Potions.Mana", new Slider("最低蓝量% 使用药水", 60, 1)); Activator.AddSeparator(); Activator.AddGroupLabel("召唤师技能设置:"); Activator.AddGroupLabel("治疗设置:"); Activator.Add("spells.Heal.Hp", new Slider("低于HP%时 使用治疗", 30, 1)); Activator.AddGroupLabel("点燃设在:"); Activator.Add("spells.Ignite.Focus", new Slider("敌人血量低于 X % 时 使用点燃", 10, 1)); }
/// <summary> /// Add an ability of instantiating an instance of a class that has no default constructer. /// </summary> /// <typeparam name="T">Type of the object that is activated by this <paramref name="activator"/>.</typeparam> /// <param name="activator">A delegate that creates an instance of <typeparamref name="T"/>.</param> /// <example> /// <code> /// var serializer= new YamlSerializer(); /// /// var yaml = /// @"%YAML 1.2 /// --- /// !System.Drawing.SolidBrush /// Color: Red /// ... /// "; /// /// SolidBrush b = null; /// try { /// b = (SolidBrush)serializer.Deserialize(yaml)[0]; /// } catch(MissingMethodException) { /// // SolidBrush has no default constructor! /// } /// /// YamlNode.DefaultConfig.AddActivator<SolidBrush>(() => new SolidBrush(Color.Black)); /// /// // Now the serializer knows how to activate an instance of SolidBrush. /// b = (SolidBrush)serializer.Deserialize(yaml)[0]; /// /// Assert.AreEqual(b.Color, Color.Red); /// </code> /// </example> public void AddActivator <T>(Func <object> activator) where T : class { Activator.Add <T>(activator); }