Exemple #1
0
        public CursorIndicator(IMouseRawEventProvider m, SettingsStore s)
        {
            InitializeComponent();

            this.m      = m;
            this.s      = s;
            FormClosed += CursorIndicator_FormClosed;

            NativeMethodsSWP.SetWindowTopMost(this.Handle);
            SetFormStyles();

            m.MouseEvent     += m_MouseEvent;
            Paint            += CursorIndicator_Paint;
            s.settingChanged += settingChanged;

            BackColor       = Color.Lavender;
            TransparencyKey = Color.Lavender;
        }
        public KeystrokesDisplay(IKeystrokeEventProvider k, SettingsStore s)
        {
            InitializeComponent();

            this.k = k;
            this.k.KeystrokeEvent += k_KeystrokeEvent;

            this.settings = s;
            this.settings.settingChanged += settingChanged;

            this.settings.OnSettingChangedAll();

            this.TopMost      = true;
            this.FormClosing += Form1_FormClosing;

            addWelcomeInfo();

            NativeMethodsSWP.SetWindowTopMost(this.Handle);
            ActivateDisplayOnlyMode(true);

            if (settings.EnableWindowFade)
            {
                Opacity    = 0;
                FadeStatus = FadeStatuses.Hidden;
            }
            else
            {
                Opacity    = 1;
                FadeStatus = FadeStatuses.Visible;
            }

            settings.settingChanged += (SettingsChangedEventArgs e) =>
            {
                if (settings.EnableWindowFade && tweenLabels.Count == 0 && Opacity > 0)
                {
                    FadeOut();
                }
                else
                {
                    Opacity    = 1;
                    FadeStatus = FadeStatuses.Visible;
                }
            };
        }
Exemple #3
0
        public KeystrokesDisplay(IKeystrokeEventProvider k, SettingsStore s)
        {
            InitializeComponent();

            this.k = k;
            this.k.KeystrokeEvent += k_KeystrokeEvent;

            this.settings = s;
            this.settings.settingChanged += settingChanged;

            this.settings.OnSettingChangedAll();

            this.TopMost      = true;
            this.FormClosing += Form1_FormClosing;

            addWelcomeInfo();

            NativeMethodsSWP.SetWindowTopMost(this.Handle);
            ActivateDisplayOnlyMode(true);
        }
Exemple #4
0
        public ButtonIndicator(IMouseRawEventProvider m, SettingsStore s)
        {
            InitializeComponent();

            this.m      = m;
            this.s      = s;
            FormClosed += CursorIndicator_FormClosed;

            HideMouseIfNoButtonPressed();

            NativeMethodsSWP.SetWindowTopMost(this.Handle);
            SetFormStyles();

            m.MouseEvent                 += m_MouseEvent;
            s.settingChanged             += settingChanged;
            DoubleClickIconTimer.Tick    += leftDoubleClickIconTimeout_Tick;
            DoubleClickIconTimer.Interval = 750;

            WheelIconTimer.Interval = 750;
            WheelIconTimer.Tick    += WheelIconTimer_Tick;

            BackColor       = Color.Lavender;
            TransparencyKey = Color.Lavender;
        }