private void AddPane()
        {
            var panes = this.DataContext as IList <Pane>;

            if (panes != null)
            {
                try
                {
                    var pane = new ExplorerPane(Directory.GetCurrentDirectory());
                    panes.Insert(panes.Count - 1, pane);
                    tabControl.SelectedItem = pane;
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.Print(ex.Message);
                }
            }
        }
 private void HandleDoubleClick(ExplorerPane pane, object item)
 {
     if (item is FileItem)
     {
         var fileItem = item as FileItem;
         System.Diagnostics.Process.Start(fileItem.Path);
     }
     else if (item is DirectoryItem)
     {
         var directoryItem = item as DirectoryItem;
         if (directoryItem.Name == ExplorerPane.ParentName && directoryItem.Parent != null)
         {
             pane.SetPath(directoryItem.Parent);
         }
         else
         {
             pane.SetPath(directoryItem.Path);
         }
     }
 }
Example #3
0
 private void Show_Explorer(object sender, RoutedEventArgs e)
 {
     ExplorerPane.Show();
 }
 private void TogglePane(ExplorerPane pane)
 {
     explorerBrowser1.VisiblePanes ^= pane;
 }
 private bool IsPaneVisible(ExplorerPane pane)
 {
     return((explorerBrowser1.VisiblePanes & pane) == pane);
 }