示例#1
0
 private void FormMain_Load(object sender, EventArgs e)
 {
     if (!globalHotKeys.Register())
     {
         MessageBox.Show("Hotkeys failed to register!");
     }
 }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
        
        //CHECANDO SE HÁ NOVAS VERSÕES
            WebClient wC = new WebClient();
            string versioncheck = wC.DownloadString("https://pastebin.com/raw/MNy5msdm");
            if(versioncheck != Properties.Settings.Default.versao)
            {
                MessageBox.Show("Nova versão disponível: " + versioncheck);
            }
            if(Properties.Settings.Default.servidor != "0")
            {
                comboBox1.Text = Properties.Settings.Default.servidor;

            }
            if (Properties.Settings.Default.gta_dir.Contains("\\") || Properties.Settings.Default.gta_dir.Contains("/"))
            {
                //SE O PLAYER SETOU O LOCAL GTA MOSTRA ESSE
                this.Text = "C.V.R Unnoficial Launcher v" + Properties.Settings.Default.versao.ToString() + " ["+ Properties.Settings.Default.gta_dir + "]";
            }else
            {
                
                gtadirselect.Show();
                // SE NÃO MOSTRA ESSE E ABRE O FORM DE SETAR O LOCAL
                this.Text = "C.V.R Unnoficial Launcher v" + Properties.Settings.Default.versao.ToString();
            }
            ghk.Register();

        }
        private void registerDelKey()
        {
            ghk_DEL = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Delete, this);
            ghk_DEL.Register();

            delKeyRegistered = true;
        }
示例#4
0
 private void ProjectExplorer_Load(object sender, EventArgs e)
 {
     if (projectExplorer != null && projectExplorer.Register())
     {
         ;
     }
 }
示例#5
0
        private void Form1_Load(object sender, EventArgs e)
        {
            using (SQLiteConnection conn = new SQLiteConnection("data source=database.db"))
            {
                using (SQLiteCommand sqliteCommand = new SQLiteCommand(conn))
                {
                    conn.Open();
                    sqliteCommand.CommandText = "SELECT level from " + name + "";
                    using (SQLiteDataReader sqliteReader = sqliteCommand.ExecuteReader())
                    {
                        while (sqliteReader.Read())
                        {
                        }
                    }
                }
            }



            this.MaximizeBox            = false;
            notifyIcon1.BalloonTipText  = "Application is running on.";
            notifyIcon1.BalloonTipTitle = "OCR_project";
            ghk.Register();

            while (File.Exists("Screenshot" + i + ".png"))
            {
                File.Delete("Screenshot" + i + ".png");
                i++;
            }
            checkBox1.Checked = true;
            this.AllowDrop    = true;
        }
        private void registerGlobalHotkey()
        {
            ghk_F1 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F1, this);
            ghk_F1.Register();

            ghk_F2 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F2, this);
            ghk_F2.Register();

            ghk_F8 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F8, this);
            ghk_F8.Register();

            ghk_F9 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F9, this);
            ghk_F9.Register();

            ghk_F11 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F11, this);
            ghk_F11.Register();

            //ghk_DEL = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Delete, this);
            //ghk_DEL.Register();

            //ghk_CTRL_DEL = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Delete, this);
            //ghk_CTRL_DEL.Register();

            ghk_CTRL_ENTER = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Enter, this);
            ghk_CTRL_ENTER.Register();

            registerNavigationKey();
        }
        private void registerGlobalHotkey()
        {
            ghk_UP = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Up, this);
            ghk_UP.Register();

            ghk_DOWN = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Down, this);
            ghk_DOWN.Register();
        }
        private void registerGlobalHotkey()
        {
            ghk_UP = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Up, this);
            ghk_UP.Register();

            ghk_DOWN = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Down, this);
            ghk_DOWN.Register();
        }
示例#9
0
 public Spammer()
 {
     InitializeComponent();
     ghk1 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F8, this);
     ghk1.Register();
     ghk2 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F9, this);
     ghk2.Register();
 }
        private void registerNavigationKey()
        {
            ghk_UP = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Up, this);
            ghk_UP.Register();

            ghk_DOWN = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Down, this);
            ghk_DOWN.Register();

            navKeyRegistered = true;
        }
