示例#1
0
 public static void ShowEdit()
 {
     WriteToConsole.Write("\n-------------------------------------------------------------");
     WriteToConsole.Write("|                     EDIT CALCULATION                      |");
     WriteToConsole.Write("-------------------------------------------------------------\n");
     WriteToConsole.Write("What Operation Do You Want To Change This Calculation To?");
 }
        public void Previous(ICalculatorComponent calculator)
        {
            Index += PreviousI;
            bool end  = EndOfCollection();
            int  temp = Index;

            while (temp >= 0)
            {
                while (!end)
                {
                    ShowSingle(Index, calculator);
                    end = true;
                }

                temp = -1;
            }

            temp = Index;
            while (temp < 0)
            {
                Index = 0;
                temp  = Index;
                WriteToConsole.Write("\nYou are at the beginning of the calculation history.");
                First(calculator);
            }
        }
示例#3
0
 public static void Options()
 {
     WriteToConsole.Write("\n----------------------------------------------------------------------------------------------------------");
     WriteToConsole.Write("|                            OPTIONS: Choose an option by entering its number                            |");
     WriteToConsole.Write("----------------------------------------------------------------------------------------------------------");
     WriteToConsole.Write("| 1 | View Calculation History (Entire List)");
     WriteToConsole.Write("| 2 | View/Modify Calculation History [NEXT, PREVIOUS, FIRST, LAST, CHANGE, REMOVE]");
     WriteToConsole.Write("| 3 | Create New Calculations");
     WriteToConsole.Write("| 4 | Display What The Calculator Is Capable Of Doing (In Its Current State)");
     WriteToConsole.Write("| 5 | Check State Of All Calculations");
     WriteToConsole.Write("| 6 | Exit Program");
     WriteToConsole.Write("----------------------------------------------------------------------------------------------------------\n");
 }
        public static void DisplayOperations(ICalculatorComponent calculator, String options)
        {
            foreach (Invoker command in calculator.Commands)
            {
                string op = command.OperationString;

                while (op != "Final Command")
                {
                    options += command.OperationString;
                    options += ",";
                    op       = "Final Command";
                }
            }

            options = options.Replace(",", " | ");
            WriteToConsole.Write($"| {options}\n");
        }
        public void Next(ICalculatorComponent calculator)
        {
            Index += NextI;
            bool end = EndOfCollection();

            while (!end)
            {
                ShowSingle(Index, calculator);
                end = true;
            }

            end = EndOfCollection();
            while (end)
            {
                Index = CalculationHistory.Count - 1;
                WriteToConsole.Write("\nYou are at the end of the calculation history.");
                Last(calculator);
                end = false;
            }
        }
示例#6
0
 public static void Outro()
 {
     WriteToConsole.Write("\n------------");
     WriteToConsole.Write("| Goodbye! |");
     WriteToConsole.Write("------------");
 }
示例#7
0
 public static void Addition()
 {
     WriteToConsole.Write("\n\n- - - - - - - - - - -");
     WriteToConsole.Write("YOU CHOSE: Addition");
     WriteToConsole.Write("- - - - - - - - - - -\n");
 }
示例#8
0
 public static void Zero()
 {
     WriteToConsole.Write("\nThis number cannot be 0.");
     WriteToConsole.Write("Please enter another number:");
 }
示例#9
0
 public static void Functionality()
 {
     WriteToConsole.Write("What operation functionality would you like to give the calculator? (Enter one at a time.)");
     WriteToConsole.Write("Options: addition, subtraction, multiplication, division, square root, square\n");
 }
示例#10
0
 public static void Intro()
 {
     WriteToConsole.Write("------------------------");
     WriteToConsole.Write("| Calculator Activated |");
     WriteToConsole.Write("------------------------\n");
 }
示例#11
0
 public static void _FirstNumber()
 {
     WriteToConsole.Write("\nEnter first number:");
 }
示例#12
0
 public static void StateTitle()
 {
     WriteToConsole.Write("\n--------------------------------------");
     WriteToConsole.Write("| CURRENT STATE OF ALL CALCULATIONS |");
     WriteToConsole.Write("--------------------------------------");
 }
