コード例 #1
0
        public void AddItem(Damany.Imaging.Common.Portrait item)
        {
            if (InvokeRequired)
            {
                Action <Damany.Imaging.Common.Portrait> action = this.AddItem;
                this.BeginInvoke(action, item);
                return;
            }

            this.faceImageList.Images.Add(item.GetIpl().ToBitmap());

            var lvi = new ListViewItem
            {
                Tag        = item,
                Text       = item.CapturedAt.ToString(),
                ImageIndex = this.faceImageList.Images.Count - 1
            };

            //this.facesListView.Items.Add(lvi);
        }
コード例 #2
0
        public void AddPortrait(Damany.Imaging.Common.Portrait p)
        {
            if (this.InvokeRequired)
            {
                Action <Damany.Imaging.Common.Portrait> action
                    = this.AddPortrait;

                this.BeginInvoke(action, p);
                return;
            }

            this.imageList1.Images.Add(p.GetIpl().ToBitmap());

            var item = new ListViewItem();

            item.Text       = (_manager.GetName(p.DeviceId) ?? string.Empty) + " " + p.CapturedAt.ToString();
            item.ImageIndex = this.imageList1.Images.Count - 1;


            p.Dispose();
        }