Exemplo n.º 1
0
        public Program(AppConfiguration appConfig)
        {
            if (string.IsNullOrEmpty (appConfig.Command)) {
                return;
            }

            _commandName = appConfig.Command;
            _commandArguments = appConfig.Arguments;
            BuildStartScript (false);
        }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 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;
 }