public OrderItem(CarSharingService service, Order order, FlowLayoutPanel list) { InitializeComponent(); CarSharingService = service; Order = order; orderList = list; setFields(); }
public OrderWizard(CarSharingService service, Car car, IAuthorizedUser user, updateUI updateWidth, updateUI updateList) { InitializeComponent(); CarSharingService = service; itemToOrder = car; authorizedUser = user; UpdateWidth = updateWidth; UpdateList = updateList; }
public UserUI(CarSharingService carSharing, IAuthorizedUser user) { InitializeComponent(); carSharingService = carSharing; reloadList(); User = user; MaxListWidth(); setOrderUI(user); }
public void generateAdminForm(CarSharingService carSharingService, IAuthorizedUser user) { AdminUI ui = new AdminUI(carSharingService, user); ui.Location = new System.Drawing.Point(0, 64); ui.Name = "adminUI1"; ui.Size = new System.Drawing.Size(1100, 662); ui.TabIndex = 1; Controls.Add(ui); }
public Form1(IAuthorizedUser user, CarSharingService carSharingService) { carService = carSharingService; if (user.IsAdmin()) { generateAdminForm(carSharingService, user); } else { generateUserForm(carSharingService, user); } InitializeComponent(); }
public AdminUI(CarSharingService carSharing, IAuthorizedUser user) { InitializeComponent(); carSharingService = carSharing; List <ListItem> list = new List <ListItem>(); carSharingService.Cars.ToList().ForEach(item => list.Add(new ListItem(this, item.Value))); ItemList.Controls.AddRange(list.ToArray()); User = user; List <OrderItem> orderItems = new List <OrderItem>(); CarSharingService.Orders.ToList().ForEach(item => orderItems.Add(new OrderItem(carSharingService, item.Value, orderList))); orderList.Controls.AddRange(orderItems.ToArray()); }