Exemple #1
0
        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;
            }
        }
Exemple #2
0
        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;
            };
        }
Exemple #3
0
 protected virtual void OnIconClicked(TrayIconClickedEventArgument e)
 {
     IconClicked?.Invoke(this, e);
 }