Exemplo n.º 1
0
 public void GetResult(HTuple tuple)
 {
     HTupleResult = tuple;
     string[] strs;
     //resultToShow = new List<IData>();
     resultToShowtemp = new List <IData>();
     strs             = tuple.ToSArr();
     for (int i = 0; i < strs.Length / 2; i++)
     {
         IData        data = new IData();
         ListViewItem item = new ListViewItem();
         data.name = strs[i * 2];
         data.data = strs[i * 2 + 1];
         resultToShowtemp.Add(data);
     }
 }
Exemplo n.º 2
0
        public override bool process(HTuple window, HObject img)
        {
            if (hv_ImageFiles.Length <= 0 && Directory.Length > 0)
            {
                HOperatorSet.ListFiles(Directory, (new HTuple("files")).TupleConcat("follow_links"), out hv_ImageFiles);
                HOperatorSet.TupleRegexpSelect(hv_ImageFiles,
                                               (new HTuple("\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$")).TupleConcat("ignore_case"),
                                               out hv_ImageFiles);

                length = hv_ImageFiles.TupleLength();
            }


            if (index >= length)
            {
                index = 0;
            }

            Result_Array[0] = hv_ImageFiles.ToSArr()[index++];

            return(true);
        }