public EntityGridUserControl(BaseActionView actionView, IMessageProvider messageProvider) { InitializeComponent(); _actionView = actionView; _messageProvider = messageProvider; RegisterEventHandlers(); }
public IEntityGridControl Create(BaseActionView actionView) { var messageProvider = new MessageProvider(); var entityGridUserControl = new EntityGridUserControl(actionView, messageProvider); entityGridUserControl.Dock = DockStyle.Fill; entityGridUserControl.LoadData(); return entityGridUserControl; }
private XtraTabPage CreatePage(BaseActionView actionView) { var page = new XtraTabPage(); IEntityGridControl entityGridControl = _entityGridControlFactory.Create(actionView); page.Controls.Add(entityGridControl.Control); page.Tag = actionView.View; page.Text = actionView.Caption; return page; }
public void OpenPage(BaseActionView actionView) { XtraTabPage page; if (!TryFindPage(actionView.View, out page)) { page = CreatePage(actionView); _tabControl.TabPages.Add(page); } _tabControl.SelectedTabPage = page; FocusCurrentPage(); }