Пример #1
0
 public FrmTool(FrmMain main)
 {
     this.isItem = true;
     this.InitializeComponent();
     base.Icon    = PLMImageList.GetIcon("ICO_ENV_TOOL");
     this.frmMain = main;
 }
Пример #2
0
 public FrmFile(FrmMain main)
 {
     this.InitializeComponent();
     base.Icon    = PLMImageList.GetIcon("ICO_ENV_FILETYPE");
     this.frmMain = main;
     this.GetBaseToolAndEdit();
 }
Пример #3
0
 public FrmBPNavigator(FrmMain frmMain)
 {
     this.InitializeComponent();
     base.Icon    = PLMImageList.GetIcon("ICO_TIMODELER_NAV_PIC");
     this.frmMain = frmMain;
     this.lvwNavigater.SmallImageList = ClientData.MyImageList.imageList;
 }
Пример #4
0
 public VMFrame(DEViewModel theVM, ArrayList newViewList)
 {
     base.Tag = theVM;
     this.InitializeComponent();
     base.Icon = PLMImageList.GetIcon("ICO_VIW_VIEWMODEL");
     this.Text = "视图模型--" + theVM.Name;
     this.initInNewVM(newViewList);
 }
Пример #5
0
 public FrmAddin(FrmMain main)
 {
     this.isItem = true;
     this.InitializeComponent();
     base.Icon    = PLMImageList.GetIcon("ICO_ENV_TOOL");
     this.frmMain = main;
     this.lvwAddin.SmallImageList = ClientData.MyImageList.imageList;
     this.lvwAddin.Columns.AddRange(UIAddinHelper.Instance.AddinListColumns);
 }
Пример #6
0
 public FrmFolder(FrmMain main)
 {
     this.InitializeComponent();
     this.frmMain = main;
     this.InitializeImageList();
     base.Icon = PLMImageList.GetIcon("ICO_FDL_OPEN");
     this.tvwFolder.ImageList          = ClientData.MyImageList.imageList;
     this.tvwFolder.SelectedImageIndex = this.tvwFolder.ImageIndex = ClientData.MyImageList.GetIconIndex("ICO_FDL_CLOSE");
     this.tvwFolder.Refresh();
 }
Пример #7
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();
            }
        }
Пример #8
0
 public FrmBrowser(FrmMain main)
 {
     this.InitializeComponent();
     base.Icon    = PLMImageList.GetIcon("ICO_ENV_BROWER");
     this.frmMain = main;
 }
