Ejemplo n.º 1
0
 public void CreateDirectory(string dir)
 {
     if (dir != String.Empty)
     {
         if (ContentState == State.Searched || ContentState == State.History)
         {
             MoveOut();
         }
         dir = Path.Combine(CurrentDirectory.FullName, dir);
         if (Directory.Exists(dir))
         {
             ManagerDialogWindows.ErrorMessage($"Directory called {dir} already exists");
             ManagerLogger.Log("Create_Directory_Failure", $"Directory called {dir} already exists; Path - {dir}");
         }
         else
         {
             try
             {
                 Directory.CreateDirectory(dir);
                 UpdateContent();
                 ManagerLogger.Log("Create_Directory", dir);
             }
             catch (Exception e)
             {
                 ManagerDialogWindows.Message(e.Message);
                 ManagerLogger.Log("Create_Directory_Failure", $"{e.Message}; Path - {dir}");
             }
         }
     }
 }
Ejemplo n.º 2
0
 public void ClearLog()
 {
     ManagerLogger.ClearLog();
     ManagerDialogWindows.Message("Log Cleared");
 }