Esempio n. 1
0
        public TMSpecFolderMenuItem(LURootFolderType roolFolderType, TMContextMenuAction action, EventHandler click)
            : base(action, click)
        {
            _roolFolderType = roolFolderType;

            this.Text = roolFolderType.ToString();
        }
Esempio n. 2
0
        public static DirectoryInfo Convert(LURootFolderType rootFolderType)
        {
            if (rootFolderType == LURootFolderType.Application)
            {
                return((new FileInfo(Assembly.GetExecutingAssembly().Location)).Directory);
            }

            string typeName = rootFolderType.ToString();

            Environment.SpecialFolder spec = (Environment.SpecialFolder)Enum.Parse(typeof(Environment.SpecialFolder), typeName);
            string path = Environment.GetFolderPath(spec);

            return(new DirectoryInfo(path));
        }
Esempio n. 3
0
 public TMRootFolder(LURootFolderType folderType) : base(string.Format("[{0}]", folderType.ToString()), null)
 {
     _rootFolderType = folderType;
 }
Esempio n. 4
0
 public LURootFolder(string name, LURootFolderType rootFolderType) : base(name)
 {
     _rootFolderType = rootFolderType;
 }
Esempio n. 5
0
 public bool Remove(LURootFolderType rootFolderType)
 {
     return(_rootFolders.Remove(rootFolderType));
 }