public Banker(Matrix max, Matrix need, Matrix allocation, Resource available, Resource resCount, MatrixWithFinish workAllocation) { this.max = max; this.need = need; this.allocation = allocation; this.available = available; this.resCount = resCount; this.workAllocation = workAllocation; }
private void init() { DataTableManager maxManager = new DataTableManager(dg_max); DataTableManager needManager = new DataTableManager(dg_need); DataTableManager allocationManager = new DataTableManager(dg_allocation); DataTableManager workAllocationManager = new DataTableManager(dg_workPlusAllocation); Matrix max = new Matrix(0, 0); Matrix need = new Matrix(0, 0); Matrix allocation = new Matrix(0, 0); MatrixWithFinish workAllocation = new MatrixWithFinish(); max.dataChanged += maxManager.updateUI; need.dataChanged += needManager.updateUI; allocation.dataChanged += allocationManager.updateUI; workAllocation.dataChanged += workAllocationManager.updateUI; maxManager.updateUI(max, null); needManager.updateUI(need, null); allocationManager.updateUI(allocation, null); Resource available = new Resource(0); Resource resCount = new Resource(0); newProgMax = new Resource(0); request = new Resource(0); avaManager = new ResourceManager(dg_available); resCountManager = new ResourceManager(dg_resCount); newProgMaxManager = new ResourceManager(dg_newProgMax); requestManager = new ResourceManager(dg_request); available.dataChanged += avaManager.updateUI; resCount.dataChanged += resCountManager.updateUI; newProgMax.dataChanged += newProgMaxManager.updateUI; request.dataChanged += requestManager.updateUI; Logout log = new Logout(tb_log); Logout.LogoutEvent += log.logoutToTextBox; banker = new Banker(max, need, allocation, available, resCount, workAllocation); }