public RequestElevationView( IApplicationLauncher applicationLauncher, IViewManager viewManager, ILogger <RequestElevationView> logger) { this.applicationLauncher = applicationLauncher.ThrowIfNull(nameof(applicationLauncher)); this.viewManager = viewManager.ThrowIfNull(nameof(viewManager)); this.logger = logger.ThrowIfNull(nameof(logger)); this.InitializeComponent(); }
/// <summary> /// Create a new instance of the <see cref="SingletonApplicationLauncher"/>. /// </summary> /// <param name="internalLancher">The <see cref="IApplicationLauncher"/> /// to use internally, when launching a new instance of the application.</param> /// <param name="applicationID">The unique string used to identify the single-instance application. /// Typically this value is a GUID, although any non-empty string is allowed.</param> /// <param name="global">Determines whether to limit the single instance Globally or Locally. /// /// If true, the single instance of the application will be limited across all /// user accounts on the current machine. /// /// If false, a single instance of the application will be allowed /// per user account on the machine.</param> public SingletonApplicationLauncher(IApplicationLauncher internalLancher, string applicationID, bool global = false) { if (internalLancher == null) { throw new ArgumentNullException("internalLauncher", "Internal Application Launcher cannot be null"); } if (string.IsNullOrWhiteSpace(applicationID)) { throw new ArgumentNullException("applicationID", "Application Identifier cannot be null or empty."); } _newInstanceLauncher = internalLancher; _applicationId = applicationID; _global = global; }
public ScreenChoiceView( IViewManager viewManager, IScreenManager screenManager, ILiveOptions <ApplicationConfiguration> liveOptions, IApplicationLauncher applicationLauncher) { this.viewManager = viewManager.ThrowIfNull(nameof(viewManager)); this.screenManager = screenManager.ThrowIfNull(nameof(screenManager)); this.liveOptions = liveOptions.ThrowIfNull(nameof(liveOptions)); this.applicationLauncher = applicationLauncher.ThrowIfNull(nameof(applicationLauncher)); this.InitializeComponent(); this.selectedId = this.liveOptions.Value.DesiredGuildwarsScreen; this.CanTest = applicationLauncher.IsGuildwarsRunning; this.SetupView(); }
void LaunchApplication() { IApplicationLauncher applicationLauncher = container.Resolve <IApplicationLauncher>(); applicationLauncher.Execute(); }