示例#11
0
        private void registerGlobalHotkey()
        {
            ghk_F7 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F7, this);
            ghk_F7.Register();

            ghk_F9 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F9, this);
            ghk_F9.Register();

            ghk_F10 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F10, this);
            ghk_F10.Register();
        }
示例#12
0
        private void registerGlobalHotkey()
        {
            //ghk_F1 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F1, this);
            //ghk_F1.Register();

            ghk_F11 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F11, this);
            ghk_F11.Register();

            ghk_DEL = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Delete, this);
            ghk_DEL.Register();
        }
示例#13
0
 private void Starter_Load(object sender, EventArgs e)
 {
     if (ghk != null && ghk.Register())
     {
         WriteLine("Hotkey registered.");
     }
     else
     {
         WriteLine("Hotkey failed to register");
     }
 }
示例#14
0
 private void Form1_Load(object sender, EventArgs e)
 {
     textBox1.ReadOnly = true;
     label2.ForeColor  = Color.Red;
     if (hk.Register())
     {
     }
     if (hk1.Register())
     {
     }
 }
示例#15
0
文件: Form1.cs 项目: waertf/DumpPort
 private void Form1_Load(object sender, EventArgs e)
 {
     WriteLine("Trying to register SHIFT+ALT+O");
     if (ghk.Register() && abk.Register())
     {
         WriteLine("Hotkey registered.");
     }
     else
     {
         WriteLine("Hotkey failed to register");
     }
 }
示例#16
0
 private void button5_Click(object sender, EventArgs e)
 {
     ghk.Unregiser();                                                  //unregister before registering again
     ghk = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Space, this); //Use CTRL and space
     if (ghk.Register())
     {
         label4.Text = "Hotkey CTRL+space registered.";
     }
     else
     {
         label4.Text = "Hotkey CTRL+space failed to register";
     }
 }
示例#17
0
        /// <summary>
        /// Loads the apps!
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void formQuick_Load(object sender, EventArgs e)
        {
            //register our global show/hide hotkey
            if (!showUI.Register())
            {
                MessageBox.Show("Failed to register key");
            }

            //Make the UI stretch the width of the primary screen
            this.Width   = Screen.PrimaryScreen.WorkingArea.Width;
            txtLog.Width = this.Width - 34;
            txtLog.Left  = 17;

            this.KeyPreview = true;
            this.KeyDown   += new KeyEventHandler(formQuick_KeyDown);
        }
示例#18
0
        public Form1()
        {
            InitializeComponent();

            timer = new Timer(); //a timer for stopping recording at a certain time
            timer.Interval = 120000; //max recording of 120000ms (2 minutes)
            timer.Tick += new EventHandler(timer_Tick);

            if (Properties.Settings.Default.upgradeRequired)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.upgradeRequired = false;
            }

            //if untouched, set default values
            if (Properties.Settings.Default.unTouched)
            {
                Properties.Settings.Default.unTouched = false;
                modifierKeys = Keys.Shift ^ Keys.Control;
                pressedKey = Keys.D6;
                folderLocation.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
                SaveSettings();
            }
            else
            {
                modifierKeys = Properties.Settings.Default.modifierKeys;
                pressedKey = Properties.Settings.Default.pressedKey;

                maxRecordLength.Value = Properties.Settings.Default.maxRecordLength;
                showNotifications.Checked = Properties.Settings.Default.showNotifications;
                recordToMp3.Checked = Properties.Settings.Default.recordToMp3;

                folderLocation.Text = Properties.Settings.Default.folderLocation;

                saveFormat.Text = Properties.Settings.Default.saveFormat;
                incrementNumber.Value = Properties.Settings.Default.incrementNumber;
            }
            ghk = new GlobalHotkey(Constants.ToInt(modifierKeys), pressedKey, this);
            ghk.Register();

            hotkeyTextBox.Text = new KeysConverter().ConvertToString(modifierKeys ^ pressedKey);

            notifyIcon.BalloonTipIcon = ToolTipIcon.Info;
            notifyIcon.BalloonTipTitle = "QuickRecord";
        }
