예제 #1
0
        public void SetKeyValue(object parameter)
        {
            var values = (object[])parameter;

            ClipboardDatabaseProcesses.SetKeyValue("key_" + values[0], values[1] as bool? ?? false);

            ClipboardEnviroment.Hooker();
        }
예제 #2
0
        public void SetButtonValue(object parameter)
        {
            var values = (object[])parameter;

            ClipboardDatabaseProcesses.SetKeyValue("mouse_rl_" + values[0], values[1] as bool? ?? false);

            if (MouseRLText == false && MouseRLImage == false)
            {
                MouseRL = false;
                ClipboardDatabaseProcesses.SetKeyValue("mouse_rl", false);
            }
            else if (MouseRL == false && MouseRLText || MouseRLImage)
            {
                MouseRL = true;
                ClipboardDatabaseProcesses.SetKeyValue("mouse_rl", true);
            }

            ClipboardEnviroment.Hooker();
        }
예제 #3
0
        /// <summary>
        /// Main Windows on loaded event
        /// </summary>
        public void Window_OnLoaded(object sender, RoutedEventArgs e)
        {
            Timer = new DispatcherTimer(TimeSpan.FromMilliseconds(100), DispatcherPriority.Normal, delegate
            {
                Title.Text = $"Poli Makro - {Configs.SelectedTabHeader} > {Configs.SelectedSubTabHeader} ({Settings.Default.Build})";
            }, Application.Current.Dispatcher);
            Timer.Start();

            #if DEBUG
            BuildCounter = new DispatcherTimer(TimeSpan.FromSeconds(30), DispatcherPriority.Normal, delegate
            {
                #region Build Counter

                Settings.Default.Build = (Settings.Default.Build + 1);
                Settings.Default.Save();

                #endregion

                BuildCounter.Stop();
            }, Application.Current.Dispatcher);
            BuildCounter.Start();
            #endif

            TimerHooker = new DispatcherTimer(TimeSpan.FromSeconds(3), DispatcherPriority.Normal, delegate
            {
                // set monitor window
                _clipboardMonitor = new WindowClipboardMonitor(this);
                // set clipboard text changed event handler
                _clipboardMonitor.ClipboardTextChanged += ClipboardEnviroment.ClipboardTextChanged;
                // set clipboard image changed event handler
                _clipboardMonitor.ClipboardImageChanged += ClipboardEnviroment.ClipboardImageChanged;
                // install hooker
                ClipboardEnviroment.Hooker();

                TimerHooker.Stop();
            }, Application.Current.Dispatcher);
            TimerHooker.Start();
        }