public MifareCard(PassKadeIn passKadeIn) { establishContext(); ConsoleLogListReader(); this.passKadeIn = passKadeIn; this.acr123u = new Acr123U(); }
private void ApiSignIn(string username, string password) { var APIUrl = Properties.Resources.LoginAPIURL; SignInRequest signInRequest = new SignInRequest(username, password); string sent_param = JsonConvert.SerializeObject(signInRequest); DataResponseArray response = (DataResponseArray)restApi.post(this.ip_address_server, APIUrl, false, sent_param); if (response != null) { switch (response.Status) { case 201: try { switch (Properties.Settings.Default.GateType.ToLower()) { case "in": this.passKadeIn = new PassKadeIn(this); this.passKadeIn.Show(); break; case "out": this.cashier = new Cashier(this); this.cashier.Show(); break; default: this.pedestrian = new Pedestrian(this); this.pedestrian.Show(); break; } Hide(); } catch (Exception) { notifyIcon.ShowBalloonTip(Constant.NOTIFICATION_TRAY_TIMEOUT, "Error", Constant.ERROR_MESSAGE_FAIL_TO_CONNECT_WEBCAM, ToolTipIcon.Error); return; } break; default: notifyIcon.ShowBalloonTip(Constant.NOTIFICATION_TRAY_TIMEOUT, "Error", response.Message, ToolTipIcon.Error); break; } } else { notifyIcon.ShowBalloonTip(Constant.NOTIFICATION_TRAY_TIMEOUT, "Error", Constant.ERROR_MESSAGE_FAIL_TO_CONNECT_SERVER, ToolTipIcon.Error); } }
public Webcam(PassKadeIn passKadeIn) { this.passKadeIn = passKadeIn; InitializeWebcam(); }