示例#19
0
        private void button1_Click(object sender, EventArgs e)
        {
            Keys key = Keys.A;

            if ((Keys)System.Enum.Parse(typeof(Keys), textBox1.Text) != key)
            {
                try{ ghk.Unregister(); }
                catch { }
            }
            key = (Keys)System.Enum.Parse(typeof(Keys), textBox1.Text);

            ghk = new Hotkeys.GlobalHotkey(Constants.NOMOD, key, this);
            if (ghk.Register())
            {
                MessageBox.Show("Registered hotkey to: " + key.ToString());
                label2.Text = key.ToString();
            }
        }
示例#20
0
文件: Form1.cs 项目: gieroj/dyplom2
        private void Form1_Load(object sender, EventArgs e)
        {
            // Make a new TouchlessMgr for library interaction
            _touchlessMgr = new TouchlessMgr();

            // Initialize some members
            _dtFrameLast   = DateTime.Now;
            _fAddingMarker = false;
            // _fChangingMode = false;
            //     _markerSelected = null;
            _addedMarkerCount = 0;

            // Put the app in camera mode and select the first camera by default

            foreach (Camera cam in _touchlessMgr.Cameras)
            {
                comboBoxCameras.Items.Add(cam);
            }

            if (comboBoxCameras.Items.Count > 0)
            {
                comboBoxCameras.SelectedIndex = 0;
            }
            else
            {
                MessageBox.Show("Oops, this requires a Webcam. Please connect a Webcam and try again.");
                Environment.Exit(0);
            }

            //     _fChangingMode = true;
            pictureBoxDisplay.MouseDown += new MouseEventHandler(pictureBoxDisplay_MouseDown);
            pictureBoxDisplay.MouseMove += new MouseEventHandler(pictureBoxDisplay_MouseMove);
            pictureBoxDisplay.MouseUp   += new MouseEventHandler(pictureBoxDisplay_MouseUp);


            if (ghk.Register())
            {
                labelMarkerData.Text = "Hotkey registered.";
            }
            else
            {
                labelMarkerData.Text = "Hotkey failed to register";
            }
        }
示例#21
0
        //Second clipboard checkbox
        private void manage_backup_clipboard()
        {
            ghk2 = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.D2, this);
            ghk3 = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.D3, this);

            if (checkBox1.Checked)
            {
                if (ghk2.Register() && ghk3.Register())
                {
                    SecClipLabel.Text = "CTRL+2 and CTRL+3 registered";
                }
            }
            if (!checkBox1.Checked)
            {
                if (ghk2.Unregiser() && ghk3.Unregiser())
                {
                    SecClipLabel.Text = "CTRL+2 and CTRL+3 not registered";
                }
            }
        }
示例#22
0
        private void Form1_Load(object sender, EventArgs e)
        {
            WriteLine("Trying to register Hotkeys");
            if (qhk.Register())
            {
                WriteLine("Hotkey SHIFT+Q registered.");
            }
            else
            {
                WriteLine("Hotkey failed to register");
            }

            if (shk.Register())
            {
                WriteLine("Hotkey SHIFT+S registered.");
            }
            else
            {
                WriteLine("Hotkey failed to register");
            }
        }
