private void Awake() { languageController = FindObjectOfType <LanguageController>(); confirmationScreen = FindObjectOfType <ConfirmationScreen>(); recruitmentController = GameObject.FindObjectOfType <RecruitmentController>().GetComponent <RecruitmentController>(); pDataController = GameObject.FindObjectOfType <PlayerDataController>(); }
/// <summary> /// A function to get the singleton instance of the class, or create it if id doesnt /// exist. /// </summary> /// <returns>ConfiramationScreen</returns> public static ConfirmationScreen ConfirmationScreenInstance() { if (confirmationScreen == null) { confirmationScreen = new ConfirmationScreen(); } return(confirmationScreen); }
public void OnEnterRestore(ButtonGroup group) { group.Enabled = false; ConfirmationScreen dialog = new ConfirmationScreen(); Manager.Scene.AddEntity(dialog); dialog.Caption = Session.Strings["confirm_restore"]; dialog.Group = menu; dialog.OnOkEvent += OnRestoreEvent; }
public void Restart() { List <System.Action> yesFunctions = new List <System.Action>(); yesFunctions.Add(LevelManager.instance.RestartFromBeginning); yesFunctions.Add(Pausing); ConfirmationScreen temp = Instantiate(confirmationRef); temp.Init("Are you sure you want to Restart?", yesFunctions); }
public void ClearData() { List <System.Action> yesFunctions = new List <System.Action>(); yesFunctions.Add(LevelManager.instance.ClearSavedData); PlayerPrefs.DeleteAll(); ConfirmationScreen temp = Instantiate(confirmationRef); temp.Init("Are you sure you want to clear all Data?", yesFunctions); }
private void RunCommands_Click(object sender, EventArgs e) { mainErrorProvider.SetError(Username, Username.Text == "" ? "gebruikersnaam vereist" : ""); mainErrorProvider.SetError(Password, Password.Text == "" ? "wachtwoord vereist" : ""); if (Command1.Text == "") { mainErrorProvider.SetError(Command1, _selectedScriptPath != "" ? "" : "commando of script vereist"); } else { mainErrorProvider.SetError(Command1, ""); } if (Username.Text != "" && Password.Text != "" && (Command1.Text != "" || AllCommands.Count != 0)) { if (SelectedIpAddresses.Count == 0) { MessageBox.Show("geen routers geselecteerd, vink de router(s) aan die je wilt aansturen"); } else { Log.Info("start the executing commands function"); List <string> commands = new List <string>(); foreach (var item in AllCommands) { commands.Add(item); } if (Command1.Text != "") { commands.Add(Command1.Text); } if (Command2.Text != "") { commands.Add(Command2.Text); } if (Command3.Text != "") { commands.Add(Command3.Text); } if (Command4.Text != "") { commands.Add(Command4.Text); } var confirmDialog = new ConfirmationScreen(allSelectedRouters.Items.Cast <string>().ToList(), commands); confirmDialog.ShowDialog(); if (confirmDialog.DialogResult == DialogResult.OK) { SendCommandsInBulkAsync(SelectedIpAddresses, commands); } } } }
public void Home() { List <System.Action> yesFunctions = new List <System.Action>(); yesFunctions.Add(delegate() { SceneTransition.instance.LoadSceneInBG("LevelSelection"); }); yesFunctions.Add(delegate() { LevelManager.instance.ResetLevelVariables(); }); yesFunctions.Add(delegate() { EventManager.instance.TriggerUpdateHUDEvent(false); }); yesFunctions.Add(delegate() { AudioManager.StopAllBGM(); }); yesFunctions.Add(delegate() { AudioManager.PlayBGM("Level", true); }); yesFunctions.Add(Pausing); ConfirmationScreen temp = Instantiate(confirmationRef); temp.Init("Are you sure you want to go Home?", yesFunctions); }
public void OnEnterExit(ButtonGroup group) { group.Enabled = false; ConfirmationScreen dialog = new ConfirmationScreen(); Manager.Scene.AddEntity(dialog); dialog.Caption = Session.Strings["confirm_exit"]; dialog.Group = menu; dialog.OnOkEvent += OnExitEvent; dialog.OnCancelEvent += OnCancelExitEvent; if (purchase != null) { purchase.Enabled = false; } }