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

            if (ev != null)
            {
                ev(this, e);
            }
        }
Пример #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);
        }
Пример #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;
         }
     }
 }
Пример #4
0
 protected virtual void OnContentOpened(ContentPresenterEventArgs e)
 {
     var ev = ContentOpened;
     if (ev != null)
         ev(this, e);
 }
Пример #5
0
 private void ControllerContentOpenedHandler(object sender, ContentPresenterEventArgs e)
 {
     if (!_openContent.ContainsKey(e.Content.Uid)) {
         _openContent[e.Content.Uid] = e.Content;
         OnContentOpened(new ContentPresenterEventArgs(e.Content));
     }
 }
Пример #6
0
 private void ControllerContentClosedHandler(object sender, ContentPresenterEventArgs e)
 {
     if (_openContent.Remove(e.Content.Uid))
         OnContentClosed(new ContentPresenterEventArgs(e.Content));
 }