示例#1
0
        // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        private void reconstructToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Bitmap btmap = null;
            string x;

            try
            {
                for (int i = 0; i < 2; i++)
                {
                    btmap = (Bitmap)picDisplay.Image;
                    BarcodeToolbox bt = new BarcodeToolbox(btmap);
                    btmap = bt.Reconstruct(0, i == 0);

                    // read barcode
                    x = rbar.read(btmap);
                    if (!string.IsNullOrEmpty(x))
                    {
                        picDisplay.Image = (Image)btmap;
                        MessageBox.Show(x);
                        return;
                    }
                }
                picDisplay.Image = (Image)btmap;
                MessageBox.Show("Unable To Recover");
            }
            catch (Exception ex) { MessageBox.Show(ex.ToString()); }
        }
示例#2
0
 // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 private void identifyGoodBarsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //try
     //{
     bt = new BarcodeToolbox((Bitmap)picDisplay.Image);
     picDisplay.Image = bt.isGoodBar();
     //}
     //catch (Exception ex) { MessageBox.Show("No Barcode to read"); }
 }
示例#3
0
        // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        private void identifyBarsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Bitmap tmp;

            try
            {
                bt = new BarcodeToolbox((Bitmap)picDisplay.Image);

                picDisplay.Image = (Image)bt.identifyBars();
            }
            catch (Exception ex) { }
        }
示例#4
0
        // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        private void changeToBWToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Bitmap tmp;

            try
            {
                bt = new BarcodeToolbox((Bitmap)picDisplay.Image);

                tmp = bt.identifyBars();

                picDisplay.Image = (Image)tmp;
            }
            catch (Exception ex) { MessageBox.Show("No Barcode to read"); }
        }