public Program(AppConfiguration appConfig) { if (string.IsNullOrEmpty (appConfig.Command)) { return; } _commandName = appConfig.Command; _commandArguments = appConfig.Arguments; BuildStartScript (false); }
public AppStartController(AppConfiguration appConfiguration) { _application = DependencyResolver.GetImplementation<IProgram> ("IProgram", new object[] { appConfiguration }); _appWidget = new AppStartWidget (); _appWidget.SetApp (appConfiguration.Name, appConfiguration.Command); _appWidget.Start += AppWidgetStart; _appWidget.Stop += AppWidgetStop; _application.HasExited += Application_HasExited; _application.HasStarted += Application_HasStarted; _appName = appConfiguration.Name; }
public Program(AppConfiguration appConfig) { _worker = new BackgroundWorker { WorkerSupportsCancellation = true }; _worker.DoWork += Worker_Work; if (string.IsNullOrEmpty (appConfig.Command)) { return; } _commandName = appConfig.Command; _commandArguments = appConfig.Arguments; }
List<AppConfiguration> GetConfigurations() { List<AppConfiguration> newConfigurations = new List<AppConfiguration> (); foreach (IAppConfigWidget widget in _widgets) { AppConfiguration newConfig = new AppConfiguration (widget.Name, widget.Command, widget.Arguments); newConfigurations.Add (newConfig); } return newConfigurations; }