public async Task OpenCurrentModelAsync() { if (existingInstanceService.TryActivateExistingInstance(null)) { // Another instance for this working folder is already running and it received the // command line from this instance, lets exit this instance, while other instance continuous Application.Current.Shutdown(0); return; } apiManagerService.Register(); await loadModelService.Value.LoadAsync(); }
private bool TryActivateExistingInstance() { return(existingInstanceService.TryActivateExistingInstance(Environment.GetCommandLineArgs())); }