Пример #1
0
        public void InitializeMyUI()
        {
            this.PropertyEditor = new PropertyPanel(this.m_tp.Item, ModelContext.MetaModel.GetClassEx("PPCRDTEMPLATE"), this.m_tp.UserOid, true);
            bool flag = false;

            foreach (Content content in TiModelerUIContainer.dockingManager.Contents)
            {
                if (content.Title == "模板属性")
                {
                    flag = true;
                    break;
                }
            }
            if (!flag)
            {
                dckProperty = new Content(TiModelerUIContainer.dockingManager, this.PropertyEditor, "模板属性", PLMImageList.GetIcon("ICO_PPM_PPCARDTMPPROPERTY"));
                dckProperty.AutoHideSize = new Size(300, 0);
                dckProperty.CloseButton  = false;
                TiModelerUIContainer.dockingManager.Contents.Add(dckProperty);
                base.SuspendLayout();
                TiModelerUIContainer.dockingManager.AddContentWithState(dckProperty, Crownwood.DotNetMagic.Docking.State.DockRight);
                TiModelerUIContainer.dockingManager.ToggleContentAutoHide(dckProperty);
                base.ResumeLayout();
            }
        }
Пример #2
0
 private void InitializeData(Guid uOid, bool readOnly, bool updateDirectely, DEBusinessItem item)
 {
     this.uOid            = uOid;
     this.readOnly        = readOnly;
     this.updateDirectely = updateDirectely;
     this.Item            = item;
     this.Text            = this.Item.Master.Id + "的属性";
     if (this.Item.Master.ClassName == "PPCRDTEMPLATE")
     {
         if (readOnly)
         {
             this.tbcProperty.TabPages.RemoveAt(1);
         }
         CLCardTemplate template = new CLCardTemplate(this.uOid, false, readOnly, this.Item);
         this.chkCover.Checked    = template.HasCover;
         this.chkMainPage.Checked = template.HasMainPage;
         this.chkNextPage.Checked = template.HasNextPage;
         try {
             template.CheckProperties();
         } catch (Exception exception) {
             MessageBox.Show("警告:模板范围和表中区域没有正确设置,请用编辑界面中的快捷菜单命令更正。\n详细信息是:" + exception.Message, "PPM警告", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
     else
     {
         this.tbcProperty.TabPages.RemoveAt(1);
     }
     this.pro      = new PropertyPanel(this.Item, ModelContext.MetaModel.GetClassEx(this.Item.Master.ClassName), uOid, readOnly);
     this.pro.Dock = DockStyle.Fill;
     this.tbcProperty.TabPages[0].Controls.Add(this.pro);
     if (readOnly)
     {
         this.btnOK.Visible  = false;
         this.btnOK.Enabled  = false;
         this.btnCancle.Text = "确定";
     }
 }