コード例 #1
0
 private void TrayIcon_Shown(object o, EventArgs e)
 {
     try
     {
         Hide();
         GlobalHandle            = Handle;
         Globals.ProgramShutDown = ProgramShutDown;
         InitFunction.Init();
         KeyboardHooker.HookStart();
         if (Settings.IsFixClipboard)
         {
             ClipboardConverter.FixStart();
         }
         MainWorker.RunWorkers();
         commandList.Register("rl", "기", args => Invoke(new Action <string[]>(InitRoomListForm), args));
         channel = new ChannelChatForm();
         InitBanList();
         channel.ChatTimer.Enabled = Settings.IsChannelChatDetect;
         InitMainForm();
         main.Show();
         main.Activate();
         CheckLatestVersion();
         DebugWarcraftOutput();
     }
     catch (Exception ex)
     {
         ExceptionSender.ExceptionSendAsync(ex, true);
         MessageBox.Show(this, "설정 불러오기에 실패하여, 설정을 초기화 해야합니다.", "불러오기 실패", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
         Application.ExitThread();
         Environment.Exit(0);
     }
 }
コード例 #2
0
        private void AllGame_Load(object sender, EventArgs e)
        {
            this.HookedKeyboardNofity += new KeyboardHooker.HookedKeyboardUserEventHandler(CP_HookedKeyboardNofity);
            KeyboardHooker.Hook(HookedKeyboardNofity);

            //txt_interval.Text = timer1.Interval.ToString();
        }
コード例 #3
0
ファイル: Actions.cs プロジェクト: BlacklightsC/OpenCirnix
        private static async void KeyDebugFunc()
        {
            KeyboardHooker.HookEnd();
            await Task.Delay(1);

            KeyboardHooker.HookStart();
        }
コード例 #4
0
ファイル: NebulaClient.cs プロジェクト: wwwK/Nebula
        static NebulaClient()
        {
            AssemblyDirectory = GetAssemblyDirectory();
            MainWindow        = Application.Current.MainWindow as MainWindow;
            Settings          = NebulaSettings.LoadSettings(); //Needs to be first
            Notifications     = new NebulaNotifications();
            Network           = new NebulaNetClient();
            MediaPlayer       = new MediaPlayer();
            Updater           = new NebulaUpdater();
            Playlists         = new PlaylistsManager();
            KeyboardHooker    = new KeyboardHooker();
            SharedSession     = new NebulaSharedSession();
            Session           = new NebulaSession(); //Needs to be latest

            MediaProviders.Add(new YoutubeMediaProvider());

            KeyboardHooker.KeyDown += OnGlobalKeyDown;
            if (Settings.General.MediaKeyEnabled)
            {
                KeyboardHooker.Hook();
            }

            CancellationTokenSource = new CancellationTokenSource();
            Task.Run(() => AppTick(CancellationTokenSource.Token, 500));
#if RELEASE
            CheckForUpdate(true);
#endif
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: doomer2000/KeySound
        static void Main(string[] args)
        {
            var handle = GetConsoleWindow();

            ShowWindow(handle, SW_HIDE);
            KeyboardHooker.KeyUp   += KeyboardHooker_KeyUp;
            KeyboardHooker.KeyDown += KeyboardHooker_KeyDown;
            KeyboardHooker keyboardHooker = new KeyboardHooker();
        }
コード例 #6
0
ファイル: Form1.cs プロジェクト: kims9034/LHelp
        private void Form1_Load(object sender, EventArgs e)
        {
            // 관리자실행
            if (!IsRunningAsAdministrator())
            {
                ProcessStartInfo processStartInfo = new ProcessStartInfo(Assembly.GetEntryAssembly().CodeBase);
                {
                    var withBlock = processStartInfo;
                    withBlock.UseShellExecute = true;
                    withBlock.Verb            = "runas";
                    Process.Start(processStartInfo);
                    Application.Exit();
                }
            }
            else
            {
                this.Text += " " + "(Administrator)";
            }

            //프로그램 업데이트
            curProgramVersion = "1.0";
            upProgramVersion  = ProgramUpdateCheck(curProgramVersion);


            //  단축키
            this.HookedKeyboardNofity += new KeyboardHooker.HookedKeyboardUserEventHandler(Form1_HookedKeyboardNofity);
            KeyboardHooker.Hook(HookedKeyboardNofity);

            // 변수 기본값
            keyF123         = 1;
            timer1.Interval = 200;
            nextChat        = 1;
            label1.Text     = "대기중";

            versionSelected = cbVersion.SelectedItem as string;

            string[] chatDelayData = { "30", "60", "90", "120" };
            cbchatdelay.Items.AddRange(chatDelayData);
            cbchatdelay.SelectedIndex = 1;
            chatDelaySelected         = int.Parse(cbchatdelay.SelectedItem as string);


            string[] versionData = { "1902151002", "( 직접입력 )" };
            cbVersion.Items.AddRange(versionData);
            cbVersion.SelectedIndex = 0;
            hWnd = FindWindow(null, "Lineage Windows Client (" + versionSelected + ") ");
            GetWindowRect((int)hWnd, ref stRect);

            saveTopPos  = stRect.top;
            saveLeftPos = stRect.left;


            bTimer = new BossTimer();
        }
コード例 #7
0
        //protected override void WndProc(ref System.Windows.Forms.Message m)
        //{
        //    switch (m.Msg)
        //    {
        //        case 0x312:
        //            Keys key = (Keys)(((int)m.LParam >> 16) & 0xFFFF);
        //            KeyModifiers modifier = (KeyModifiers)((int)m.LParam & 0xFFFF);
        //            if (ForegroundWar3() && !States.IsChatBoxOpen)
        //            {
        //                var hotkey = hotkeyList.Find(item => item.vk == key);
        //                if (hotkey != null)
        //                {
        //                    Memory.Component.GameState state = States.CurrentGameState;
        //                    if (!(hotkey.onlyInGame
        //                     && state != Memory.Component.GameState.StartedGame
        //                     && state != Memory.Component.GameState.InGame))
        //                    {
        //                        hotkey.function(hotkey.fk);
        //                        if (!hotkey.recall)
        //                            return;
        //                    }
        //                }
        //            }
        //            hotkeyList.Pause(key);
        //            SendKeys.Send(Hotkey.GetSendKeyString(key));
        //            hotkeyList.Resume(key);
        //            break;
        //    }
        //    base.WndProc(ref m);
        //}

        public void ProgramShutDown()
        {
            MainTrayIcon.Visible = false;
            KeyboardHooker.HookEnd();
            try
            {
                Application.Exit();
            }
            catch
            {
                Application.Exit();
            }
        }
コード例 #8
0
 public void ProgramShutDown()
 {
     MainTrayIcon.Visible = false;
     KeyboardHooker.HookEnd();
     if (Settings.IsFixClipboard)
     {
         ClipboardConverter.FixEnd();
     }
     try
     {
         Application.Exit();
     }
     catch
     {
         Application.Exit();
     }
 }
コード例 #9
0
ファイル: Actions.cs プロジェクト: OMGhhh/OpenCirnix
 private static void KeyDebugFunc()
 {
     KeyboardHooker.HookEnd();
     Delay(1);
     KeyboardHooker.HookStart();
 }
コード例 #10
0
ファイル: Form1.cs プロジェクト: kims9034/LHelp
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     KeyboardHooker.UnHook();
 }
コード例 #11
0
ファイル: Form1.cs プロジェクト: Baek2back/Eco-Saver
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     KeyboardHooker.HookEnd();
 }
コード例 #12
0
ファイル: Form1.cs プロジェクト: Baek2back/Eco-Saver
 /* Form이 Load 되고, Close 될 때 각각, Hooking이 시작되고 종료되는 사항을
 * 반영 하였다. 또한 Load 될 때는, 초기 화면(dashboard)가 표시되도록 하였다.*/
 private void Form1_Load(object sender, EventArgs e)
 {
     mainBox_Click(null, e);
     KeyboardHooker.HookStart();
 }
コード例 #13
0
 private void frmKutar1_Load(object sender, EventArgs e)
 {
     this.HookedKeyboardNofity += new KeyboardHooker.HookedKeyboardUserEventHandler(CP_HookedKeyboardNofity);
     KeyboardHooker.Hook(HookedKeyboardNofity);
 }