public NotepadLogger(ObjectPool <StringBuilder> stringBuilderPool, IWindowFinder windowFinder, string categoryName, string windowName) { this.stringBuilderPool = stringBuilderPool ?? throw new ArgumentNullException(nameof(stringBuilderPool)); this.windowFinder = windowFinder ?? throw new ArgumentNullException(nameof(windowFinder)); this.categoryName = categoryName; this.windowName = windowName; }
protected Window(string title, IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, ISettingsStore settings) { Parent = screen; Settings = settings; Screen = screen; InputDevice = inputDevice; WindowFinder = windowFinder; IntPtr handle; try { handle = windowFinder.GetWindowHandle(title); } catch (WindowNotFoundException) { OpenIfNotFound(); handle = windowFinder.GetWindowHandle(title); } var dimensions = windowFinder.GetDimensions(handle); _relativeLeft = dimensions.Left; _relativeRight = dimensions.Right; _relativeBottom = dimensions.Bottom; _relativeTop = dimensions.Top; Handle = handle; }
public UIMap(ISettingsStore settings, IWindowFinder windowFinder, IOCRReader ocr, IInputDevice input, IScreen screen) { Settings = settings; WindowFinder = windowFinder; OCR = ocr; InputDevice = input; Screen = screen; }
public virtual void SetUp() { var currentProcess = Process.GetCurrentProcess(); _currentProcessID = currentProcess.Id; _nativeMethodsStub = MockRepository.GenerateStub <IWin32WindowsNativeMethods>(); _windowFinder = new NativeWindowFinder(_nativeMethodsStub); }
public WindowServices( ILogServices logServices, IWindowFinder windowFinder) { // save dependency injections _logServices = logServices; _windowFinder = windowFinder; // subscribe to found windows _windowFinder.Subscribe(this); }
public CommandersWindow(IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, IOCRReader ocr, ISettingsStore settings) : base("Commanders", screen, windowFinder, inputDevice, settings) { LeaderType = new Combobox(this, inputDevice, ocr, left: 101, right: 272, top: 140, bottom: 156) { CharacterOffset = 4, CharacterHeight = 9, Colors = new[] { new byte[] { 0, 0, 0 } } }; Officiers = new TreeList(this, inputDevice, ocr, left: 29, right: 289, top: 176, bottom: 292) { CharacterOffset = 2, BottomOffset = 2, CharacterHeight = 11 }; }
public OverlayToTableAttacherSut(IWindowManipulator windowManipulator, IWindowFinder windowFinder) : base(windowManipulator, windowFinder) { }
//--------------------------------------------------------------------- public CommandRunner(IServiceProvider serviceProvider, IWindowFinder windowFinder) { this.serviceProvider = serviceProvider; this.windowFinder = windowFinder; this.configFile = new TemporaryFile(); }
public OverlayToTableAttacher(IWindowManipulator windowManipulator, IWindowFinder windowFinder) { _windowManipulator = windowManipulator; _windowFinder = windowFinder; }
public EventWindow(IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, ISettingsStore settings) : base("Event Updates", screen, windowFinder, inputDevice, settings) { TextFileButton = new Button(this, inputDevice, left: 107, right: 187, top: 866, bottom: 890); }
public ConsoleWindow(IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, ISettingsStore settings) : base(@"file:///", screen, windowFinder, inputDevice, settings) { }
//--------------------------------------------------------------------- public MainWindowsManager(IWindowFinder windowFinder, MainSettingController mainSettingController) { this.windowFinder = windowFinder; this.mainSettingController = mainSettingController; }
public SystemMapWindow(IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, ISettingsStore settings) : base("System Map", screen, windowFinder, inputDevice, settings) { }
public TaskGroupsWindow(IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, ISettingsStore settings) : base("Task Groups", screen, windowFinder, inputDevice, settings) { }
//--------------------------------------------------------------------- public CoverageTreeManager(IWindowFinder windowFinder) { this.windowFinder = windowFinder; }
public PopulationAndProductionWindow(IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, IOCRReader ocr, ISettingsStore settings) : base("Population and Production", screen, windowFinder, inputDevice, settings) { ResearchTable = new Datagrid(this, inputDevice, ocr, 406, 613, new [] { 406, 687, 754, 776 }) { LineHeight = 16, TopOfCharactersOffset = 3, Settings = PrintSettings.NewResearchTable }; AvailableScientistsTable = new Datagrid(this, inputDevice, ocr, 406, 613, new[] { 790, 909, 1056, 1184 }) { LineHeight = 16, TopOfCharactersOffset = 3, Settings = PrintSettings.AvailableScientistTable }; ConstructionOptions = new Datagrid(this, inputDevice, ocr, 245, 669, new [] { 398, 599 }) { LineHeight = 16, TopOfCharactersOffset = 3 }; AllocatedLabs = new Textbox(this, inputDevice, ocr, left: 885, right: 929, top: 357, bottom: 371) { CharacterOffset = 3, CharacterHeight = 9, Colors = new[] { new byte[] { 0, 0, 0 } } }; AvailableLabs = new Textbox(this, inputDevice, ocr, left: 1037, right: 1073, top: 357, bottom: 371) { CharacterOffset = 3, CharacterHeight = 9, Colors = new[] { new byte[] { 109, 109, 109 } } }; NumberOfIndustrialProject = new Textbox(this, inputDevice, ocr, left: 725, right: 769, top: 696, bottom: 710) { CharacterOffset = 3, CharacterHeight = 9, Colors = new[] { new byte[] { 0, 0, 0 } } }; CreateIndustrialProject = new Button(this, inputDevice, left: 635, right: 707, top: 730, bottom: 754); InstallationType = new Combobox(this, inputDevice, ocr, left: 501, right: 801, top: 180, bottom: 196) { CharacterOffset = 4, CharacterHeight = 9, Colors = new[] { new byte[] { 0, 0, 0 } } }; ContractAmount = new Textbox(this, inputDevice, ocr, left: 501, right: 553, top: 220, bottom: 234) { CharacterOffset = 3, CharacterHeight = 9, Colors = new[] { new byte[] { 0, 0, 0 } } }; CivilianContractSupply = new RadioButton(this, inputDevice, left: 696, right: 707, top: 220, bottom: 231); CivilianContractDemand = new RadioButton(this, inputDevice, left: 784, right: 795, top: 221, bottom: 232); AddCivilianContract = new Button(this, inputDevice, left: 411, right: 491, top: 514, bottom: 538); Populations = new TreeList(this, inputDevice, ocr, left: 21, right: 361, top: 100, bottom: 807); Populations.Refresh += (sender, args) => { MakeActive(); Empire.SelectOption(1); }; PurchaseMineralOutput = new RadioButton(this, inputDevice, left: 536, right: 547, top: 804, bottom: 815); MassDriverDestination = new Combobox(this, inputDevice, ocr, left: 1005, right: 1184, top: 156, bottom: 172) { CharacterOffset = 4, CharacterHeight = 9, Colors = new[] { new byte[] { 0, 0, 0 } } }; Empire = new Combobox(this, inputDevice, ocr, left: 19, right: 363, top: 46, bottom: 66) { CharacterOffset = 6, CharacterHeight = 11, Colors = new[] { new byte[] { 0, 0, 0 } } }; CurrentResearchProject = new Datagrid(this, inputDevice, ocr, 193, 289, new[] { 399, 632, 799, 859, 929, 999, 1132, 1158 }) { LineHeight = 16, TopOfCharactersOffset = 3 }; RemoveRL = new Button(this, inputDevice, left: 683, right: 763, top: 299, bottom: 323); AddRL = new Button(this, inputDevice, left: 587, right: 667, top: 299, bottom: 323); NumberOfLabs = new Label(this, inputDevice, ocr, left: 515, right: 541, top: 140, bottom: 148); MatchingScientistsOnly = new RadioButton(this, inputDevice, left: 740, right: 750, top: 362, bottom: 372); }
public BaseAuroraWindow(IScreen screen, IWindowFinder windowFinder, IInputDevice inputDevice, ISettingsStore settings) : base(settings.GameName, screen, windowFinder, inputDevice, settings) { }