本文整理汇总了C#中OnValueChangeEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# OnValueChangeEventArgs类的具体用法?C# OnValueChangeEventArgs怎么用?C# OnValueChangeEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OnValueChangeEventArgs类属于命名空间,在下文中一共展示了OnValueChangeEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OrbwalkLRCLK_ValueChanged
public static void OrbwalkLRCLK_ValueChanged(object sender, OnValueChangeEventArgs e)
{
if (e.GetNewValue<KeyBind>().Active)
{
LastClickPoint = Game.CursorPos.To2D();
}
}
示例2: EnablerValueChanged
static void EnablerValueChanged(object sender, OnValueChangeEventArgs e)
{
Notifications.AddNotification(
e.GetNewValue<bool>()
? new Notification("Logging enabled", 1000)
: new Notification("Logging dissabled", 1000));
}
示例3: SwitchMode
private void SwitchMode(object sender, OnValueChangeEventArgs e)
{
Program.Menu.Item("useModus_Mode")
.SetValue(Program.Menu.Item("useModus_Mode").GetValue<StringList>().SelectedIndex == 0
? new StringList(new[] { "Teamfight", "Insec" }, 1)
: new StringList(new[] { "Teamfight", "Insec" }));
}
示例4: 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
}
}
示例5: Changed
private static void Changed(object sender, OnValueChangeEventArgs e)
{
lastbeep = 0;
test = Game.Time + 5;
textx = xx.GetValue<Slider>().Value;
texty = yy.GetValue<Slider>().Value;
}
示例6: AutoPriorityItemValueChanged
private static void AutoPriorityItemValueChanged(object sender, OnValueChangeEventArgs e)
{
if (!e.GetNewValue<bool>())
return;
LoadEnemyPriorityData();
}
示例7: configChanged
private void configChanged(object sender, OnValueChangeEventArgs args)
{
pm.pc.color = _config.Item("color").GetValue<Circle>().Color;
pm.pc.circleDetail = _config.Item("circleSegments").GetValue<Slider>().Value;
pm.pc.lineDetail = _config.Item("lineSegments").GetValue<Slider>().Value;
pm.pc.update();
}
示例8: OnChange
private static void OnChange(object sender, OnValueChangeEventArgs e)
{
if (e.GetNewValue<bool>())
AutoLevel.Enable();
else
AutoLevel.Disable();
}
示例9: Slider_ValueChanged
private static void Slider_ValueChanged(object sender, OnValueChangeEventArgs e)
{
var player = ObjectMgr.LocalPlayer;
if ((player == null) || (player.Team == Team.Observer))
return;
ZoomVar.SetValue(e.GetNewValue<Slider>().Value);
renderVar.SetValue(2*(e.GetNewValue<Slider>().Value));
}
示例10: Item_ValueChanged
// ReSharper disable once InconsistentNaming
private static void Item_ValueChanged(object sender, OnValueChangeEventArgs e)
{
foreach (var particleEffect in Effects.Values)
{
particleEffect.Dispose();
}
Effects.Clear();
}
示例11: 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();
}
示例12: Export
private static void Export(object sender, OnValueChangeEventArgs e)
{
if (((MenuItem)sender).GetValue<KeyBind>().Active) { return; }
string s = "Spots=new List<FlashSpot>{";
foreach (FlashSpot spot in Spots)
{
s += spot.getConstructor() + ",";
}
s += "};";
Console.WriteLine(s);
}
示例13: 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();
}
}
示例14: 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>();
}
示例15: 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
}
}