public DlgContentDetailsView(IAdditionalContent content)
 {
     this.InitializeComponent();
     this.Text = string.Format(Loc.Get("<LOC>{0} Details"), content.ContentType.SingularDisplayName);
     this.mContent = content;
     this.mDetailView = new PnlContentDetailsView(this);
     this.mDetailView.Location = new Point(4, 4);
     this.gpgPanelContainer.Controls.Add(this.DetailView);
     this.mDetailView.BindToMyContent(this.Content);
     ActiveViews[this.Content.ID] = this;
 }
示例#2
0
 private void BindToMyContent()
 {
     VGen0 method = null;
     if ((base.InvokeRequired && !base.Disposing) && !base.IsDisposed)
     {
         if (method == null)
         {
             method = delegate {
                 this.BindToMyContent();
             };
         }
         base.BeginInvoke(method);
     }
     else if (!base.Disposing && !base.IsDisposed)
     {
         if ((this.treeViewMyContent.SelectedNode == null) || (this.treeViewMyContent.SelectedNode.Tag == null))
         {
             if (this.CurrentContentView != null)
             {
                 this.CurrentContentView.Visible = false;
             }
             this.gpgLabelMyContent.Text = Loc.Get("<LOC>No valid content selected. Please select content from the browser on the left.");
             this.gpgLabelMyContent.Visible = true;
         }
         else if (this.treeViewMyContent.SelectedNode.Tag is string)
         {
             if (this.CurrentContentView != null)
             {
                 this.CurrentContentView.Visible = false;
             }
             this.gpgLabelMyContent.Text = Loc.Get((string) this.treeViewMyContent.SelectedNode.Tag);
             this.gpgLabelMyContent.Visible = true;
         }
         else if (this.treeViewMyContent.SelectedNode.Tag is IAdditionalContent)
         {
             IAdditionalContent tag = this.treeViewMyContent.SelectedNode.Tag as IAdditionalContent;
             if (this.CurrentContentView == null)
             {
                 this.CurrentContentView = new PnlContentDetailsView(this);
                 this.CurrentContentView.Location = new Point(6, 6);
                 this.splitContainerMyContent.Panel2.Controls.Add(this.CurrentContentView);
             }
             this.CurrentContentView.BindToMyContent(tag);
             this.CurrentContentView.MinimumSize = this.CurrentContentView.Size;
             this.CurrentContentView.Visible = true;
             this.gpgLabelMyContent.Visible = false;
         }
         else
         {
             if (this.CurrentContentView != null)
             {
                 this.CurrentContentView.Visible = false;
             }
             this.gpgLabelMyContent.Text = Loc.Get("<LOC>No valid content selected. Please select content from the browser on the left.");
             this.gpgLabelMyContent.Visible = true;
         }
     }
 }