Beispiel #1
0
 void _readHotKey_OnHotKeyPress(Message msg)
 {
     if (!_isSys)
     {
         try
         {
             using (Bitmap bmap = QRCodeUnit.GetClipboardBitmap())
             {
                 if (bmap != null)
                 {
                     ReadQR(bmap);
                     return;
                 }
             }
             string str = (String)Clipboard.GetData(DataFormats.Text);
             if (!string.IsNullOrEmpty(str))
             {
                 ReadBase64(str);
                 return;
             }
         }
         catch (Exception ex)
         {
             ShowMessage(ex.Message, "错误", ToolTipIcon.Error, 3);
         }
     }
 }
Beispiel #2
0
        public FrmMain()
        {
            _wp           = new WordPicture();
            _wp.Fcolor    = Color.Black;
            _wp.LineAlpha = 200;
            _wp.Font      = new Font("宋体", 12, FontStyle.Bold);
            _qrcode       = new QRCodeUnit();

            InitializeComponent();
            _config = ConfigSave.ReadConfig();

            _toolItems = new ToolStripMenuItem[] { itemFont, itemQRCode, itemQRCodeEncry };
            _listener  = new ClipboardListener(this.Handle);

            _listener.OnClipboardWrite += new DelOnWndProc(_listener_OnClipboardWrite);
            if (_config.ListenClipboard)
            {
                _listener.Listen();
            }
            InitSelectItem();

            ReSetConfig();
        }
Beispiel #3
0
        //ClipboardListener _listener;
        public FrmMain()
        {
            _wp           = new WordPicture();
            _wp.LineAlpha = 200;

            _qrcode     = new QRCodeUnit();
            _base64Unit = new Base64Unit();
            _sc         = new ScreenCapture();
            InitializeComponent();
            _config = ConfigSave.ReadConfig();

            _toolItems = new ToolStripMenuItem[] { itemFont, itemQRCode, itemQRCodeEncry, itemBase64, itemBase64Encry };
            //_listener = new ClipboardListener(this.Handle);

            //_listener.OnClipboardWrite += new DelOnWndProc(_listener_OnClipboardWrite);
            //if (_config.ListenClipboard)
            //{
            //    _listener.Listen();
            //}
            InitSelectItem();

            ReSetConfig();
        }