Пример #9
0
        private ContextMenuStrip BuildContextMenu(DEBusinessItem item)
        {
            ContextMenuStrip   strip     = new ContextMenuStrip();
            ToolStripMenuItem  item2     = null;
            ToolStripSeparator separator = null;

            item2 = new ToolStripMenuItem("刷新列表")
            {
                Name  = "&Fresh",
                Image = PLMImageList.GetIcon("ICO_REFRESH").ToBitmap()
            };
            item2.Click += new EventHandler(this.mniFreshList_Click);
            strip.Items.Add(item2);
            item2 = new ToolStripMenuItem("浏览")
            {
                Name  = "&Browse",
                Image = PLMImageList.GetIcon("ICO_PPM_BROWSE").ToBitmap()
            };
            item2.Click += new EventHandler(this.mniBrowse_Click);
            strip.Items.Add(item2);
            item2 = new ToolStripMenuItem("属性")
            {
                Name  = "&Property",
                Image = PLMImageList.GetIcon("ICO_PPM_PPCARDTMPPROPERTY").ToBitmap()
            };
            item2.Click += new EventHandler(this.mniProperty_Click);
            strip.Items.Add(item2);
            if (!this.inDialog)
            {
                if (item.Master.Holder == this.user.Oid)
                {
                    separator = new ToolStripSeparator();
                    strip.Items.Add(separator);
                    item2 = new ToolStripMenuItem("编辑模板")
                    {
                        Name  = "E&dit file",
                        Image = PLMImageList.GetIcon("ICO_PPM_PPCARDTEMPLATE").ToBitmap()
                    };
                    item2.Click += new EventHandler(this.mniEditFile_Click);
                    strip.Items.Add(item2);
                    item2 = new ToolStripMenuItem("修改属性")
                    {
                        Name  = "Edit property",
                        Image = PLMImageList.GetIcon("ICO_PPM_PPCARDTMPPROPERTY").ToBitmap()
                    };
                    item2.Click += new EventHandler(this.mniEditProperty_Click);
                    strip.Items.Add(item2);
                }
                else if ((item.State == ItemState.CheckIn) || (item.State == ItemState.Release))
                {
                    separator = new ToolStripSeparator();
                    strip.Items.Add(separator);
                    item2 = new ToolStripMenuItem("更新属性")
                    {
                        Name  = "Update property",
                        Image = PLMImageList.GetIcon("ICO_PPM_PPCARDTMPPROPERTY").ToBitmap()
                    };
                    item2.Click += new EventHandler(this.mniUpdateProperty_Click);
                    strip.Items.Add(item2);
                }
                List <object> items = new List <object> {
                    item
                };
                PLMOperationArgs args             = new PLMOperationArgs(FrmLogon.PLMProduct, PLMLocation.PPCardTemplateList.ToString(), items, ClientData.UserGlobalOption.CloneAsGlobal());
                ToolStripItem[]  contextMenuItems = MenuBuilder.Instance.GetContextMenuItems(args);
                foreach (ToolStripItem item3 in contextMenuItems)
                {
                    if (((item.LastRevision == 1) && (item3.Name == "PLM30_RENAME")) && (item.Master.Holder == this.user.Oid))
                    {
                        strip.Items.Add(item3);
                    }
                }
                separator = new ToolStripSeparator();
                strip.Items.Add(separator);
                foreach (ToolStripItem item4 in contextMenuItems)
                {
                    if (item4.Name != "PLM30_RENAME")
                    {
                        if (item4.Name == "PLM30_DELETE")
                        {
                            if (item.CanEdit(ClientData.LogonUser.Oid) || ((item.Master.State != ItemState.CheckOut) && (item.Master.LastRevision == item.Revision.Revision)))
                            {
                                strip.Items.Add(item4);
                            }
                        }
                        else
                        {
                            strip.Items.Add(item4);
                        }
                    }
                }
            }
            return(strip);
        }
