Esempio n. 1
0
 public void MoveFrom() => MoveFrom(MainMenu.GetCurrentElement().FullName);
Esempio n. 2
0
        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}");
                }
            }
        }
Esempio n. 3
0
 public void CopyFrom() => CopyFrom(MainMenu.GetCurrentElement().FullName);
Esempio n. 4
0
 public void LastSearchRes()
 {
     ContentState     = State.Searched;
     MainMenu.Content = SearchRes;
     MainMenu.NullPos();
 }