Пример #1
0
        //Method for the Keyboard input, adjust Panel positions
        /// <summary>
        /// Here the user can adjust his positions (for the panels)
        /// </summary>
        /// <param name="shortcut">The code for the input (e.g. '/atg')</param>
        /// <param name="dbpanel">The panel where we want to take affect on</param>
        /// <param name="bdone">Check if it's already done, if so, disable</param>
        private void CatchKeyboardInputAdjustment(string shortcut, DoubleBufferPanel dbpanel, bool bdone)
        {
            var strInput = Encoding.UTF8.GetString(DoHandle(_pcPointer.PointerOffset(Chat, Offset1Chat, Offset2Chat, Offset3Chat, Offset4Chat, Offset5Chat), (uint)shortcut.Length));

            if (_strBackup != strInput)
                _bchanged = true;

            _strBackup = strInput;

            //Proof for shortcut
            if (_strBackup == shortcut)
                bdone = true;

            if (bdone)
                dbpanel.Location = Cursor.Position;
        }
Пример #2
0
        //Method to enable/disable panels
        private static void PanelEnableOrDisable(DoubleBufferPanel pnl, int iNumber)
        {
            if (iNumber == 1 || iNumber == -32767)
            {
                if (pnl.Visible)
                {
                    pnl.Visible = false;
                    pnl.Enabled = false;
                }

                else if (!pnl.Visible)
                {
                    pnl.Visible = true;
                    pnl.Enabled = true;
                }
            }
        }
Пример #3
0
        //Method for the Keyboard input
        /// <summary>
        /// Here we catch the simple input ('/tg')
        /// </summary>
        /// <param name="shortcut">Our input- code</param>
        /// <param name="dbpanel">The panel where the stuff should affect on</param>
        private void CatchKeyboardInput(string shortcut, DoubleBufferPanel dbpanel)
        {
            var strInput = Encoding.UTF8.GetString(DoHandle(_pcPointer.PointerOffset(Chat, Offset1Chat, Offset2Chat, Offset3Chat, Offset4Chat, Offset5Chat), (uint)shortcut.Length));

            if (_strBackup != strInput)
                _bchanged = true;

            _strBackup = strInput;

            //Proof for shortcut
            if (strInput == shortcut)
            {
                if (_bchanged)
                {
                    if (dbpanel.Visible)
                    {
                        dbpanel.Visible = false;
                        dbpanel.Enabled = false;
                    }

                    else if (dbpanel.Visible == false)
                    {
                        dbpanel.Visible = true;
                        dbpanel.Enabled = true;
                    }

                    WriteMemory(
                        _pcPointer.PointerOffset(Chat, Offset1Chat, Offset2Chat, Offset3Chat, Offset4Chat, Offset5Chat),
                        Encoding.UTF8.GetBytes(" "));
                    _bchanged = false;
                }
            }
        }