private void MakeExpandImage()
        {
            var splitterItem = _splitterItems[_startIndex];

            if (splitterItem.NikseBitmap == null)
            {
                return;
            }
            ExpandedMatch = new BinaryOcrBitmap(new NikseBitmap(splitterItem.NikseBitmap), false, (int)numericUpDownExpandCount.Value, string.Empty, splitterItem.X, splitterItem.Y)
            {
                ExpandedList = new List <BinaryOcrBitmap>()
            };
            for (int i = 1; i < listBoxInspectItems.Items.Count; i++)
            {
                if (i < numericUpDownExpandCount.Value)
                {
                    splitterItem = _splitterItems[_startIndex + i];
                    if (splitterItem.NikseBitmap == null)
                    {
                        break;
                    }
                    ExpandedMatch.ExpandedList.Add(new BinaryOcrBitmap(splitterItem.NikseBitmap, false, 0, null, splitterItem.X, splitterItem.Y));
                }
            }
            pictureBoxInspectItem.Image = ExpandedMatch.ToOldBitmap();
        }
コード例 #2
0
        private void AddToListView(BinaryOcrBitmap bob)
        {
            _data.Add(new ListViewData {
                Checked = true, BinaryOcrBitmap = bob
            });

            var item = new ListViewItem(string.Empty)
            {
                Tag = bob, Checked = true
            };

            item.SubItems.Add(bob.ToString());
            listView1.Items.Add(item);
            imageList1.Images.Add(bob.ToOldBitmap(Color.Black));
            item.ImageIndex = imageList1.Images.Count - 1;
        }