private void lnkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { LinkLabel lnklabel = (LinkLabel)sender; if (lnklabel.Tag == null) { return; } if (lnklabel.Tag.GetType() == typeof(appDB.EFileSearchRow)) { int fileid = ((appDB.EFileSearchRow)lnklabel.Tag).FileId; ParentFile.MainForm.OpenFile(fileid); } else if (lnklabel.Tag.GetType() == typeof(docDB.DocXRefRow)) { docDB.DocXRefRow docxref = (docDB.DocXRefRow)lnklabel.Tag; lmWinHelper.DisplayDocInLawMateViewer(docxref); } } catch (Exception x) { UIHelper.HandleUIException(x); } }
private void CreateShortcutXRefButton(docDB.DocXRefRow docxref, int count) { CreateCheckbox(docxref.Id, count, false); LinkLabel lnkLabel = CreateXrefLinkLabel(docxref.Id, count, false); lnkLabel.ImageKey = "docShortcut.gif"; lnkLabel.Text = docxref.Name; Size sz = System.Windows.Forms.TextRenderer.MeasureText(docxref.Name, lnkLabel.Font); lnkLabel.Width = sz.Width + 32; lnkLabel.Tag = docxref; pnlXRefsContainer.Controls.Add(lnkLabel); }
private void SetMenuClickedEventArgs(FileContextMenuItem MenuItem, ActivityConfig.ACSeriesRow acs) { appDB.EFileSearchRow efilerow = null; docDB.DocXRefRow docxrefrow = null; TreeNode nd = null; try { nd = (TreeNode)uiCommandManager1.Tag; if (nd.Tag.GetType() == typeof(appDB.EFileSearchRow)) { efilerow = (appDB.EFileSearchRow)nd.Tag; } else if (nd.Tag.GetType() == typeof(docDB.DocXRefRow)) { docxrefrow = (docDB.DocXRefRow)nd.Tag; } //efilerow = (appDB.EFileSearchRow)nd.Tag; } catch (Exception x) { efilerow = (appDB.EFileSearchRow)uiCommandManager1.Tag; } if (ContextMenuClicked != null) { FileContextEventArgs fe = new FileContextEventArgs(); fe.MenuItem = MenuItem; fe.SelectedFile = efilerow; fe.ACSeries = acs; fe.Node = nd; ContextMenuClicked(this, fe); } }
protected override void AfterAdd(DataRow dr) { docDB.DocXRefRow row = (docDB.DocXRefRow)dr; //use even row.Id = myA.AtMng.PKIDGet("DocXRef", 1); }