2 using System.Collections.Generic;
5 using System.Threading.Tasks;
8 namespace GUI.Datatypes
41 this.ThreeState =
true;
43 products =
new List<ProductCB>();
45 timeslots =
new bool[]{
true};
46 Bauteilwechselphase = 0;
59 if(!products.Contains(prod))
94 prod.CheckState = CheckState.Checked;
109 prod.CheckState = CheckState.Unchecked;
127 if (p.CheckState.Equals(CheckState.Checked)) sum += 2;
128 if (p.CheckState.Equals(CheckState.Indeterminate)) sum += 1;
129 if (p.CheckState.Equals(CheckState.Unchecked)) sum += 0;
132 double d = (double)sum / (
double)products.Count;
160 timeslots[t] = !timeslots[t];
187 timeslots =
new bool[num];
188 for (
int i = 0; i<timeslots.Length; i++)
207 if (p.CheckState != CheckState.Unchecked)
209 if (!l.Contains(p.Name))
bool stateOfTimeslot(int t)
Get the availability of this machine at timeslot t.
MachineCB(String name, LocationCB loc)
The Constructor.
void addProduct(ProductCB prod)
Add a product to this machine.
void addMachine(MachineCB m)
Add a machine to this location.
bool[] timeslots
An array that stores for each timeslot if the machine is available on this time.
void setNumberOfTimeslots(int num)
Sets the number of timeslots to a certain amount.
void checkAllProducts()
Check all the product Checkboxes that belong to this machine.
void uncheckAllProducts()
Uncheck all the product Checkboxes that belong to this machine.
LocationCB getLocation()
Grants access to the location where the machine is located.
LocationCB location
Location this machine belongs to.
List< ProductCB > getProducts()
Grants access to the list of products that belong to the machine.
A wrapper class for products.
A wrapper class for locations.
List< String > extendProductList(List< String > l)
Extends the List of products that can be produced.
List< ProductCB > products
List of products this machine can produce.
double Bauteilwechselphase
A number that describes the time needed to change toolkits on this machine (in minutes).
void changeStateOfTimeslot(int t)
Change the availability of this machine at timeslot t.
double allChildrenChecked()
Check if every procuct belonging to the machine is checked.
void changeStateOfTimeslot(int t, bool b)
Change the availability of this machine at timeslot t to a ceratin value.
A wrapper class for machines.