示例#1
0
        public MainWindow()
        {
            InitializeComponent();

            DataContext = this;


            var timer = new DispatcherTimer();

            timer.Interval  = TimeSpan.FromMilliseconds(500);
            timer.Tick     += (s, e) => SecondsToGo = 30 - Convert.ToInt32(DateTimeOffset.UtcNow.ToUnixTimeSeconds() % 30);
            timer.IsEnabled = true;

            secret   = new byte[] { 0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x21, 0xDE, 0xAD, 0xBE, 0xEF };
            Secret   = Base32.Encode(secret);
            Identity = "*****@*****.**";

            QRCodeUrl = GetQRCodeUrl();
        }