Beispiel #1
0
 public Station(WindowHandler wh)
 {
     this.m = wh.MOUSE;
     this.pm = wh.PMOUSE;
     this.mh = wh.MENU;
     this.com = wh.COMMUNICATOR;
     ran = new Random();
 }
Beispiel #2
0
 /// <summary>
 /// Builds station handler with current mouse, pmouse, menu handler and communicator 
 /// </summary>
 /// <param name="m">Bot's mouse</param>
 /// <param name="pm">Bot's precise mouse</param>
 /// <param name="mh">Bot's menu handler</param>
 /// <param name="com">Bot's communicator</param>
 public Station(Mouse m, PreciseMouse pm, MenuHandler mh, Communicator com)
 {
     this.m = m;
     this.pm = pm;
     this.mh = mh;
     this.com = com;
     ran = new Random();
 }
Beispiel #3
0
 public LocalHandler(WindowHandler wh)
 {
     com = wh.COMMUNICATOR;
     m = wh.MOUSE;
     pm = wh.PMOUSE;
     ran = new Random();
     mh = wh.MENU;
     kb = wh.KEYBOARD;
 }
Beispiel #4
0
 public Ship(WindowHandler wh)
 {
     overviewhandler = wh.OVERVIEW;
     com = wh.COMMUNICATOR;
     menu = wh.MENU;
     pm = wh.PMOUSE;
     m = wh.MOUSE;
     kb = wh.KEYBOARD;
 }
Beispiel #5
0
 /// <summary>
 /// Handles the agent interaction
 /// </summary>
 /// <param name="wh"></param>
 public AgentHandler(WindowHandler wh)
 {
     com = wh.COMMUNICATOR;
     m = wh.MOUSE;
     pm = wh.PMOUSE;
     ran = new Random();
     mh = wh.MENU;
     kb = wh.KEYBOARD;
     sess = wh.SESSION;
 }
Beispiel #6
0
        /// <summary>
        /// Initializes the bot by creating a new WindowHandler and adding it as a tab to the ClientWindow
        /// </summary>
        /// <param name="cw">A reference to the ClientWindow</param>
        public void initializeBot(ClientWindow cw)
        {
            bot = new WindowHandler(cw);
            bot.bringToFront();
            bot.setTopLevel(false);
            bot.setVisible(true);

            bot.setFormBorderStyle(FormBorderStyle.None);
            bot.setDockStyle(DockStyle.Fill);

            cw.tabControl1.TabPages[0].Controls.Add(bot);
            cw.tabControl1.TabPages[0].Text = "Bot";

            /*
            backgroundScripts = new List<Scriptable>();
            Script.Scripts.InterfaceCloser icloser = new Script.Scripts.InterfaceCloser();
            icloser.initializeInputs(bot);
            backgroundScripts.Add(icloser);
            */

            this.cw = cw;
            //DEBUGGING STUFF
            //com = new Communicator("\\\\.\\pipe\\TestChannel");
            menuHandler = new MenuHandler(bot.MOUSE, bot.PMOUSE, bot.COMMUNICATOR, bot.KEYBOARD);
            over = new OverviewHandler(bot.MENU, bot.MOUSE, bot.PMOUSE, bot.COMMUNICATOR);
        }
Beispiel #7
0
 /// <summary>
 /// Internal use, the Bot will initialize the script with its input handlers once its loaded into memory
 /// </summary>
 /// <param name="bot">The reference to the bot's windowhandler</param>
 public void initializeInputs(WindowHandler bot)
 {
     this.EMouse = bot.MOUSE;
     this.EPreciseMouse = bot.PMOUSE;
     this.EMenuHandler = bot.MENU;
     this.ECommunicator = bot.COMMUNICATOR;
     this.EOverViewHandler = bot.OVERVIEW;
     this.EStationHandler = bot.STATION;
     this.MyShip = bot.SHIP;
     this.ESession = bot.SESSION;
     this.ECamera = bot.CAMERA;
     this.EKeyboard = bot.KEYBOARD;
     this.ELocalHandler = bot.LOCAL;
     this.EDrawingArea = bot.DrawingArea;
     this.ELogger = bot.LOGGER;
     this.ELogger.ScriptName = name;
     this.EAgentHandler = bot.AGENT;
     ERandom = new Random();
 }