Example #1
0
        //Thread pos_thread;
        public MainForm()
        {
            //word.Initialize();
            SystemHotkey.Pressed[t_key_type.CTRL]     = new PressedDelegate(CTRL_Pressed);
            SystemHotkey.Pressed[t_key_type.ALPHA]    = new PressedDelegate(ALPHA_Pressed);
            SystemHotkey.Pressed[t_key_type.NONALPHA] = new PressedDelegate(NONALPHA_Pressed);


            new SystemHotkey(VK.VK_F8, 0).Key_Type = t_key_type.CTRL;
            for (int i = 'A'; i <= 'Z'; i++)
            {
                HotKeys[i] =
                    new SystemHotkey((VK)i, RegisterHotKeyModifiers.MOD_NONE);
                HotKeys[(int)RegisterHotKeyModifiers.MOD_SHIFT * 0x100 + i] =
                    new SystemHotkey((VK)i, RegisterHotKeyModifiers.MOD_SHIFT);
            }
            foreach (VK i in nonalphas)
            {
                HotKeys[(int)i] =
                    new SystemHotkey(i, 0);
            }
            foreach (VK i in nonalphas)
            {
                HotKeys[(int)RegisterHotKeyModifiers.MOD_SHIFT * 0x100 + (int)i] =
                    new SystemHotkey(i, RegisterHotKeyModifiers.MOD_SHIFT);
            }

            input_method   = Method.SriShell_Guess;
            output_method  = Method.kaputadotcom;
            menu_method    = Method.kaputadotcom;
            m_SettingsForm = new SettingsForm(this);
            m_SelectForm   = new SelectForm(this);
            m_SriWordForm  = new SriWordForm(this);


            SystemHotkey.RegisterHotKey(true, t_key_type.CTRL);

            InitializeComponent();
            //File.WriteAllText("sri shell guess.log", "");
            //pos_thread = new Thread(GetCursorPosition);
            //pos_thread.Start();
        }
        public Engine()
        {
            word.Initialize();
            SystemHotkey.Pressed[t_key_type.CTRL]     = new PressedDelegate(CTRL_Pressed);
            SystemHotkey.Pressed[t_key_type.ALPHA]    = new PressedDelegate(ALPHA_Pressed);
            SystemHotkey.Pressed[t_key_type.NONALPHA] = new PressedDelegate(NONALPHA_Pressed);


            new SystemHotkey(VK.VK_F8, 0).Key_Type = t_key_type.CTRL;
            for (int i = 'A'; i <= 'Z'; i++)
            {
                HotKeys[i] =
                    new SystemHotkey((VK)i, RegisterHotKeyModifiers.MOD_NONE);
                HotKeys[(int)RegisterHotKeyModifiers.MOD_SHIFT * 0x100 + i] =
                    new SystemHotkey((VK)i, RegisterHotKeyModifiers.MOD_SHIFT);
            }
            foreach (VK i in nonalphas)
            {
                HotKeys[(int)i] =
                    new SystemHotkey(i, 0);
            }
            foreach (VK i in nonalphas)
            {
                HotKeys[(int)RegisterHotKeyModifiers.MOD_SHIFT * 0x100 + (int)i] =
                    new SystemHotkey(i, RegisterHotKeyModifiers.MOD_SHIFT);
            }

            input_method   = Method.SriShell_Guess;
            output_method  = Method.kaputadotcom;
            m_SettingsForm = new SettingsForm(this);
            m_SelectForm   = new SelectForm(this);


            SystemHotkey.RegisterHotKey(true, t_key_type.CTRL);

            //InitializeComponent();
        }