public void MoveFrom() => MoveFrom(MainMenu.GetCurrentElement().FullName);
public void Delete() { bool file = true; if (MainMenu.Content.Count > 0) { string name = MainMenu.GetCurrentElement().FullName; try { if (ManagerDialogWindows.Confirmation($"Are you sure, you want delete {MainMenu.GetCurrentElement()}?")) { if (MainMenu.GetCurrentElement().ToDirectoryInfo().Exists) { file = false; MainMenu.GetCurrentElement().ToDirectoryInfo().Delete(true); } else { MainMenu.GetCurrentElement().ToFileInfo().Delete(); } MainMenu.ControllPos(); UpdateContent(); ManagerLogger.Log("Delete", name); } } catch (Exception e) { ManagerDialogWindows.ErrorMessage(e.Message); ManagerLogger.Log($"{(file ? "File" : "Directory")}_Delete_Failure", $"{e.Message}; Path - {name}"); } } }
public void CopyFrom() => CopyFrom(MainMenu.GetCurrentElement().FullName);
public void LastSearchRes() { ContentState = State.Searched; MainMenu.Content = SearchRes; MainMenu.NullPos(); }