示例#1
0
        void onRequestDetails(string path)
        {
            RequestDirHandler h = RequestDetails;

            if (h != null)
            {
                ViewHelpers.execWithWaitCursor(() =>
                {
                    h(this, new RequestDirArgs()
                    {
                        Path = ViewHelpers.correctPath(path)
                    });
                });
            }
        }
示例#2
0
 private void treeDirs_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Node != null && e.Node.IsSelected)
     {
         TreeItem it = (TreeItem)e.Node.Tag;
         if (string.Compare(ViewHelpers.correctPath(it.Item.ItemPath), currentSelectedDetailsPath, true) != 0)
         {
             try
             {
                 onRequestDetails(it.Item.ItemPath);
             }
             catch (Exception ex)
             {
                 MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }
示例#3
0
 private void treeDirs_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (e.Node == null)
     {
         currentSelectedDetailsPath = null;
         onRequestDetails(null);
         lstCurDir.Clear();
     }
     else
     {
         TreeItem it = (TreeItem)e.Node.Tag;
         if (string.Compare(currentSelectedDetailsPath, ViewHelpers.correctPath(it.Item.ItemPath), true) != 0)
         {
             try
             {
                 onRequestDetails(it.Item.ItemPath);
             }
             catch (Exception ex)
             {
                 MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }