private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e) { try { c_RFID = new RFID((string)RegistryAccess.Primary.GetValue("Port")); c_RFID.IncomingRfid += new RfidRead(c_RFID_IncomingRfid); c_RFID.RfidFailure += new RfidFail(c_RFID_RfidFailure); } catch { Switcher.Switch(new EditUserInfoFailure("")); } }