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); }
public Login() { InitializeComponent(); this.Loaded += (s, e) => { cardReader = new IDCardReader(); cardReader.CardRead += CardReader_CardRead; cardReader.Start(); }; this.Unloaded += (s, e) => { cardReader.CardRead -= CardReader_CardRead; }; }
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(); }; }