private void StartMayhem() { //turn off a function from being called procHost.DeactivateProcess(StartMayhem); //OR: procHost[StartMayhem] = false; }
private void UserInput() { _stringSizeF = GetStringInfo(); var selectedOption = Conversation[_conversationLine]; var options = selectedOption.Options.Select(option => option.OptionValue).Cast <dynamic>().ToList(); var optionQuestion = Conversation[_conversationLine].Question; DetectiveMenu.StartMenu(options, optionQuestion, Convert.ToInt32(_stringSizeF.Width), DetectiveMenu.InteractionType.Detective, UserResponseSelected); $"Displaying question {optionQuestion}".AddLog(); _procHost.DeactivateProcess(UserInput); }
protected void DeactivateStage(Action stage) => ProcHost.DeactivateProcess(stage);