public System.Action Initialize(IKernel container, string[] commandArgs) { object startView; if (commandArgs.Length > 0) { //First check if there are privileged actions to execute. If so we do that and no more and ask the application to close. if (_actionsManager.ExecuteCommandLine(commandArgs)) { return null; } var source = new ConfigSource(new FileConfigProvider(commandArgs[0])); startView = new ConfigRequest( ConfigRequest.Action.Open, source); } else { startView = new ConfigRequest(ConfigRequest.Action.StartScreen); } //Load plugins and update the assembly source cache accordingly var actionSources = LoadPlugins(container); //Build the action collections _actionsManager.BuildActions(actionSources); return () => { var msg = container.Get<IEventAggregator>(); msg.Publish(startView); }; }
public override void Execute() { this.Context.Messenger.Publish(EnsureAllBindingsRequest.Instance); var msg = new ConfigRequest(ConfigRequest.Action.Save); this.Context.Messenger.Publish(msg); }
public void SelectSource(ConfigSource source) { var msg = new ConfigRequest(ConfigRequest.Action.Open, source); _messenger.Publish(msg); }
public void New() { var msg = new ConfigRequest(ConfigRequest.Action.New); _messenger.Publish(msg); }
public override void Execute() { var msg = new ConfigRequest(ConfigRequest.Action.Delete); this.Context.Messenger.Publish(msg); }