//Constructors---------------------------------------------------------------------------------------------------------// public AppMainService(AppSettings appSettings, AppUtilities appUtilities, AppBackgroundTask appBackgroundTask) { this.appSettings = appSettings; this.appUtilities = appUtilities; this.appBackgroundTask = appBackgroundTask; this.BackgroundTaskRunning = false; }
//Constructors---------------------------------------------------------------------------------------------------------// public AppBackgroundTask(AppSettings appSettings, AppUtilities appUtilities, IAppPort appPort) { this.appSettings = appSettings; this.appUtilities = appUtilities; this.appPort = appPort; jobRow = 0; nextCommandDT = DateTime.Now; pendingCommandsNo = 0; commandResponses = new List<string>(); }
//Constructors---------------------------------------------------------------------------------------------------------// public MainWindow() { this.FormClosePending = false; appSettings = new AppSettings(); appUtilities = new AppUtilities(appSettings); appPort = new AppComPort(); appPort.ReadTimeout = 5; appBackgroundTask = new AppBackgroundTask(appSettings, appUtilities, appPort); appMainService = new AppMainService(appSettings, appUtilities, appBackgroundTask); InitializeComponent(); readAppSettingsFromXml(); appMainService.BackgroundProgress += updateOnScanProgress; appMainService.BackgroundCancelled += updateOnScanCancelled; }
//Constructors---------------------------------------------------------------------------------------------------------// public AppUtilities(AppSettings appSettings) { this.appSettings = appSettings; }