//Method for the Mainform, better to have it splitted!
        private void Form1Setup()
        {
            //Call Config-form
            if (!File.Exists("Settings.xml"))
            {
                var cfg = new Configure(this);
                cfg.ShowDialog();
            }

            tmrTick.Enabled = true;

            FormBorderStyle = FormBorderStyle.None;

            Width = Screen.PrimaryScreen.Bounds.Width;
            Height = Screen.PrimaryScreen.Bounds.Height;

            Location = new Point(0, 0);

            //Read stuff from xmlfile
            XmlRead();

            pnlIncome.Enabled = pnlIncome.Visible;
            pnlRessources.Enabled = pnlRessources.Visible;
            pnlWorkers.Enabled = pnlWorkers.Visible;
            pnlStates.Enabled = pnlStates.Visible;
            pnlMaphack.Enabled = pnlMaphack.Visible;
            pnlProduction.Enabled = pnlProduction.Visible;
            pnlAPM.Enabled = pnlAPM.Visible;
            pnlArmy.Enabled = pnlArmy.Visible;
        }
        /// <summary>
        /// Method to catch the Settings-call to display the settings-window.
        /// </summary>
        /// <param name="shortcut">Your shortcut for the call</param>
        private void CatchKeyboardInputForSettings(string shortcut)
        {
            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)
            {
                if (_bchanged)
                {
                    var cfg = new Configure(this);
                    cfg.ShowDialog();

                    _bchanged = false;
                }
            }
        }
        //Catch Keystrokes by the user
        private void CatchKeystrokes()
        {
            //Get input for Ressource-panel
            int icatch1 = GetAsyncKeyState(_uRessource);    //Ressource-Panel
            int icatch2 = GetAsyncKeyState(_uWorker);       //Worker- Panel
            int icatch3 = GetAsyncKeyState(_uIncome);       //Income- Panel
            int icatch4 = GetAsyncKeyState(_uStates);       //States- Panel
            int icatch5 = GetAsyncKeyState(_uMaphack);      //Maphack- Panel
            int icatch6 = GetAsyncKeyState(0x0D);           //Enter/ adjustment
            int icatch7 = GetAsyncKeyState(_uProduction);   //Unit- Panel
            int icatch8 = GetAsyncKeyState(_uApm);          //APM- Panel
            int icatch9 = GetAsyncKeyState(_uArmy);         //Army Panel
            int iSettings = GetAsyncKeyState(_uSettings);   //Settings-call
            int icatch10 = GetAsyncKeyState(_uInject);      //Inject- method

            //Proof for Setting-form
            if (iSettings == -32767 || iSettings == 1)
            {
                WriteSettings();
                Hide();
                tmrTick.Enabled = false;

                var cfg = new Configure(this);
                cfg.ShowDialog();
            }

            //Inject- method
            //if (icatch10 == -32767 || icatch10 == 1)
            //    _Autoinject = !_Autoinject;

            PanelEnableOrDisable(pnlRessources, icatch1);
            PanelEnableOrDisable(pnlWorkers, icatch2);
            PanelEnableOrDisable(pnlIncome, icatch3);
            PanelEnableOrDisable(pnlStates, icatch4);
            PanelEnableOrDisable(pnlMaphack, icatch5);
            PanelEnableOrDisable(pnlProduction, icatch7);
            PanelEnableOrDisable(pnlAPM, icatch8);
            PanelEnableOrDisable(pnlArmy, icatch9);

            #region Fix Panels position

            //Fix the new position with Enter
            if (icatch6 != 1 && icatch6 != -32767) return;

            _bdone1 = false;
            _bdone2 = false;
            _bdone3 = false;
            _bdone4 = false;
            _bdone5 = false;
            _bdone6 = false;
            _bdone7 = false;
            _bdone8 = false;
            _bdone9 = false;

            #endregion
        }
 public AdjustPanelPosition(Configure conf, string Panels)
 {
     _cfg = conf;
     _sPnl = Panels;
     InitializeComponent();
 }