Example #1
0
 public void ButtonActionHandler(object sender, EventArgs e)
 {
     Control sendingControl = (Control)sender;
     switch ((MainActions)sendingControl.Tag)
     {
         case MainActions.RunSimulation:
             Simulator s = new Simulator();
             s.Run();
             break;
         case MainActions.GetCustomerTypes:
             string[] ctypes = Customer.Instance.GetCustomerTypes();
             ModelChangedEventArgs cm = new ModelChangedEventArgs();
             cm.ActionReference = MainActions.GetCustomerTypes;
             cm.Params.Add("Customer Types", ctypes);
             RaiseModelChange(this, cm);
             return;
         case MainActions.GetStaffTypes:
             SQLiteResult result = SQLiteController.Instance.Query("SELECT Type FROM staff");
             List<string> types = new List<string>();
             for (int i = 0; i < result.Rows.Count; i++)
             {
                 types.Add(result.Rows[i]["Type"].ToString());
             }
             string[] stypes = types.ToArray();
             ModelChangedEventArgs sm = new ModelChangedEventArgs();
             sm.ActionReference = MainActions.GetStaffTypes;
             sm.Params.Add("Staff Types", stypes);
             RaiseModelChange(this, sm);
             return;
         case MainActions.NewSimulation:
             break;
         case MainActions.LoadSimulation:
             break;
         case MainActions.ViewResults:
             break;
         case MainActions.Logout:
             break;
         case MainActions.Quit:
             break;
         default:
             break;
     }
 }
Example #2
0
 private void cmdlRunSim_Click(object sender, EventArgs e)
 {
     Simulator s = new Simulator();
     s.Run();
 }
Example #3
0
 public void RunTest()
 {
     Simulator target = new Simulator(); // TODO: Initialize to an appropriate value
     target.Run();
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }