public static void EditMarkUp(string fileName, Guid fileOid, Guid processOid, Guid workItemOid, Guid dataOid, Guid userOid, string className, IInnerBrowser browser, Guid itemOid, int itemIteration) { FrmMarkupByBrowser browser2 = new FrmMarkupByBrowser { Mode = 2, FileOid = fileOid, processOid = processOid, workItemOid = workItemOid, dataOid = dataOid, UserOid = userOid, ClassName = className, FileName = fileName, browser = browser, ItemOid = itemOid, ItemIteration = itemIteration }; if (ClientData.OptRmarkEditStyle == 0) { browser2.MdiParent = ClientData.mainForm; } else { browser2.ShowInTaskbar = true; browser2.WindowState = FormWindowState.Maximized; } browser2.Show(); }
public static void ViewMarkUp(string fileName, Guid fileOid, Guid processOid, Guid workItemOid, Guid dataOid, Guid userOid, string className, bool isShowDialog, IInnerBrowser browser) { FrmMarkupByBrowser browser2 = new FrmMarkupByBrowser { Mode = 1, FileOid = fileOid, processOid = processOid, workItemOid = workItemOid, dataOid = dataOid, UserOid = userOid, ClassName = className, FileName = fileName, browser = browser }; if (isShowDialog) { browser2.ShowDialog(); } else { browser2.MdiParent = ClientData.mainForm; browser2.Show(); } }
private void btnOK_Click(object sender, EventArgs e) { if ((this.lvwProcess.SelectedIndices.Count != 1) || (this.lvwWorkItem.SelectedIndices.Count != 1)) { if (this.lvwProcess.SelectedIndices.Count == 0) { MessageBoxPLM.Show("请选择一个流程!"); } else if (this.lvwWorkItem.SelectedIndices.Count == 0) { MessageBoxPLM.Show("请选择一个步骤!"); } base.DialogResult = DialogResult.None; } else { FileBrowseWay way; base.DialogResult = DialogResult.OK; DELProcessInsProperty tag = (DELProcessInsProperty)this.lvwProcess.SelectedItems[0].Tag; DELWorkItem item = (DELWorkItem)((object[])this.lvwWorkItem.SelectedItems[0].Tag)[0]; DEMarkup markup = (DEMarkup)((object[])this.lvwWorkItem.SelectedItems[0].Tag)[1]; base.Close(); if (markup.FileOid != this.file.FileOid) { DESecureFile fileByFileOid = PLItem.Agent.GetBizItemByIteration(markup.ItemOid, this.className, Guid.Empty, ClientData.LogonUser.Oid, BizItemMode.SmartBizItem).FileList.GetFileByFileOid(markup.FileOid); if (fileByFileOid != null) { this.file = fileByFileOid; } else { this.file.FileOid = markup.FileOid; } } if (this.AllFileNames.Contains(this.file.FileOid)) { this.fileName = this.AllFileNames[this.file.FileOid] as string; } else { this.fileName = FSClientUtil.DownloadFile(this.file.FileOid, "ClaRel_DOWNLOAD"); this.file.FileType = UIFileType.GetFileType(this.fileName); this.file.FileName = this.fileName; this.AllFileNames.Add(this.file.FileOid, this.fileName); } DEBrowser browser = null; try { way = UIBrowser.GetMarkupTool(this.file.FileOid, this.file.FileName, this.file.FileType, out browser); } catch (Exception exception) { PrintException.Print(exception, "浏览文件批注"); return; } if (way == FileBrowseWay.InnerBrowser) { if (browser != null) { IInnerBrowser browser2 = null; try { browser2 = BrowserPool.BrowserManager.GetBrowser(browser, null); } catch (Exception exception2) { MessageBoxPLM.Show(exception2.Message); return; } if (browser2 != null) { if (this.AllFileNames.Contains(this.file.FileOid)) { this.fileName = this.AllFileNames[this.file.FileOid] as string; } else { this.fileName = FSClientUtil.DownloadFile(this.file.FileOid, "ClaRel_DOWNLOAD"); this.AllFileNames.Add(this.file.FileOid, this.fileName); } FrmMarkupByBrowser.ViewMarkUp(this.fileName, this.file.FileOid, tag.ID, item.ID, Guid.Empty, item.ActorID, this.className, this.isShowDialog, browser2); } } } else { MessageBoxPLM.Show("必须定义打开文件的内部浏览器,否则不能批注"); } } }