示例#13
0
 public static void Division()
 {
     WriteToConsole.Write("\n\n- - - - - - - - - - -");
     WriteToConsole.Write("YOU CHOSE: Division");
     WriteToConsole.Write("- - - - - - - - - - -\n");
 }
示例#14
0
 public static void IteratorOptions()
 {
     WriteToConsole.Write("\n------------------------------------------------------------------------------------------------------");
     WriteToConsole.Write("| Choose An Option: NEXT, PREVIOUS, FIRST, LAST, CHANGE, REMOVE  | Or Type EXIT To Return To Options |");
     WriteToConsole.Write("------------------------------------------------------------------------------------------------------\n");
 }
示例#15
0
 public static void _Functionality()
 {
     WriteToConsole.Write("\nEnter another operation functionality or type 'DONE' to continue.\n");
 }
示例#16
0
 public static void IteratorTitle()
 {
     WriteToConsole.Write("\n------------------------------------------------------------------------------------------------------");
     WriteToConsole.Write("|                                   SHOWING CALCULATIONS ONE BY ONE                                  |");
     WriteToConsole.Write("------------------------------------------------------------------------------------------------------");
 }
示例#17
0
 public static void Removed()
 {
     WriteToConsole.Write("\n-----------------------------------------------------------");
     WriteToConsole.Write("|  CALCULATION REMOVED | Press ENTER To Return To Options |");
     WriteToConsole.Write("-----------------------------------------------------------");
 }
示例#18
0
 public static void Changed()
 {
     WriteToConsole.Write("------------------------------------------------------------------------");
     WriteToConsole.Write("|  CALCULATION SUCCESSFULLY CHANGED | Press ENTER To Return To Options |");
     WriteToConsole.Write("------------------------------------------------------------------------");
 }
示例#19
0
 public static void Subtraction()
 {
     WriteToConsole.Write("\n\n- - - - - - - - - - - -");
     WriteToConsole.Write("YOU CHOSE: Subtraction");
     WriteToConsole.Write("- - - - - - - - - - - -\n");
 }
示例#20
0
 public static void Capability()
 {
     WriteToConsole.Write("\n------------------------------------------");
     WriteToConsole.Write("| THE CALCULATOR IS CURRENTLY CAPABLE OF |");
     WriteToConsole.Write("------------------------------------------\n");
 }
示例#21
0
 public static void Multiplication()
 {
     WriteToConsole.Write("\n\n- - - - - - - - - - - - - -");
     WriteToConsole.Write("YOU CHOSE: Multiplication");
     WriteToConsole.Write("- - - - - - - - - - - - - -\n");
 }
示例#22
0
 public static void Back()
 {
     WriteToConsole.Write("--------------------------------------");
     WriteToConsole.Write("|  Press ENTER To Return To Options  |");
     WriteToConsole.Write("--------------------------------------");
 }
示例#23
0
 public static void Square()
 {
     WriteToConsole.Write("\n\n- - - - - - - - - -");
     WriteToConsole.Write("YOU CHOSE: Square");
     WriteToConsole.Write("- - - - - - - - - -\n");
 }
示例#24
0
 public static void Another()
 {
     WriteToConsole.Write("\n------------------------------------");
     WriteToConsole.Write("| Do another calculation? (YES/NO) |");
     WriteToConsole.Write("------------------------------------");
 }
示例#25
0
 public static void _Number()
 {
     WriteToConsole.Write("\nEnter number:");
 }
示例#26
0
 public static void Enter()
 {
     WriteToConsole.Write("\nThat is not available. Press ENTER To Return.");
 }
示例#27
0
 public static void _SecondNumber()
 {
     WriteToConsole.Write("\nEnter second number:");
 }
示例#28
0
 public static void NotAvailable()
 {
     WriteToConsole.Write("\nThat is not available. Please choose another.\n");
 }
示例#29
0
 public static void Unavailable()
 {
     WriteToConsole.Write("\nThat is not available. Press ENTER To Return To Options.\n");
 }
示例#30
0
 public static void ShowHistory()
 {
     WriteToConsole.Write("\n--------------------------------------");
     WriteToConsole.Write("| SHOWING ENTIRE CALCULATION HISTORY |");
     WriteToConsole.Write("--------------------------------------");
 }