private void OnClick(MouseButtons button) { switch (button) { case MouseButtons.Left: IconClicked.Invoke(this, new EventArgs()); break; case MouseButtons.Right: MenuOpening.Invoke(this, new EventArgs()); break; } }
public DockIconForm() { Draw = () => { DrawForm(CoreTex, new OpenTK.Vector4(Glow, Glow, Glow, 0.8f)); }; MouseDown = (b) => { GlowT = 1.0f; Click?.Invoke(); }; MouseUp = (b) => { GlowT = 0.8f; }; Update = () => { Glow = Glow + (GlowT - Glow) * 0.1f; }; MouseEnter = () => { GlowT = 0.8f; Root.Lock = true; }; MouseLeave = () => { GlowT = 0.55f; Root.Lock = false; UIDock dd = Root as UIDock; dd.Shown = false; }; }
protected virtual void OnIconClicked(TrayIconClickedEventArgument e) { IconClicked?.Invoke(this, e); }