Beispiel #1
0
 private void tileDocument_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     try
     {
         if (e.Button == System.Windows.Forms.MouseButtons.Right)
         {
             DocumentNodeOrLink dnol = new DocumentNodeOrLink(iclExtraLarge);
             dnol.ShowDialog(this);
             if (dnol.DialogResult == DialogResult.OK)
             {
                 TIS.Model.Internal.Document.DocNode newNode = new TIS.Model.Internal.Document.DocNode(Uow);
                 newNode.ParentDocNode = _selectedNode;
                 newNode.Name          = dnol.NodeName;
                 //newNode.DocTreeDisplay = _docTree;
                 newNode.ImageIndex = dnol.Index;
                 if (dnol.isLink)
                 {
                     Model.Internal.Document.Document document = new Model.Internal.Document.Document(Uow);
                     document.Name           = dnol.Url;
                     document.DocTypeDisplay = Enumeration.Document.DocumentType.Link;
                     document.DocNode        = newNode;
                     newNode.Document        = document;
                 }
                 Uow.CommitChanges();
                 SelectNode(_selectedNode);
             }
         }
     }
     catch (Exception exception1)
     {
         System.Exception thisException = exception1;
         Management.ShowException(thisException);
     }
 }
Beispiel #2
0
 private void tileDocument_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     try
     {
         if (e.Button == System.Windows.Forms.MouseButtons.Right)
         {
             DocumentNodeOrLink dnol = new DocumentNodeOrLink(iclExtraLarge);
             dnol.ShowDialog(this);
             if (dnol.DialogResult == DialogResult.OK)
             {
                 TIS.Model.Internal.Document.DocNode newNode = new TIS.Model.Internal.Document.DocNode(Uow);
                 newNode.ParentDocNode = _selectedNode;
                 newNode.Name = dnol.NodeName;
                 //newNode.DocTreeDisplay = _docTree;
                 newNode.ImageIndex = dnol.Index;
                 if (dnol.isLink)
                 {
                     Model.Internal.Document.Document document = new Model.Internal.Document.Document(Uow);
                     document.Name = dnol.Url;
                     document.DocTypeDisplay = Enumeration.Document.DocumentType.Link;
                     document.DocNode = newNode;
                     newNode.Document = document;
                 }
                 Uow.CommitChanges();
                 SelectNode(_selectedNode);
             }
         }
     }
     catch (Exception exception1)
     {
         System.Exception thisException = exception1;
         Management.ShowException(thisException);
     }
 }