示例#23
0
        private void registerGlobalHotkey()
        {
            ghk_F1 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F1, this);
            ghk_F1.Register();
            ghk_F2 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F2, this);
            ghk_F2.Register();
            ghk_F3 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F3, this);
            ghk_F3.Register();
            ghk_F4 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F4, this);
            ghk_F4.Register();
            ghk_F5 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F5, this);
            ghk_F5.Register();
            ghk_F6 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F6, this);
            ghk_F6.Register();
            ghk_F7 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F7, this);
            ghk_F7.Register();
            ghk_F8 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F8, this);
            ghk_F8.Register();
            ghk_F9 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F9, this);
            ghk_F9.Register();

            ghk_Ctrl_Enter = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Enter, this);
            ghk_Ctrl_Enter.Register();
        }
        private void initSettings()
        {
            this.trayIcon = generateNotifyIcon();

            this.imgurCheckBox.Checked = Properties.Settings.Default.imgurAutoupload;
            this.clipBoardCheckBox.Checked = Properties.Settings.Default.clipBoardAutoCopySettings;
            this.autoStartCheckBox.Checked = Properties.Settings.Default.autoStart;

            List<Keys> itemSource = new List<Keys> { Keys.A, Keys.B, Keys.C, Keys.D, Keys.E,
                                                     Keys.F, Keys.G, Keys.H, Keys.I, Keys.J,
                                                     Keys.K, Keys.L, Keys.M, Keys.N, Keys.O,
                                                     Keys.P, Keys.Q, Keys.R, Keys.S, Keys.T,
                                                     Keys.U, Keys.V, Keys.W, Keys.X, Keys.Y,
                                                     Keys.Z,};
            this.keyChoiceBox.DataSource = itemSource;
            this.keyChoiceBox.SelectedItem = Properties.Settings.Default.activationKey;

            ghk = new Hotkeys.GlobalHotkey(Constants.ALT + Constants.SHIFT, (Keys)this.keyChoiceBox.SelectedItem, this);
            ghk.Register();

            sicEnabled = true;
        }
示例#25
0
        private void registerDelKey()
        {
            ghk_DEL = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Delete, this);
            ghk_DEL.Register();

            delKeyRegistered = true;
        }
示例#26
0
        private void registerNavigationKey()
        {
            ghk_UP = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Up, this);
            ghk_UP.Register();

            ghk_DOWN = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Down, this);
            ghk_DOWN.Register();

            navKeyRegistered = true;
        }
示例#27
0
        private void registerGlobalHotkey()
        {
            gutil.saveSystemDebugLog(globalConstants.MENU_PENJUALAN, "CASHIER FORM : REGISTER HOTKEY");

            ghk_F1 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F1, this);
            ghk_F1.Register();

            ghk_F2 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F2, this);
            ghk_F2.Register();

            ghk_F3 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F3, this);
            ghk_F3.Register();

            ghk_F4 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F4, this);
            ghk_F4.Register();

            //ghk_F5 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F5, this);
            //ghk_F5.Register();

            ghk_F7 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F7, this);
            ghk_F7.Register();

            ghk_F8 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F8, this);
            ghk_F8.Register();

            ghk_F9 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F9, this);
            ghk_F9.Register();

            ghk_F11 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F11, this);
            ghk_F11.Register();

            ghk_Add = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Add, this);
            ghk_Add.Register();

            ghk_Substract = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Subtract, this);
            ghk_Substract.Register();

            //ghk_DEL = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Delete, this);
            //ghk_DEL.Register();

            //ghk_CTRL_DEL = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Delete, this);
            //ghk_CTRL_DEL.Register();

            ghk_CTRL_Enter = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Enter, this);
            ghk_CTRL_Enter.Register();



            //ghk_F10 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F10, this);
            //ghk_F10.Register();

            //ghk_F11 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F11, this);
            //ghk_F11.Register();

            //// ## F12 doesn't work yet ##
            ////ghk_F12 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F12, this);
            ////ghk_F12.Register();



            //ghk_CTRL_C = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.C, this);
            //ghk_CTRL_C.Register();

            //ghk_CTRL_U = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.U, this);
            //ghk_CTRL_U.Register();

            //ghk_ALT_F4 = new Hotkeys.GlobalHotkey(Constants.ALT, Keys.F4, this);
            //ghk_ALT_F4.Register();
            registerNavigationKey();
        }
示例#28
0
        private void registerGlobalHotkey()
        {
            ghk_F1 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F1, this);
            ghk_F1.Register();

            ghk_F2 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F2, this);
            ghk_F2.Register();

            ghk_F8 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F8, this);
            ghk_F8.Register();

            ghk_F9 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F9, this);
            ghk_F9.Register();

            ghk_F11 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F11, this);
            ghk_F11.Register();

            //ghk_DEL = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.Delete, this);
            //ghk_DEL.Register();

            //ghk_CTRL_DEL = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Delete, this);
            //ghk_CTRL_DEL.Register();

            ghk_CTRL_ENTER = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Enter, this);
            ghk_CTRL_ENTER.Register();

            registerNavigationKey();
        }
        private void keyChoiceBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (sicEnabled)
            {

                ghk.Unregiser();
                ghk = new Hotkeys.GlobalHotkey(Constants.ALT + Constants.SHIFT, (Keys)this.keyChoiceBox.SelectedItem, this);
                ghk.Register();

                Properties.Settings.Default.activationKey = (Keys)this.keyChoiceBox.SelectedItem;
                Properties.Settings.Default.Save();
            }
        }
