Ejemplo n.º 1
0
        /// <summary>
        ///     This is the timer we use for hotkey detection
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HotkeyTimer_Tick(object sender, EventArgs e)
        {
            if (CurrentDemoFile == null)
            {
                return;
            }
            var popupkey = KeyInputApi.GetKeyState(DemoPopupKey);

            if ((popupkey & 0x8000) != 0)
            {
                if (WindowState == FormWindowState.Minimized)
                {
                    WindowState = FormWindowState.Normal;
                }
                else
                {
                    TopMost = true;
                    Focus();
                    BringToFront();
                    TopMost = false;
                }
                RescanFile();
                //MessageBox.Show(GetDemoDetails(CurrentDemoFile)); //TODO: Once the l4d2 parser is done resolve this
            }
        }
Ejemplo n.º 2
0
        private void HotkeyTimer_Tick(object sender, EventArgs e)
        {
            if (CurrentDemoFile == null)
            {
                return;
            }
            var keyInput = KeyInputApi.GetKeyState(0x70);

            if ((keyInput & 0x8000) != 0)
            {
                MessageBox.Show("Demo protocol: " + CurrentDemoFile.Info.DemoProtocol + "\n"
                                + "Net protocol: " + CurrentDemoFile.Info.NetProtocol + "\n"
                                + "Server name: " + CurrentDemoFile.Info.ServerName + "\n"
                                + "Client name: " + CurrentDemoFile.Info.ClientName + "\n"
                                + "Map name: " + CurrentDemoFile.Info.MapName + "\n"
                                + "Game directory: " + CurrentDemoFile.Info.GameDirectory + "\n"
                                + "Length in seconds: " + CurrentDemoFile.Info.Seconds + "\n"
                                + "Tick count: " + CurrentDemoFile.Info.TickCount + "\n"
                                + "Frame count: " + CurrentDemoFile.Info.FrameCount);
            }
        }