public override void Invoke(bool isSimulate, bool async) { log.Debug(this.ToString()); StateContainer.EnterGalaxy(); if (isSimulate) { sim.Mouse.MoveMouseTo(654 * xf, 612 * yf).Sleep(100).LeftButtonClick().Sleep(500); } }
public override void Invoke(bool isSimulate, bool async) { OpenCommanderPanelCommand openCommanderPanelCommand = new OpenCommanderPanelCommand(); openCommanderPanelCommand.StateContainer = StateContainer; openCommanderPanelCommand.Invoke(isSimulate, async); RecruitCommand recruitCommand = new RecruitCommand(); recruitCommand.StateContainer = StateContainer; recruitCommand.Invoke(isSimulate, async); CloseCommanderPanelCommand closeCommanderPanelCommand = new CloseCommanderPanelCommand(); closeCommanderPanelCommand.StateContainer = StateContainer; closeCommanderPanelCommand.Invoke(isSimulate, async); StateContainer.EnterGalaxy(); Point M874 = new Point(100, 100); EnterPlanetaryCommand enterPlanetaryCommand = new EnterPlanetaryCommand(M874); enterPlanetaryCommand.StateContainer = StateContainer; enterPlanetaryCommand.Invoke(isSimulate, async); log.Debug(this.ToString()); if (isSimulate) { // 874 III sim.Mouse.MoveMouseTo(256 * xf, 704 * yf).Sleep(100).LeftButtonClick().Sleep(2000); // 集中資源 sim.Mouse.MoveMouseTo(306 * xf, 687 * yf).Sleep(100).LeftButtonClick().Sleep(2000); // 創艦隊 sim.Mouse.MoveMouseTo(990 * xf, 654 * yf).Sleep(100).LeftButtonClick().Sleep(1500); if (Formation == 1) { // 第一種船 sim.Mouse.MoveMouseTo(200 * xf, (260 + (1 * 34) - 34) * yf).Sleep(100).LeftButtonClick().Sleep(300); clikcNCell(1); //// 第二種船 //sim.Mouse.MoveMouseTo(200 * xf, (260 + (2 * 34) - 34) * yf).Sleep(100).LeftButtonClick().Sleep(300); //clikcNCell(2); //// 第三種船 //sim.Mouse.MoveMouseTo(200 * xf, (260 + (3 * 34) - 34) * yf).Sleep(100).LeftButtonClick().Sleep(300); //clikcNCell(3); } else if (Formation == 2) { clikcNCell(1); clikcNCell(2); clikcNCell(3); clikcNCell(4); clikcNCell(5); clikcNCell(6); clikcNCell(7); clikcNCell(8); clikcNCell(9); } // 艦隊名 sim.Mouse.MoveMouseTo(380 * xf, 210 * yf).Sleep(100).LeftButtonClick().Sleep(300); sim.Keyboard.TextEntry("Airborne").Sleep(100); // 下一步 sim.Mouse.MoveMouseTo(570 * xf, 670 * yf).Sleep(100).LeftButtonClick().Sleep(1500); // 大功告成 sim.Mouse.MoveMouseTo(566 * xf, 675 * yf).Sleep(100).LeftButtonClick().Sleep(5000); // 最大值 sim.Mouse.MoveMouseTo(320 * xf, 530 * yf).Sleep(100).LeftButtonClick().Sleep(1000); // 裝貨 sim.Mouse.MoveMouseTo(420 * xf, 550 * yf).Sleep(100).LeftButtonClick().Sleep(1000); // 關閉 sim.Mouse.MoveMouseTo(661 * xf, 646 * yf).Sleep(100).LeftButtonClick().Sleep(300); // safty close sim.Mouse.MoveMouseTo(600 * xf, 495 * yf).Sleep(100).LeftButtonClick().Sleep(2000); // 移動 sim.Mouse.MoveMouseTo(915 * xf, 405 * yf).Sleep(100).LeftButtonClick().Sleep(750); // 星門 sim.Mouse.MoveMouseTo(700 * xf, 700 * yf).Sleep(100).LeftButtonClick().Sleep(1000); StateContainer.EnterGalaxy(); GalaxyMovingCommand galaxyMovingCommand = new GalaxyMovingCommand(Point); galaxyMovingCommand.StateContainer = StateContainer; galaxyMovingCommand.Invoke(isSimulate, async); sim.Mouse.LeftButtonClick().Sleep(500); // 躍遷 sim.Mouse.MoveMouseTo(870 * xf, 240 * yf).Sleep(100); } }