本文整理汇总了C#中OnValueChangeEventArgs.GetNewValue方法的典型用法代码示例。如果您正苦于以下问题:C# OnValueChangeEventArgs.GetNewValue方法的具体用法?C# OnValueChangeEventArgs.GetNewValue怎么用?C# OnValueChangeEventArgs.GetNewValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OnValueChangeEventArgs
的用法示例。
在下文中一共展示了OnValueChangeEventArgs.GetNewValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OrbwalkLRCLK_ValueChanged
public static void OrbwalkLRCLK_ValueChanged(object sender, OnValueChangeEventArgs e)
{
if (e.GetNewValue<KeyBind>().Active)
{
LastClickPoint = Game.CursorPos.To2D();
}
}
示例2: MenuItem_ValueChanged
// ReSharper disable once InconsistentNaming
private static void MenuItem_ValueChanged(object sender, OnValueChangeEventArgs e)
{
var item = sender as MenuItem;
// ReSharper disable once PossibleNullReferenceException
if (item.Name == "ownTowers") ownTowers = e.GetNewValue<bool>();
else enemyTowers = e.GetNewValue<bool>();
HandleTowers();
}
示例3: MenuItem_ValueChanged
private static void MenuItem_ValueChanged(object sender, OnValueChangeEventArgs e)
{
var item = sender as MenuItem;
if (item.Name == "menurange_dagger") menurange_dagger = e.GetNewValue<bool>();
if (item.Name == "menurange_aura") menurange_aura = e.GetNewValue<bool>();
if (item.Name == "menurange_exp") menurange_exp = e.GetNewValue<bool>();
if (item.Name == "menurange_atck") menurange_atck = e.GetNewValue<bool>();
if (item.Name == "menurange_coil") menurange_coil = e.GetNewValue<bool>();
}
示例4: OnChange
private static void OnChange(object sender, OnValueChangeEventArgs e)
{
if (e.GetNewValue<bool>())
AutoLevel.Enable();
else
AutoLevel.Disable();
}
示例5: OnValueChanged
public static void OnValueChanged(object sender, OnValueChangeEventArgs args)
{
var oldOne = args.GetOldValue<KeyBind>().Active;
var newOne = args.GetNewValue<KeyBind>().Active;
if (oldOne == newOne) return;
if (newOne)
{
_effect?.Dispose();
_effect = Members.MyHero.AddParticleEffect("materials/ensage_ui/particles/line.vpcf");
var frontPoint = Members.MyHero.InFront(1200);
_effect.SetControlPoint(1, Members.MyHero.Position);
_effect.SetControlPoint(2, frontPoint);
_effect.SetControlPoint(3, new Vector3(255, 50, 0));
_effect.SetControlPoint(4, new Vector3(255, 255, 255));
}
else
try
{
_tks.Cancel();
_effect?.Dispose();
}
catch (Exception)
{
// ignored
}
}
示例6: AutoPriorityItemValueChanged
private static void AutoPriorityItemValueChanged(object sender, OnValueChangeEventArgs e)
{
if (!e.GetNewValue<bool>())
return;
LoadEnemyPriorityData();
}
示例7: EnablerValueChanged
static void EnablerValueChanged(object sender, OnValueChangeEventArgs e)
{
Notifications.AddNotification(
e.GetNewValue<bool>()
? new Notification("Logging enabled", 1000)
: new Notification("Logging dissabled", 1000));
}
示例8: Program_ValueChanged
private static void Program_ValueChanged(object sender, OnValueChangeEventArgs e)
{
if (e.GetNewValue<KeyBind>().Active)
{
cache.Set("HeroName", HeroManager.Player.ChampionName);
cache.Set("MoveSpeed", HeroManager.Player.MoveSpeed);
cache.Set("IsMe", HeroManager.Player.IsMe);
cache.Save();
}
}
示例9: OnValueChanged
public static void OnValueChanged(object sender, OnValueChangeEventArgs args)
{
var oldOne = args.GetOldValue<KeyBind>().Active;
var newOne = args.GetNewValue<KeyBind>().Active;
if (oldOne == newOne || newOne) return;
try
{
_tks.Cancel();
_globalTarget = null;
}
catch (Exception)
{
// ignored
}
}
示例10: OnValueChanged
private static void OnValueChanged(object sender, OnValueChangeEventArgs onValueChangeEventArgs)
{
if (onValueChangeEventArgs.GetNewValue<bool>())
{
CurrentPosition = new Render.Circle(ObjectManager.Player.Position, 100, Color.Red, 2);
CurrentPosition.Add();
Text = new Render.Text(new Vector2(50, 50), "MODE: " + CurrentMode, 30, new ColorBGRA(255, 0, 0, 255))
{
OutLined = true
};
Text.Add();
}
else
{
CurrentPosition.Remove();
Text.Remove();
}
}
示例11: Hotkey_ValueChanged
// ReSharper disable once InconsistentNaming
private static void Hotkey_ValueChanged(object sender, OnValueChangeEventArgs e)
{
var newVal = e.GetNewValue<KeyBind>().Active;
if (newVal != e.GetOldValue<KeyBind>().Active)
{
// Deactivate script
if (!newVal)
{
pullCreep = null;
}
else
{
// Activate script
var player = ObjectMgr.LocalPlayer;
if (player == null || player.Team == Team.Observer)
return;
switch (player.Team)
{
case Team.Radiant:
startTime = StartTimeRadiant;
attackTime = AttackTimeRadiant;
route = StackRouteRadiant;
break;
case Team.Dire:
startTime = StartTimeDire;
attackTime = AttackTimeDire;
route = StackRouteDire;
break;
default:
e.Process = false;
return;
}
var units = player.Selection.ToList();
pullCreep = (Unit)units.FirstOrDefault(unit => unit is Unit && ((Unit)unit).IsControllable && ((Unit)unit).IsRanged);
if (pullCreep != null)
{
pullCreep.Move(route.Last());
orderState = -1;
}
else e.Process = false;
}
}
}
示例12: DrawHP_ValueChanged
private static void DrawHP_ValueChanged(object sender, OnValueChangeEventArgs e)
{
if (sender != null)
{
//Utility.HpBarDamageIndicator.Enabled = e.GetNewValue<bool>();
CustomDamageIndicator.Enabled = e.GetNewValue<bool>();
}
}
示例13: Switchminion
private static void Switchminion(object sender, OnValueChangeEventArgs e)
{
if (e.GetNewValue<bool>())
_config.Item("smitecombo").SetValue(false);
}
示例14: PermaDissable
private static void PermaDissable(object sender, OnValueChangeEventArgs e)
{
if (sender == null)
return;
var Sender = sender as MenuItem;
if (e.GetNewValue<bool>() && _bye==false)
{
_isPermaDissabled = true;
_bye = true;
Notifications.AddNotification(new Notification("Chat Perma Dissabled!", 3000).SetBorderColor(Color.Red).SetBoxColor(Color.Black).SetTextColor(Color.Red));
return;
}
else if (_bye==true)
{
Notifications.AddNotification(new Notification("Chat Perma Dissabled!", 3000).SetBorderColor(Color.Red).SetBoxColor(Color.Black).SetTextColor(Color.Red));
Notifications.AddNotification(new Notification("Pssssst remember? :) Try unloading the assembly", 4000).SetBorderColor(Color.Yellow).SetBoxColor(Color.Black).SetTextColor(Color.Orange));
}
}
示例15: item_ValueChanged
static void item_ValueChanged(object sender, OnValueChangeEventArgs e)
{
if (sender == null)
{
Notifications.AddNotification(new Notification("sender is null", 3000));
return;
}
var newSender = sender as MenuItem;
if (e.GetNewValue<bool>())
{
BannedPlayers.Add(newSender.Name);
Notifications.AddNotification(new Notification(newSender.Name + " banned!",2000).SetBoxColor(Color.Black).SetTextColor(Color.Orange));
}
else
{
BannedPlayers.Remove(newSender.Name);
Notifications.AddNotification(new Notification(newSender.Name + " unbaned! :)", 2000).SetBoxColor(Color.Black).SetTextColor(Color.GreenYellow));
}
}