Пример #10
0
        private ContextMenu BuildContextMenu()
        {
            ContextMenu menu = new ContextMenu();
            MenuItemEx  item = null;

            item = new MenuItemEx("Property", "单元格属性", null, null)
            {
                Icon = PLMImageList.GetIcon("ICO_PPM_PPCARDCELLPROPERTY").ToBitmap()
            };
            item.Click += new EventHandler(this.OnShowCellProperty);
            menu.MenuItems.Add(item);
            item        = new MenuItemEx("Input", "输入文本", null, null);
            item.Click += new EventHandler(this.OnInputText);
            menu.MenuItems.Add(item);
            item = new MenuItemEx("-", "-", null, null);
            menu.MenuItems.Add(item);
            item        = new MenuItemEx("Insert page index", "插入页码", null, null);
            item.Click += new EventHandler(this.OnInsertPageIndex);
            menu.MenuItems.Add(item);
            item        = new MenuItemEx("Insert count of pages", "插入总页数", null, null);
            item.Click += new EventHandler(this.OnInsertPagesCount);
            menu.MenuItems.Add(item);
            item        = new MenuItemEx("Insert page index", "插入版本号", null, null);
            item.Click += new EventHandler(this.OnInsertCurrentVersion);
            menu.MenuItems.Add(item);
            item        = new MenuItemEx("Insert page index", "插入当时日期", null, null);
            item.Click += new EventHandler(this.OnInsertCurrentTime);
            menu.MenuItems.Add(item);
            item        = new MenuItemEx("Insert count of pages", "插入当时用户签名", null, null);
            item.Click += new EventHandler(this.OnInsertLogonUser);
            menu.MenuItems.Add(item);
            item = new MenuItemEx("-", "-", null, null);
            menu.MenuItems.Add(item);
            if (!ModelContext.MetaModel.IsForm(this.m_tp.TemplateType))
            {
                item = new MenuItemEx("Insert modify records", "插入修改记录", null, null)
                {
                    Icon = PLMImageList.GetIcon("ICO_PSM_REVISIONHISTORY").ToBitmap()
                };
                item.Click += new EventHandler(this.OnInsertModifyRecord);
                menu.MenuItems.Add(item);
                item = new MenuItemEx("Insert process record", "插入流程记录", null, null)
                {
                    Icon = PLMImageList.GetIcon("ICO_BPM_DEFROOT").ToBitmap()
                };
                item.Click += new EventHandler(this.OnInsertProcessRecord);
                menu.MenuItems.Add(item);
            }
            else
            {
                item        = new MenuItemEx("Insert form signature", "插入表单签字", null, null);
                item.Click += new EventHandler(this.OnFormSignature);
                menu.MenuItems.Add(item);
            }
            item        = new MenuItemEx("Insert picture", "插入图片", null, null);
            item.Click += new EventHandler(this.OnInsertPicture);
            menu.MenuItems.Add(item);
            if (base.Parent.Text != ConstCAPP.COVERLABEL)
            {
                MenuItemEx ex2 = new MenuItemEx("Function", "预定义公式", null, null);
                MenuItemEx ex3 = new MenuItemEx("SinglePageSum", "单页列小计", null, null);
                ex3.Click += new EventHandler(this.OnFunction);
                ex2.MenuItems.Add(ex3);
                ex3        = new MenuItemEx("AllPageSum", "全部页列总计", null, null);
                ex3.Click += new EventHandler(this.OnFunction);
                ex2.MenuItems.Add(ex3);
                menu.MenuItems.Add(ex2);
            }
            return(menu);
        }
