Esempio n. 1
0
 public DiskProfileBase(IEventAggregator events, params IConverterProfile[] converters)
     : base(events, converters)
 {
     MetadataProvider = new MetadataProviderBase(new BasicMetadataProvider(), new FileBasedMetadataProvider());
     CommandProviders.Add(new FileBasedCommandProvider());                                                                                                                            //Open, Cut, Copy, Paste etc
     DeleteCommand =
         ScriptCommands.AssignProperty("{DeleteEntries}", "Length", "{DeleteEntries-Length}",                                                                                         //Assign DeleteEntries Length
                                       ScriptCommands.IfValue <int>(ComparsionOperator.GreaterThanOrEqual, "{DeleteEntries.Length}", 1,                                               //If DeleteEntries Length >= 1
                                                                    UIScriptCommands.MessageBoxYesNo("FileExplorer", "Delete {DeleteEntries[0]} and {DeleteEntries-Length} Item(s)?", //IfTrue
                                                                                                     CoreScriptCommands.DiskDeleteMultiple("{DeleteEntries}", true))));
     CreateFolderCommand =
         CoreScriptCommands.DiskCreateFolder("{BaseFolder.Profile}", "{BaseFolder.FullPath}\\{FolderName}",
                                             "{CreatedFolder}", NameGenerationMode.Rename);
 }
Esempio n. 2
0
        public FileSystemInfoExProfile(IEventAggregator events, IWindowManager windowManager, params IConverterProfile[] converters)
            : base(events, converters)
        {
            ProfileName = "FileSystem (Ex)";
            ProfileIcon = ResourceUtils.GetEmbeddedResourceAsByteArray(this, "/Model/DirectoryInfoEx/My_Computer.png");

            DiskIO            = new HardDriveDiskIOHelper(this);
            HierarchyComparer = new ExHierarchyComparer(this);
            MetadataProvider  = new ExMetadataProvider();

            CommandProviders.Add(new ExCommandProvider(this));


            //DragDrop = new FileSystemInfoExDragDropHandler(this);
            DragDrop = new FileBasedDragDropHandler(this, em => false);
            //PathMapper = IODiskPatheMapper.Instance;

            PathPatterns = new string[] { RegexPatterns.FileSystemGuidPattern, RegexPatterns.FileSystemPattern };
        }