GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
ApplicationSettings.cs
1// =============================================================================
2// GPAL - Generally Positive Automation Library
3// Copyright © 2026 Software Decisions, Inc. All rights reserved.
4//
5// This file is part of GPAL.
6// Licensed under the Business Source License 1.1
7//
8// Primary development, architecture, and vision by Michael B. Vederman,
9// CEO of Software Decisions, Inc., Texas.
10//
11// Internal development maintained privately.
12// Public releases appear on GitHub: https://github.com/SoftwareDecisionsInc/GPAL.
13//
14// See LICENSE for full terms, including Additional Use Grant.
15// =============================================================================
16
17using System;
18using System.Collections;
19using System.Collections.Generic;
20using System.Diagnostics;
21using System.Linq;
22using System.Text;
23using System.Threading.Tasks;
24using System.Windows.Automation;
25using System.Windows.Forms;
26using OpenQA.Selenium;
27using static GenerallyPositive.Enums;
28
30{
31 internal class ApplicationSettings
32 {
33 internal Application Application { get; set; }
34 internal string ApplicationPath { get; set; }
35 // name of this application instance, set by GPAL factory
36 internal string Name { get; set; } = null;
37
38 internal Process Process { get; set; } = null;
39 // load images on a web page?
40 internal bool LoadImages { get; set; } = false;
41
42 // open pdf documents in external program?
43 internal bool OpenPDFExternally { get; set; } = true;
44
45 // open file save dialog
46 internal bool PromptForDownload { get; set; } = true;
47
48 internal string PlatformName { get; set; } = "Windows 10";
49
50 internal bool Maximize { get; set; } = false;
51
52 internal bool Minimize { get; set; } = false;
53
54 internal Selector MySelector { get; set; } = null;
55
56 internal AutomationElement RootAutomationElement { get; set; } = null;
57 internal object ManagedRootAutomationElement { get; set; } = null;
58
59 internal System.Windows.Forms.Form CurrentForm { get; set; } = null;
60 internal int WaitForWindowTimeout { get; set; } = 10; // seconds
61 internal bool UseHardware { get; set; } = false; // instead of uiautomation, use hardware emulation
62 internal IntPtr LastWindowHandle { get; set; } = IntPtr.Zero;
63
64 internal bool DeleteFileBeforeDownload { get; set; } = false;
65
66 internal ArrayList Parameters
67 {
68 get;
69 set;
70 }
71
72 internal ApplicationSettings(Application application)
73 {
74 Application = application;
75 Parameters = new ArrayList();
76 }
77 }
78}
79