/// <summary> /// Initializes a new instance of the <see cref="ReserveRailForm"/> class. /// </summary> /// <param name="tramDepotManagementSystem">Contains an instance of the TramDepotManagementSystem class</param> /// <param name="rail">Contains an instance of the Rail class</param> public ReserveRailForm(TramDepotManagementSystem tramDepotManagementSystem, Rail rail) { this.InitializeComponent(); this.tramDepotManagementSystem = tramDepotManagementSystem; this.rail = rail; this.rtbxRail.Text = rail.Number.ToString(); }
/// <summary> /// Initializes a new instance of the <see cref="AddCleaningForm" /> class. /// </summary> /// <param name="tramDepotManagementSystem">This is the current tram depot management system</param> /// <param name="tram">This is the given tram</param> /// <param name="serviceSystem">This is the current service system</param> public AddCleaningForm(TramDepotManagementSystem tramDepotManagementSystem, Tram tram, ServiceSystem serviceSystem) : this(serviceSystem) { rtbxTramID.Text = tram.Number.ToString(); this.InitializeComponent(); this.tramDepotManagementSystem = tramDepotManagementSystem; this.tram = tram; this.serviceSystem = serviceSystem; }
/// <summary> /// Initializes a new instance of the <see cref="BlockRailForm"/> class. /// </summary> /// <param name="tramDepotManagementSystem">Contains an instance from the TramDepotManagementSystem class.</param> /// <param name="rail">Contains an instance from the Rail class.</param> public BlockRailForm(TramDepotManagementSystem tramDepotManagementSystem, Rail rail) { this.InitializeComponent(); this.tramDepotManagementSystem = tramDepotManagementSystem; this.rail = rail; this.rtbxRail.Text = rail.Number.ToString(); // If all sectors are blocked if (this.rail.Sectors.Count(s => s.IsBlocked) == this.rail.Sectors.Count) { this.BackColor = Color.Red; } }
/// <summary> /// Initializes a new instance of the <see cref="BlockSectorForm"/> class. /// </summary> /// <param name="tramDepotManagementSystem">Contains an instance of the TramDepotManagementSystem class</param> /// <param name="sector">Contains an instance of the Sector class</param> public BlockSectorForm(TramDepotManagementSystem tramDepotManagementSystem, Sector sector) { this.InitializeComponent(); this.tramDepotManagementSystem = tramDepotManagementSystem; this.sector = sector; this.rtbxRailNumber.Text = sector.Rail.Number.ToString(); this.rtbxSectorNumber.Text = sector.Number.ToString(); if (this.sector.IsBlocked) { this.BackColor = Color.Red; } }
/// <summary> /// Initializes a new instance of the <see cref="TramDepotManagementSystemForm"/> class. /// </summary> public TramDepotManagementSystemForm() { this.InitializeComponent(); this.tramDepotManagementSystem = new TramDepotManagementSystem(); this.UpdateTramDataGridView(); this.UpdateReservationsListbox(); this.serviceSystem = new ServiceSystem(); this.DrawAllRails(); this.cbxTramTypes.DataSource = this.tramDepotManagementSystem.TramTypes; this.timerRefreshGUI.Start(); }
/// <summary> /// Initializes a new instance of the<see cref="AddCleaningForm" /> class. /// </summary> /// <param name="tramDepotManagementSystem">The current dram depot management system</param> public AddCleaningForm(TramDepotManagementSystem tramDepotManagementSystem) { this.InitializeComponent(); this.tramDepotManagementSystem = tramDepotManagementSystem; }