示例#30
0
        private void registerGlobalHotkey()
        {
            ghk_F1 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F1, this);
            ghk_F1.Register();
            
            ghk_F2 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F2, this);
            ghk_F2.Register();
            
            ghk_F3 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F3, this);
            ghk_F3.Register();
            
            ghk_F4 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F4, this);
            ghk_F4.Register();

            ghk_F5 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F5, this);
            ghk_F5.Register();

            ghk_F7 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F7, this);
            ghk_F7.Register();

            ghk_F8 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F8, this);
            ghk_F8.Register();

            ghk_F9 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F9, this);
            ghk_F9.Register();

            ghk_F10 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F10, this);
            ghk_F10.Register();

            ghk_F11 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F11, this);
            ghk_F11.Register();

            // ## F12 doesn't work yet ##
            //ghk_F12 = new Hotkeys.GlobalHotkey(Constants.NOMOD, Keys.F12, this);
            //ghk_F12.Register();

            ghk_CTRL_DEL = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Delete, this);
            ghk_CTRL_DEL.Register();

            ghk_CTRL_C = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.C, this);
            ghk_CTRL_C.Register();

            ghk_CTRL_U = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.U, this);
            ghk_CTRL_U.Register();

            ghk_ALT_F4 = new Hotkeys.GlobalHotkey(Constants.ALT, Keys.F4, this);
            ghk_ALT_F4.Register();

        }
 private void RunScript_Load(object sender, EventArgs e)
 {
     ghk.Register();
     ghk2.Register();
 }
示例#32
0
 /// <summary>
 /// Register HotKeys with ToDo++
 /// </summary>
 private void InitializeSystemTray()
 {
     ghk = new Hotkeys.GlobalHotkey(Constants.ALT, Keys.Q, this);
     ghk.Register();
     notifyIcon_taskBar.Visible = false;
 }
示例#33
0
 private void Form1_Load(object sender, EventArgs e)
 {
     ghk.Register();
 }
示例#34
0
        private void btnChangeKeys_Click(object sender, EventArgs e)
        {
            if (btnChangeKeys.Text == "Change")
            {
                hotkeyTextBox.Text = "";
                hotkeyTextBox.Select();
                btnChangeKeys.Text = "Save";
            }
            else
            {
                if (hotkeyTextBox.Text == "")
                {
                    hotkeyTextBox.Text = hotkeystring;
                }
                else
                {
                    ghk.Unregister();
                    ghk = new GlobalHotkey(Constants.ToInt(modifierKeys), pressedKey, this);
                    ghk.Register();
                }
                hotkeystring = hotkeyTextBox.Text;
                btnChangeKeys.Text = "Change";

                SaveSettings();
            }
        }
示例#35
0
文件: Form1.cs 项目: gieroj/dyplom
 private void Form1_Load(object sender, EventArgs e)
 {
     for (int i = 0; i < CMdllka.touchlessMgr.Cameras.Count; i++)
     {
         if(CMdllka.touchlessMgr.Cameras[i].ToString().Contains("VDP")==false )
             Camra.Add(CMdllka.touchlessMgr.Cameras[i]);
     }
     comboBox1.DataSource = Camra;
     CMdllka.Markery.MarkerChanged += new Markery.Zmiana_Ilosci_Markerow(MarkersChanged);
     ghk = new Hotkeys.GlobalHotkey(Constants.CTRL, Keys.Q, this);
     ghk.Register();
     timer.Tick += new EventHandler(TimerTickHandler); //add the event handler
     timer.Start(); //start the timer
 }