예제 #1
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 public void OpenPage(BaseActionView actionView)
 {
     XtraTabPage page;
     if (!TryFindPage(actionView.View, out page))
     {
         page = CreatePage(actionView);
         _tabControl.TabPages.Add(page);
     }
     _tabControl.SelectedTabPage = page;
     FocusCurrentPage();
 }