/// <summary>
        /// Initializes a new instance of the <see cref="AddCleaningForm" /> class.
        /// </summary>
        /// <param name="serviceSystem">This is the current service system</param>
        /// <param name="cleaningService">This is the cleaning service that needs to be added</param>
        public AddCleaningForm(ServiceSystem serviceSystem, CleaningService cleaningService)
            : this(serviceSystem)
        {
            rtbxTramID.Text = cleaningService.Tram.Number.ToString();

            rtbxTramID.ReadOnly = true;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AddRepairForm" /> class.
        /// </summary>
        /// <param name="serviceSystem">The current service system</param>
        /// <param name="repairService">the repair service</param>
        public AddRepairForm(ServiceSystem serviceSystem, RepairService repairService)
            : this(serviceSystem)
        {
            this.rtbxTramID.Text = repairService.Tram.ID.ToString();

            this.rtbxTramID.ReadOnly = true;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="FinishCleaningForm" /> class.
        /// </summary>
        /// <param name="serviceSystem">The given service system</param>
        /// <param name="cleaningService">The given cleaning service</param>
        public FinishCleaningForm(ServiceSystem serviceSystem, CleaningService cleaningService)
        {
            this.InitializeComponent();

            this.serviceSystem = serviceSystem;
            this.rtbxCleaning.Text = cleaningService.StartingTime.Value.ToShortDateString() + ", " + cleaningService.IsLarge.ToString();
            this.CleaningService = cleaningService;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="FinishRepairForm" /> class.
        /// </summary>
        /// <param name="serviceSystem">The current service system</param>
        /// <param name="repairService">The given repair system</param>
        public FinishRepairForm(ServiceSystem serviceSystem, RepairService repairService)
        {
            this.InitializeComponent();

            this.serviceSystem = serviceSystem;
            this.rtbxRepair.Text = repairService.StartingTime + ", " + repairService.IsLarge.ToString();
            this.RepairService = repairService;
        }
 /// <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="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>
        /// Opens a AddRepairForm.
        /// </summary>
        /// <param name="sender">contains a reference to the clicked context menu item.</param>
        /// <param name="e">contains the data from the click event.</param>
        private void MenuItemPlanRepairService_Click(object sender, EventArgs e)
        {
            SectorTextBox stbx = (SectorTextBox)((MenuItem)sender).GetContextMenu().SourceControl;
            ServiceSystem serviceSystem = new ServiceSystem();

            if (stbx.Sector.Tram != null)
            {
                AddRepairForm addRepairForm = new AddRepairForm(this.tramDepotManagementSystem, stbx.Sector.Tram, serviceSystem);
                addRepairForm.ShowDialog();
            }
            else
            {
                this.ShowErrorMessage("There is no tram on this sector.");
            }
        }
        /// <summary>
        /// Initializes a new instance of the<see cref="AddCleaningForm" /> class.
        /// </summary>
        /// <param name="serviceSystem">The current service system</param>
        public AddCleaningForm(ServiceSystem serviceSystem)
        {
            this.InitializeComponent();

            this.serviceSystem = serviceSystem;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AddRepairForm" /> class.
        /// </summary>
        /// <param name="serviceSystem">The current service system</param>
        public AddRepairForm(ServiceSystem serviceSystem)
        {
            this.InitializeComponent();

            this.serviceSystem = serviceSystem;
        }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RepairForm" /> class.
 /// </summary>
 public RepairForm()
 {
     this.InitializeComponent();
     this.servicesystem = new ServiceSystem();
 }
Example #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningForm" /> class.
 /// </summary>
 public CleaningForm()
 {
     this.InitializeComponent();
     this.serviceSystem = new ServiceSystem();
 }