Пример #1
0
        public A3()
        {
            InitializeComponent();

            WebSocketSingleton websocketInstance = WebSocketSingleton.GetInstance();

            this.Loaded += (s, e) =>
            {
                cardReader           = new IDCardReader();
                cardReader.CardRead += CardReader_CardRead;
                cardReader.Start();

                var loadingAnimation = FindResource("A3Storyboard1") as Storyboard;
                //loadingAnimation.Completed += (ss, ee) =>
                //{
                //    (Parent as NavigationManager).GoToPage(typeof(Dashboard));
                //};
                loadingAnimation.Begin();
            };
            this.Unloaded += (s, e) =>
            {
                cardReader.CardRead -= CardReader_CardRead;
            };

            // (Parent as NavigationManager).SimulateImageClick(jiantou1_png, ImageOnClick);
        }
Пример #2
0
 public Login()
 {
     InitializeComponent();
     this.Loaded += (s, e) =>
     {
         cardReader           = new IDCardReader();
         cardReader.CardRead += CardReader_CardRead;
         cardReader.Start();
     };
     this.Unloaded += (s, e) =>
     {
         cardReader.CardRead -= CardReader_CardRead;
     };
 }
Пример #3
0
        public A3()
        {
            InitializeComponent();

            WebSocketSingleton websocketInstance = WebSocketSingleton.GetInstance();

            this.Loaded += (s, e) =>
            {
                var loadingAnimation = FindResource("A3Storyboard1") as Storyboard;
                loadingAnimation.Begin();

                cardReader           = new IDCardReader();
                cardReader.CardRead += CardReader_CardRead;
                cardReader.Start();
            };
            this.Unloaded += (s, e) =>
            {
                cardReader.CardRead -= CardReader_CardRead;
                cardReader.Dispose();
            };
        }