Пример #11
0
        private ContextMenu BuildContextMenu()
        {
            ContextMenu menu = new ContextMenu();
            MenuItemEx  item = null;

            if (!this.m_tp.ReadOnly)
            {
                item = new MenuItemEx("Save", "保存", null, null)
                {
                    Icon = PLMImageList.GetIcon("ICO_ENV_SAVE").ToBitmap()
                };
                item.Click += new EventHandler(this.OnSave);
                menu.MenuItems.Add(item);
                item = new MenuItemEx("-", "-", null, null);
                menu.MenuItems.Add(item);
                item = new MenuItemEx("Import…", "当前页导入…", null, null)
                {
                    Icon = PLMImageList.GetIcon("ICO_PPM_PPCARDIMPORT").ToBitmap()
                };
                item.Click += new EventHandler(this.OnImport);
                menu.MenuItems.Add(item);
                item        = new MenuItemEx("ResetViewRange", "重新设置模板区域", null, null);
                item.Click += new EventHandler(this.OnResetViewRange);
                menu.MenuItems.Add(item);
            }
            item = new MenuItemEx("Export…", "导出当前页…", null, null)
            {
                Icon = PLMImageList.GetIcon("ICO_PPM_PPCARDEXPORT").ToBitmap()
            };
            item.Click += new EventHandler(this.OnExport);
            menu.MenuItems.Add(item);
            if (!this.m_tp.ReadOnly)
            {
                item        = new MenuItemEx("Page setup…", "页面设置…", null, null);
                item.Click += new EventHandler(this.OnPageSetup);
                menu.MenuItems.Add(item);
            }
            item = new MenuItemEx("Print preview", "当前页打印预览", null, null)
            {
                Icon = PLMImageList.GetIcon("ICO_PPM_PRINTPREVIEW").ToBitmap()
            };
            item.Click += new EventHandler(this.OnPrintPreview);
            menu.MenuItems.Add(item);
            if (!this.m_tp.ReadOnly)
            {
                item = new MenuItemEx("-", "-", null, null);
                menu.MenuItems.Add(item);
                item        = new MenuItemEx("Set as page range", "设为" + base.SelectedTab.Text + "有效区域", null, null);
                item.Click += new EventHandler(this.OnSetPageRange);
                menu.MenuItems.Add(item);
                item        = new MenuItemEx("Set as mid-table range", "设为" + base.SelectedTab.Text + "表中区域", null, null);
                item.Click += new EventHandler(this.OnSetMidTable);
                menu.MenuItems.Add(item);
            }
            item = new MenuItemEx("-", "-", null, null);
            menu.MenuItems.Add(item);
            if (ModelContext.MetaModel.IsCard(this.m_tp.TemplateType) && this.m_tp.CheckPageMidRegion())
            {
                bool flag = false;
                if (((this.m_tp.Item.State == ItemState.CheckOut) && (this.m_tp.Item.Holder != this.m_tp.UserOid)) || (this.m_tp.Item.State == ItemState.Abandoned))
                {
                    flag = true;
                }
                if (!flag || (this.m_tp.AutoNumber != null))
                {
                    item = new MenuItemEx("AutoNumber…", "自动编号规则设置…", null, null)
                    {
                        Icon = PLMImageList.GetIcon("ICO_PPM_AUTONUMBER").ToBitmap()
                    };
                    item.Click += new EventHandler(this.OnAutoNumber);
                    menu.MenuItems.Add(item);
                }
                if ((this.m_tp.AutoNumber != null) && !flag)
                {
                    item        = new MenuItemEx("Clear AutoNumber", "清除自动编号规则", null, null);
                    item.Click += new EventHandler(this.OnClearAutoNumber);
                    menu.MenuItems.Add(item);
                }
                if (!flag || (this.m_tp.AutoNumber != null))
                {
                    item = new MenuItemEx("-", "-", null, null);
                    menu.MenuItems.Add(item);
                }
                if (!this.m_tp.ReadOnly || (this.m_tp.ReadOnly && (this.m_tp.DataHiddenCol != null)))
                {
                    item        = new MenuItemEx("DataHiddenCol…", "数据隐藏列设置…", null, null);
                    item.Click += new EventHandler(this.OnSetDataHiddenCol);
                    menu.MenuItems.Add(item);
                }
                if (!this.m_tp.ReadOnly)
                {
                    item        = new MenuItemEx("Clear DataHiddenCol", "清除数据隐藏列设置", null, null);
                    item.Click += new EventHandler(this.OnClearDataHiddenCol);
                    menu.MenuItems.Add(item);
                }
                if (!this.m_tp.ReadOnly || (this.m_tp.ReadOnly && (this.m_tp.DataHiddenCol != null)))
                {
                    item = new MenuItemEx("-", "-", null, null);
                    menu.MenuItems.Add(item);
                }
            }
            if (base.Alignment == TabAlignment.Top)
            {
                item        = new MenuItemEx("Change label docking", "标签置底", null, null);
                item.Click += new EventHandler(this.OnChangeLabelDocking);
                menu.MenuItems.Add(item);
            }
            if (base.Alignment == TabAlignment.Bottom)
            {
                item        = new MenuItemEx("Change label docking", "标签置顶", null, null);
                item.Click += new EventHandler(this.OnChangeLabelDocking);
                menu.MenuItems.Add(item);
            }
            if (this.frmParent != null)
            {
                item        = new MenuItemEx("Close", "关闭", null, null);
                item.Click += new EventHandler(this.OnClose);
                menu.MenuItems.Add(item);
            }
            return(menu);
        }