private void Form1_Load(object sender, EventArgs e) { this.Text = "Kanban Production Board"; dataGridView1.ColumnCount = 3; dataGridView1.Columns[0].Name = "Backlog"; dataGridView1.Columns[1].Name = "Passed"; dataGridView1.Columns[2].Name = "Failed"; dataGridView1.Columns[1].DefaultCellStyle.BackColor = Color.Green; dataGridView1.Columns[2].DefaultCellStyle.BackColor = Color.Red; run = true; processedAmount = 0; producedAmount = 0; yieldAmount = 0; kdb = new KanbanDbModel(); op = new OrderPicker(kdb); op.StartNewOrder(100); int i = 1; while (i <= numberOfWorkStations) { dataGridView1.Rows.Add(i); i++; } Begin(); }
public WorkstationReader(KanbanDbModel kdb) { this.kdb = kdb; // Query to find an available workstation queryWorkstations = from station in this.kdb.Workstations where station.IsCurrentlyWorking == true select station; }
/* DESCRIPTION : * PARAMETERS : * ALTERS : * RETURNS : */ public OrderPicker(KanbanDbModel kdb) { this.kdb = kdb; // Get defect rates for this run this.rookieDefectRate = Convert.ToDouble(this.kdb.ConfigTables.Find("RookieDefectRate").SystemValue); this.experiencedDefectRate = Convert.ToDouble(this.kdb.ConfigTables.Find("ExperiencedDefectRate").SystemValue); this.seniorDefectRate = Convert.ToDouble(this.kdb.ConfigTables.Find("SeniorDefectRate").SystemValue); this.random = new Random(); this.failedTesting = new List <FogLamp>(); this.passedTesting = new List <FogLamp>(); }
private void Form1_Load(object sender, EventArgs e) { this.kdb = new KanbanDbModel(); // provides modelled connection to db defined in App.config workstationReader = new WorkstationReader(kdb); //DEFINE GRID dataGridView1.ColumnCount = 7; dataGridView1.Columns[0].Name = "Bin Number"; dataGridView1.Columns[1].Name = "Harness"; dataGridView1.Columns[2].Name = "Reflector"; dataGridView1.Columns[3].Name = "Housing"; dataGridView1.Columns[4].Name = "Lens"; dataGridView1.Columns[5].Name = "Bulb"; dataGridView1.Columns[6].Name = "Bezel"; thread = new Thread(RunSim); thread.Start(); }
/* -------------------------------------------------------------------------------- */ /* ----------------------------- CONSTRUCTORS & SET-UP ---------------------------- */ /* -------------------------------------------------------------------------------- */ // !!! CONSTRUCTOR !!! public Worker(KanbanDbModel kdb, ExperienceLevel_t experienceLevel, int minutesPerSecond) { this.experienceLevel = experienceLevel; this.minutesPerSecond = minutesPerSecond; this.fogLampsToMake = 0; this.fogLampsMade = 0; this.kdb = kdb; this.rand = new Random(); // Set up the workstation // If it cannot be setup, set our boolean to false so that external program knows // that no Worker is present if (this.setupWorkstation()) { this.isAtWorkstation = true; } else { this.isAtWorkstation = false; } }
private void Form1_Load(object sender, EventArgs e) { this.kdb = new KanbanDbModel(); // provides modelled connection to db defined in App.config }