Exemplo n.º 1
0
 static public void OpenContainingFolder(CoreImageInfo imageInfo)
 {
     try
     {
         if (m_canOpenFolderWithExplorer)
         {
             Process.Start("explorer.exe", string.Format("/e, /select, \"{0}\"", imageInfo.path));
         }
         else
         {
             ProcessStartInfo startInfo = new ProcessStartInfo();
             startInfo.FileName = imageInfo.GetDirectoryString();
             Process.Start(startInfo);
         }
     }
     catch (System.Exception exeption)
     {
         MessageBox.Show(exeption.Message);
     }
 }
Exemplo n.º 2
0
 static public void OpenContainingFolder(CoreImageInfo imageInfo)
 {
     try
     {
         ProcessStartInfo startInfo = new ProcessStartInfo();
         if (m_canOpenFolderWithExplorer)
         {
             startInfo.FileName  = "explorer.exe";
             startInfo.Arguments = string.Format("/e, /select, \"{0}\"", imageInfo.path);
         }
         else
         {
             startInfo.FileName = imageInfo.GetDirectoryString();
         }
         var process = Process.Start(startInfo);
         Thread.Sleep(System.TimeSpan.FromMilliseconds(100));
     }
     catch (System.Exception exeption)
     {
         MessageBox.Show(exeption.Message);
     }
 }