Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            //Button Two is for testing
            CalendarClass newCalendar = new CalendarClass();

            EntityClass newEntity    = new EntityClass(0, ECallType.stereo);
            EventClass  newCallEvent = new EventClass(newEntity, EEventType.CallArrive, 0);

            newCalendar.addEvent(newCallEvent);

            /*EntityClass newEntity1 = new EntityClass(1, ECallType.other);
             * EventClass newCallEvent1 = new EventClass(newEntity1, EEventType.CompleteServiceCall, 100);
             * newCalendar.addEvent(newCallEvent1);
             *
             * EntityClass newEntity2 = new EntityClass(2, ECallType.other);
             * EventClass newCallEvent2 = new EventClass(newEntity2, EEventType.CompleteIVR, 50);
             * newCalendar.addEvent(newCallEvent2);
             *
             * newCalendar.displayCalendar(listBox1);*/

            //VARS

            /*activeEvent = mainCalendar.getTopEvent();
             * activeEntity = activeEvent.currentEntity;
             * int currentTime = 0;
             *
             * //While Loop to see what the simulation will load (call Types)
             * while (activeEvent.currentEventType != EEventType.EndSim)
             * {
             *  //Update the System Time
             *  currentTime = activeEvent.schedualedTime;
             *  //If conditions (UPDATE TO CASE STATEMENTS)
             *  if (activeEvent.currentEventType == EEventType.CallArrive)
             *  {
             *      //Process the call
             *      simClass.ProcessCallArrive();
             *      //Console.WriteLine("ONE");
             *  }
             *  if (activeEvent.currentEventType == EEventType.CompleteIVR)
             *  {
             *      //Process the Switch
             *      simClass.CompleteIVR();
             *      Console.WriteLine("TWO");
             *  }
             *  if (activeEvent.currentEventType == EEventType.CompleteServiceCall)
             *  {
             *      //Process the Completed call
             *      simClass.CompleteServiceCall();
             *      Console.WriteLine("THREE");
             *  }
             *  if (activeEvent.currentEventType == EEventType.EndSim)
             *  {
             *      //End the Simulation
             *      simClass.EndSim();
             *      Console.WriteLine("FOUR");
             *  }
             * }*/
            newCalendar.displayCalendar(listBox1);
        }
Esempio n. 2
0
 public SimulatorClass(ListBox listbox, Form1 formyForm, Label label, NumericUpDown MAX_ON_HOLD_UP_DOWN, Label lable2, ListBox listBox2)
 {
     mainCalendar = new CalendarClass();
     //mainEvent = new EventClass(); //Something might be wrong here
     mainQueue  = new QueueClass();
     diceRoller = new DiceRoller();
     salesTeam  = new SalesTeamClass();
     box        = listbox;
     box2       = listBox2;
     mainForm   = formyForm;
     onlyLable  = label;
     queueCount = lable2;
     //salesRep = new SalesRepClass();
     hangupCount            = 0;
     GLOBALENTITYID         = 2;
     currentTime            = 0;
     GlobalVars.MAX_ON_HOLD = (int)MAX_ON_HOLD_UP_DOWN.Value;
     totalQueueLength       = (int)mainQueue.totalLengthOfQueue();
 }