protected virtual void OnContentClosed(ContentPresenterEventArgs e)
        {
            var ev = ContentClosed;

            if (ev != null)
            {
                ev(this, e);
            }
        }
Esempio n. 2
0
        private void ContentWorkspaceContentOpened(object sender, ContentPresenterEventArgs e)
        {
            TabPage page = new TabPage(e.Content.Name) {
                Tag = e.Content.Uid
            };
            tabControlEx1.TabPages.Add(page);

            LevelPanel lpanel = new LevelPanel();
            lpanel.BindController(e.Content as LevelPresenter);
            lpanel.Dock = DockStyle.Fill;

            page.Controls.Add(lpanel);
        }
Esempio n. 3
0
 private void ContentWorkspaceContentClosed(object sender, ContentPresenterEventArgs e)
 {
     foreach (TabPage page in tabControlEx1.TabPages) {
         if ((Guid)page.Tag == e.Content.Uid) {
             tabControlEx1.TabPages.Remove(page);
             break;
         }
     }
 }
 protected virtual void OnContentOpened(ContentPresenterEventArgs e)
 {
     var ev = ContentOpened;
     if (ev != null)
         ev(this, e);
 }
 private void ControllerContentOpenedHandler(object sender, ContentPresenterEventArgs e)
 {
     if (!_openContent.ContainsKey(e.Content.Uid)) {
         _openContent[e.Content.Uid] = e.Content;
         OnContentOpened(new ContentPresenterEventArgs(e.Content));
     }
 }
 private void ControllerContentClosedHandler(object sender, ContentPresenterEventArgs e)
 {
     if (_openContent.Remove(e.Content.Uid))
         OnContentClosed(new ContentPresenterEventArgs(e.Content));
 }