コード例 #1
0
ファイル: NodeController.cs プロジェクト: devsachit/Vault
        public NodeController(string activefolder)
        {
            this.ActiveFolder        = activefolder;
            GlobalClass.TextChanged += GlobalClass_TextChanged;
            nodetitle = new NodeViewTitle(ActiveFolder);
            RootNode  = new Node(ActiveFolder, "RootNode", "", "Root Node");
            Recycle   = new Node(ActiveFolder, "RecycleBin", "", "Recycle Bin");
            Recycle.Read();
            Favorite = new Node(ActiveFolder, "Favorite", "", "Favorite");
            Favorite.Read();
            Downloads = new Node(ActiveFolder, "Downloads", "", "Downloads");
            Downloads.Read();
            OpenNode(RootNode);

            customfolders = new CustomRootFolders(ActiveFolder);

            recentnodes.AddNode(ref RootNode, RecentBlock.NodeAction.Default);
            recentnodes.AddNode(ref Favorite, RecentBlock.NodeAction.Default);
            recentnodes.AddNode(ref Recycle, RecentBlock.NodeAction.Default);
            recentnodes.AddNode(ref Downloads, RecentBlock.NodeAction.Default);

            for (int i = 0; i < customfolders.FolderNames.Count; i++)
            {
                Node n = new Node(ActiveFolder, customfolders.FolderNames[i], "", customfolders.FolderNames[i]);
                n.Read();
                recentnodes.AddNode(ref n, RecentBlock.NodeAction.Custom);
            }

            contextmenu = new ContextMenu();
            SetBackgrounImage(Properties.Settings.Default.BackgroundImageName);
        }
コード例 #2
0
ファイル: CustomRootFolders.cs プロジェクト: devsachit/Vault
 private void Load()
 {
     if (File.Exists(Path.Combine(ActiveFolderPath, "CustomRootFolders")))
     {
         CustomRootFolders fs = SD.Serialization.LoadObject <CustomRootFolders>(Path.Combine(ActiveFolderPath, "CustomRootFolders"));
         this.FolderNames = fs.FolderNames;
     }
     else
     {
         this.FolderNames = new List <string>();
     }
 }