// pops corresponding popup and calls transition event public void Pop(GamePopup popup) { if (!initialized) { Debug.LogError(debugableInterface.debugLabel + "Not initialized"); return; } Type type = GetTypeFromPopup(popup); if (type == null) { Debug.LogError(debugableInterface.debugLabel + "Couln't find type for GamePopup " + popup.ToString()); return; } else { Popup selected = scenePopups.Find(item => { return(item.GetType() == type); }); if (selected == null) { Debug.LogError(debugableInterface.debugLabel + "Couldn't find Popup for GamePopup " + popup.ToString()); return; } else { selected.Activate(this); actualPopup = popup; // FadeMusicIn.Invoke(); } } }
void backgroundWorkerProgressChanged(object sender, ProgressChangedEventArgs e) { if (!popupForm.isOpen || popupForm == null) { popupForm = new Popup(); popupForm.Show(); popupForm.isOpen = true; } else { popupForm.Activate(); popupForm.WindowState = FormWindowState.Normal; } popupForm.PopupListBox.Items.Add(e.ProgressPercentage.ToString() + "%"); }