public static LittleState.ReturnObject IdleMenu(LittleState.LittleEvent eve)
        {
            Console.WriteLine("Menu Idle 1 für Calc 2 für Name");

            int c = Convert.ToInt32(Console.ReadLine());

            switch (c)
            {
            case 0:
            {
                Console.WriteLine("Nothing.");
                break;
            }

            case 1:
            {
                MainValues.eventQue.Add(new CalculatorEvent());
                break;
            }

            case 2:
            {
                MainValues.eventQue.Add(new NameEvent());
                break;
            }
            }
            return(new LittleState.ReturnObject());
        }
        public static LittleState.ReturnObject CalculateValues(LittleState.LittleEvent eve)
        {
            LittleState.ReturnObject retObj = new LittleState.ReturnObject();

            try
            {
                MainValues.c       = MainValues.a + MainValues.b;
                retObj.returnState = LittleState.FunctionResult.Success;
            }
            catch (Exception ex)
            {
                retObj.returnState = LittleState.FunctionResult.Fail;
                retObj.returnArguments.failException = ex;
            }

            return(retObj);
        }
 public override LittleState.ReturnObject Idle(LittleState.LittleEvent eve) => MenuFunctions.IdleMenu(eve);
 public override LittleState.ReturnObject Idle(LittleState.LittleEvent eve) => NameFunctions.IdleName(eve);
 public override LittleState.ReturnObject Idle(LittleState.LittleEvent eve) => CalculatorFuncitons.CalculateValues(eve);
 public override LittleState.ReturnObject Idle(LittleState.LittleEvent eve) => DisplayFunctions.IdleDisplay(eve);
 public static LittleState.ReturnObject IdleDisplay(LittleState.LittleEvent eve)
 {
     Console.WriteLine("Display Idle");
     Console.WriteLine(eve._payload);
     return(new LittleState.ReturnObject());
 }
 public static LittleState.ReturnObject IdleName(LittleState.LittleEvent eve)
 {
     Console.WriteLine("Name Idle");
     return(new LittleState.ReturnObject());
 }
Esempio n. 9
0
 public abstract ReturnObject Idle(LittleState.LittleEvent eve);