Пример #1
0
 /// <summary>
 /// open path in system if exist  </summary>
 public static void OpenPathInSystem(string path)
 {
     if (Os.FileExists(path))       // OPEN FILE
     {
         try
         {
             string parent_diectory = Os.GetFileDirectory(path);
             System.Diagnostics.Process.Start(parent_diectory);
         }
         catch (Exception ex) { Program.log.Write("openPathInSystem open file: error:" + ex.Message); }
     }
     else if (Os.DirectoryExists(path))  // OPEN DIRECTORY
     {
         try
         {
             System.Diagnostics.Process.Start(path);
         }
         catch (Exception ex) { Program.log.Write("openPathInSystem open directory: error:" + ex.Message); }
     }
 }