Ejemplo n.º 1
0
        //this method is called by vvvv when the node is created
        public void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            //create inputs
            FHost.CreateStringInput("Directory", TSliceMode.Dynamic, TPinVisibility.True, out FDir);
            FDir.SetSubType2(@"C:\", -1, string.Empty, TStringType.Directory);

            FHost.CreateValueInput("Create", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCreate);
            FCreate.SetSubType(0, 1, 1, 0, true, false, false);

            FHost.CreateValueInput("Remove", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FDelete);
            FDelete.SetSubType(0, 1, 1, 0, true, false, false);

            FHost.CreateStringInput("New Name", TSliceMode.Dynamic, TPinVisibility.True, out FNewDir);
            FNewDir.SetSubType2(@"C:\", -1, string.Empty, TStringType.Directory);

            FHost.CreateValueInput("Rename", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FRename);
            FRename.SetSubType(0, 1, 1, 0, true, false, false);

            //create outputs
            FHost.CreateValueOutput("Exists", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FExists);
            FExists.SetSubType(0, 1, 1, 0, false, true, false);
        }
Ejemplo n.º 2
0
        public static IStringIn CreateStringInput(this IPluginHost host, InputAttribute attribute, Type type)
        {
            IStringIn result = null;

            host.CreateStringInput(attribute.Name, (TSliceMode)attribute.SliceMode, (TPinVisibility)attribute.Visibility, out result);
            result.SetSubType2(attribute.DefaultString, attribute.MaxChars, attribute.FileMask, (TStringType)attribute.StringType);
            SetInputProperties(result, attribute);
            return(result);
        }
Ejemplo n.º 3
0
        public void SetPluginHost(IPluginHost Host)
        {
            FHost = Host;

            //INPUT-PINS
            FHost.CreateStringInput("Mask", TSliceMode.Dynamic, TPinVisibility.True, out FMask);
            FMask.SetSubType("*.*", false);

            FHost.CreateStringInput("Directory", TSliceMode.Single, TPinVisibility.True, out FDirectory);
            FDirectory.SetSubType2("", int.MaxValue, string.Empty, TStringType.Directory);

            FHost.CreateValueInput("Include Subdirectories", 1, null, TSliceMode.Single, TPinVisibility.True, out FSubdirectories);
            FSubdirectories.SetSubType(0, 1, 1, 0, false, true, true);

            FHost.CreateValueInput("Show Short Filename", 1, null, TSliceMode.Single, TPinVisibility.False, out FShortFilenameIn);
            FShortFilenameIn.SetSubType(0, 1, 1, 1, false, true, true);

            FHost.UpdateEnum("Sort Order", "Name", new string[] { "Name", "FullName", "FileSize", "Extension", "LastAccess", "LastWriteTime", "CreationTime" });
            FHost.CreateEnumInput("Sort Order", TSliceMode.Single, TPinVisibility.True, out FMaskRule);
            FMaskRule.SetSubType("Sort Order");

            FHost.CreateValueInput("Count", 1, null, TSliceMode.Single, TPinVisibility.True, out FCountIn);
            FCountIn.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            FHost.UpdateEnum("Count Selection", "First", new string[] { "First", "Last" });
            FHost.CreateEnumInput("Count Selection", TSliceMode.Single, TPinVisibility.True, out FCountOrder);
            FCountOrder.SetSubType("Count Selection");

            FHost.CreateValueInput("Update", 1, null, TSliceMode.Single, TPinVisibility.True, out FUpdate);
            FUpdate.SetSubType(0, 1, 1, 0, true, false, true);


            // OUTPUT-PINS
            FHost.CreateStringOutput("Filenames", TSliceMode.Dynamic, TPinVisibility.True, out FFiles);
            FFiles.SetSubType("", true);

            FHost.CreateStringOutput("Short Filenames", TSliceMode.Dynamic, TPinVisibility.True, out FShortFilenameOut);
            FShortFilenameOut.SetSubType("", false);

            FHost.CreateValueOutput("File Count", 1, null, TSliceMode.Single, TPinVisibility.True, out FCountOut);
            FCountOut.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            FHost.CreateStringOutput("Message", TSliceMode.Single, TPinVisibility.Hidden, out FMessage);
            FMessage.SetSubType("OK", false);
        }