private void UpdateWorkingPath()
        {
            string        newPath         = string.Empty;
            List <string> reversePathList = new List <string>();
            int           index           = ChromeBookmarks.CurrentWorkingFolder.FolderIndex;
            Folder        parentFolder    = ChromeBookmarks.CurrentWorkingFolder;

            reversePathList.Add(parentFolder.Name.ToString());

            for (int i = 0; i < index; i++)
            {
                reversePathList.Add(parentFolder.Parent.Name.ToString());
                parentFolder = parentFolder.Parent;
            }

            for (int i = reversePathList.Count() - 1; i >= 0; i--)
            {
                newPath += reversePathList[i].ToString();

                if (i != 0)
                {
                    newPath += " > ";
                }
            }

            ChromeBookmarks.CurrentWorkingFolderContextMenuText = $"Rename '{ChromeBookmarks.CurrentWorkingFolder.Name}'";
            ChromeBookmarks.CurrentWorkingFolderPath            = newPath;
            ClearSelectedItems();
            ExitFolderCommand.RaiseCanExecuteChanged();
            ClearAllCommand.RaiseCanExecuteChanged();
        }
示例#2
0
 private void RaiseCanExecuteCommands()
 {
     NextMonthCommand.RaiseCanExecuteChanged();
     PreviousMonthCommand.RaiseCanExecuteChanged();
     RemoveUserCommand.RaiseCanExecuteChanged();
     CurrentMonthCommand.RaiseCanExecuteChanged();
     SearchCommand.RaiseCanExecuteChanged();
     ClearAllCommand.RaiseCanExecuteChanged();
     PrintCommand.RaiseCanExecuteChanged();
 }