/// <summary> /// Displays the dialog. /// </summary> /// <returns>The option selected after the dialog has been presented.</returns> public DialogResult Show() { ConsoleEx.Clear(ConsoleColor.Gray, ConsoleColor.Black); ConsoleEx.WriteAt(1, 12, " ESCAPE ATTEMPT ? "); return(pressAnyKeyWithYesControl.Show()); }
public DialogResult Show() { ConsoleEx.Clear(ConsoleColor.Gray, ConsoleColor.Black); ConsoleEx.WriteAt(1, 10, " The REVOLT has been CRUSHED "); ConsoleEx.WriteAt(1, 12, " PUNISH the REVOLUTIONARIES ? "); return(pressAnyKeyWithYesControl.Show()); }
/// <summary> /// Displays the dialog. /// </summary> /// <returns>The option selected after the dialog has been presented.</returns> public DialogResult Show() { ConsoleEx.Clear(ConsoleColor.Green); for (int row = 2; row < 21; row++) { ConsoleEx.WriteAt(11, row, "?", ConsoleColor.Black, ConsoleColor.White); ConsoleEx.WriteAt(12, row, " ADVICE ", ConsoleColor.Gray, ConsoleColor.Black); ConsoleEx.WriteAt(20, row, "?", ConsoleColor.Black, ConsoleColor.White); } return(pressAnyKeyWithYesControl.Show()); }
public DialogResult Show(PoliceReportRequest policeReportRequest) { ConsoleEx.Clear(ConsoleColor.Black, ConsoleColor.White); ConsoleEx.WriteEmptyLineAt(1, ConsoleColor.Yellow); ConsoleEx.WriteEmptyLineAt(2, ConsoleColor.Yellow); ConsoleEx.WriteAt(1, 7, " SECRET POLICE REPORT ? "); DialogResult dialogResult; if (policeReportRequest.HasEnoughBalance && policeReportRequest.IsPlayerPopularWithSecretPolice && policeReportRequest.HasPoliceEnoughStrength) { ConsoleEx.WriteAt(1, 13, " ( costs $1000 ) "); dialogResult = pressAnyKeyWithYesControl.Show(); } else { ConsoleEx.WriteAt(1, 10, " NOT AVAILABLE "); int screenRow = 12; if (!policeReportRequest.IsPlayerPopularWithSecretPolice) { ConsoleEx.WriteAt(1, screenRow++, $" Your POPULARITY with us is {policeReportRequest.PolicePopularity} "); } if (!policeReportRequest.HasPoliceEnoughStrength) { ConsoleEx.WriteAt(1, screenRow++, $" POLICE strength is {policeReportRequest.PoliceStrength} "); } if (!policeReportRequest.HasEnoughBalance) { ConsoleEx.WriteAt(1, screenRow++, " You can't AFFORD a REPORT "); } dialogResult = DialogResult.No; pressAnyKeyControl.Show(); } return(dialogResult); }
/// <summary> /// Displays the dialog. /// </summary> /// <param name="audience">The audience information to display on the screen.</param> /// <returns>The option selected after the dialog has been presented.</returns> public DialogResult Show(Core.Audience audience) { ConsoleEx.Clear(ConsoleColor.DarkYellow); ConsoleEx.WriteAt(11, 2, " DECISION ", ConsoleColor.Black, ConsoleColor.White); ConsoleEx.WriteAt(5, 4, $"The {audience.Requester} ask you to", ConsoleColor.Magenta, ConsoleColor.Gray); ConsoleEx.WriteAt(1, 6, $"{audience.Text}", ConsoleColor.Yellow, ConsoleColor.Black); ConsoleEx.WriteEmptyLineAt(8, ConsoleColor.Blue); Console.BackgroundColor = ConsoleColor.DarkYellow; if (audience.NoMoneyInvolved) { ConsoleEx.WriteAt(1, 11, " NO MONEY INVOLVED ", ConsoleColor.Black); } else { ConsoleEx.WriteAt(2, 10, "This decision would", ConsoleColor.Black); if (audience.Cost != 0) { string addOrTake = (audience.Cost > 0) ? "ADD to" : "TAKE from"; ConsoleEx.WriteAt(2, 12, $"{addOrTake} the TREASURY ${Math.Abs(audience.Cost)},000", ConsoleColor.Black); } if (audience.Cost != 0 && audience.MonthlyCost != 0) { ConsoleEx.WriteAt(2, 14, "and", ConsoleColor.Black); } if (audience.MonthlyCost != 0) { string raiseOrLower = (audience.MonthlyCost < 0) ? "RAISE" : "LOWER"; ConsoleEx.WriteAt(2, 16, $"{raiseOrLower} MONTHLY COSTS by ${Math.Abs(audience.MonthlyCost)},000", ConsoleColor.Black); } } return(pressAnyKeyWithYesControl.Show()); }
/// <summary> /// Displays the dialog. /// </summary> /// <param name="decision">The decision to be displayed to the player for acceptance or refusal.</param> /// <returns>The option selected after the dialog has been presented.</returns> public DialogResult Show(Decision decision) { ConsoleEx.Clear(ConsoleColor.DarkYellow); ConsoleEx.WriteAt(1, 5, $"{decision.Text}", ConsoleColor.Yellow, ConsoleColor.Black); Console.BackgroundColor = ConsoleColor.DarkYellow; if (decision.Cost == 0 && decision.MonthlyCost == 0) { ConsoleEx.WriteAt(1, 11, " NO MONEY INVOLVED ", ConsoleColor.Black); } else { ConsoleEx.WriteAt(2, 10, "This decision would", ConsoleColor.Black); if (decision.Cost != 0) { string addOrTake = (decision.Cost > 0) ? "ADD to" : "TAKE from"; ConsoleEx.WriteAt(2, 12, $"{addOrTake} the TREASURY ${Math.Abs(decision.Cost)},000", ConsoleColor.Black); } if (decision.Cost != 0 && decision.MonthlyCost != 0) { ConsoleEx.WriteAt(2, 14, "and", ConsoleColor.Black); } if (decision.MonthlyCost != 0) { string raiseOrLower = (decision.MonthlyCost < 0) ? "RAISE" : "LOWER"; ConsoleEx.WriteAt(2, 16, $"{raiseOrLower} MONTHLY COSTS by ${Math.Abs(decision.MonthlyCost)},000", ConsoleColor.Black); } } return(pressAnyKeyWithYesControl.Show()); }