Exemple #1
0
        private FrwDocContent CreateDocContentByIContent(IContent c)
        {
            FrwDocContent cc = new FrwDocContent(c);

            c.ContentContainer = this;
            cc.FormClosed     += Content_FormClosed;
            OnDocContentCreated(cc.ContentControl);
            return(cc);
        }
        public void SetNewCaption(string caption)
        {
            Text = caption;
            FrwDocContent c = FindDocContentContainer(this);

            if (c != null)
            {
                c.Text = caption;
            }
        }
Exemple #3
0
        private FrwDocContent FindJustDocContentByIContent(IContent c)
        {
            FrwDocContent cc = null;

            foreach (var v in dockPanel.Contents)
            {
                if (v is FrwDocContent && (v as FrwDocContent).ContentControl == c)
                {
                    cc = (v as FrwDocContent);
                }
            }
            return(cc);
        }
Exemple #4
0
 protected void AppManager_OnDocContentShowEvent(object sender, DocContentShowEventArgs e)
 {
     if (e.Content.ContentContainer == null)
     {
         throw new Exception("");
     }
     if (e.Content.ContentContainer == this)
     {
         FrwDocContent cc = FindJustDocContentByIContent(e.Content);
         if (cc != null)
         {
             cc.Show(dockPanel);//, DockState.Document);
         }
     }
 }