private void buttonOpenClick(object sender, RoutedEventArgs e)
 {
     if (discElements is MyDir)
     {
         GetNewViewEvent.Invoke(discElements.Path);
     }
     if (discElements is MyFile)
     {
         System.Diagnostics.Process.Start(discElements.Path);
     }
 }
 private void buttonOpenClick(object sender, RoutedEventArgs e)
 {
     if (discElements is MyDir)
     {
         try
         {
             GetNewViewEvent.Invoke(discElements.Path);
         }
         catch
         {
             MessageBox.Show("Can't open the dir!");
         }
     }
     if (discElements is MyFile)
     {
         Process.Start(discElements.Path);
     }
 }