Exemple #1
0
 public void updateDisplay(string task)
 {
     Worker.Logger.log(3, "Code", string.Format("An updateDisplay call has appeared with task {0}", task));
     if (task == "clear")
     {
         directPad.Text   = "";
         indirectPad.Text = "";
         Worker.Logger.log(2, "Display", "Text pads were cleared");
         Worker.processor.isResult   = false;
         Worker.processor.lastResult = 0;
         Worker.Logger.log(2, "Vars", "Ans values were resetted");
     }
     else if (task == "del")
     {
         if (0 < directPad.Text.Length)
         {
             directPad.Text = directPad.Text.Remove(directPad.Text.Length - 1, 1);
             Worker.Logger.log(2, "Display", "Erasing last caracter from directPad");
         }
         else
         {
             Worker.Logger.log(2, "Display", "Attempted to erase from directPad but source string is empty, aboarting");
         }
     }
     tasks.CheckBlocksInitiate(directPad.Text, indirectPad.Text);
 }