internal ControlWindow(ControlSystem.ControlSystem control, Employee employee) { InitializeComponent(); this.employee = employee; var _menuClient = new List <SubItem>(); _menuClient.Add(new SubItem("Client List", new UserControlClientList())); _menuClient.Add(new SubItem("Add new Client", new UserControlAddClient(control))); _menuClient.Add(new SubItem("Debtors", new UserControlDebtors())); var _itemClient = new ItemMenu("Clients", _menuClient, PackIconKind.Person); var _menuFinances = new List <SubItem> { new SubItem("Current balance", new UserControlCurrentBalance(employee)), new SubItem("Exchange", new UserControlExchanges()), }; var _itemFinances = new ItemMenu("Finances", _menuFinances, PackIconKind.ScaleBalance); Menu.Children.Add(new UserControlMenuItem(_itemClient, this)); Menu.Children.Add(new UserControlMenuItem(_itemFinances, this)); if (employee is Admin) { var _menuEmployee = new List <SubItem> { new SubItem("Add Employee", new UserContolAddEmployee()), new SubItem("Change Employee", new UserControlEmployeeList()) }; var _itemEmployee = new ItemMenu("Employee", _menuEmployee, PackIconKind.Person); Menu.Children.Add(new UserControlMenuItem(_itemEmployee, this)); } }
public UserControlAddClient(ControlSystem.ControlSystem control) { InitializeComponent(); _control = control; }