add reader

This commit is contained in:
clowwindy
2015-01-12 00:38:12 +08:00
parent 418941cb75
commit 7927811ba3
13 changed files with 1723 additions and 0 deletions
@@ -357,6 +357,45 @@ namespace Shadowsocks.View
qrCodeForm.Show();
}
private void ScanQRCodeItem_Click(object sender, EventArgs e)
{
/*
using (Bitmap image = new Bitmap(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height))
{
using (Graphics g = Graphics.FromImage(bmpScreenCapture))
{
g.CopyFromScreen(Screen.PrimaryScreen.Bounds.X,
Screen.PrimaryScreen.Bounds.Y,
0, 0,
bmpScreenCapture.Size,
CopyPixelOperation.SourceCopy);
}
resultPoints.Clear();
/* var reader = new BarcodeReader
{
PossibleFormats = new List<BarcodeFormat>
{
BarcodeFormat.QR_CODE
}
};
var result = reader.Decode(image);
var result = barcodeReader.Decode(image);
var timerStart = DateTime.Now.Ticks;
var timerStop = DateTime.Now.Ticks;
if (result == null)
{
txtDecoderContent.Text = "No barcode recognized";
}
labDuration.Text = new TimeSpan(timerStop - timerStart).Milliseconds.ToString("0 ms");
}
}
* */
}
private void AutoStartupItem_Click(object sender, EventArgs e) {
AutoStartupItem.Checked = !AutoStartupItem.Checked;
if (!AutoStartup.Set(AutoStartupItem.Checked)) {