public async Task RegisterReferencer(AbsoluteId referencerId) { gameDispatcher.EnsureAccess(); using (await loader.LockDatabaseAsynchronously()) { if (references.ContainsKey(referencerId)) { throw new InvalidOperationException("The given referencer is already registered."); } references.Add(referencerId, new Dictionary <AssetId, List <ReferenceAccessor> >()); } }
internal void ShowMainWindow() { // This method can be invoked only from the dispatcher thread. dispatcher.EnsureAccess(); if (launcherWindow == null) { // Create the window if we don't have it yet. launcherWindow = new LauncherWindow(); launcherWindow.Initialize(store); launcherWindow.Closed += (s, e) => launcherWindow = null; } if (WindowManager.MainWindow == null) { // Show it if it's currently not visible WindowManager.ShowMainWindow(launcherWindow); } else { // Otherwise just activate it. if (launcherWindow.WindowState == WindowState.Minimized) { launcherWindow.WindowState = WindowState.Normal; } launcherWindow.Activate(); } }