Esempio n. 1
0
        public static QRCodeForm EncodeClipboard()
        {
            string text = ClipboardHelpers.GetText(true);

            if (!string.IsNullOrEmpty(text) && TaskHelpers.CheckQRCodeContent(text))
            {
                return(new QRCodeForm(text));
            }

            return(new QRCodeForm());
        }
Esempio n. 2
0
        public static QRCodeForm EncodeClipboard()
        {
            if (Clipboard.ContainsText())
            {
                string text = Clipboard.GetText();

                if (TaskHelpers.CheckQRCodeContent(text))
                {
                    return(new QRCodeForm(text));
                }
            }

            return(new QRCodeForm());
        }
Esempio n. 3
0
        public QRCodeForm(string text = null)
        {
            InitializeComponent();
            Icon = ShareXResources.Icon;

            if (!string.IsNullOrEmpty(text))
            {
                txtQRCode.Text = text;
            }
            else
            {
                if (Clipboard.ContainsText())
                {
                    text = Clipboard.GetText();

                    if (TaskHelpers.CheckQRCodeContent(text))
                    {
                        txtQRCode.Text = text;
                    }
                }
            }
        }