public Main() { InitializeComponent(); // Check if another instance of ALK is running if (CommonUtil.CheckIfAnotherInstanceIsRunning("ALK")) { MessageBox.Show("An instance of ALK is already running.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Environment.Exit(1); } APIUtils.Start(); //Notification Trinity.SignalR.Client signalrClient = Trinity.SignalR.Client.Instance; // setup variables _smartCardFailed = 0; _fingerprintFailed = 0; _displayLoginButtonStatus = false; _popupModel = new Trinity.BE.PopupModel(); #region Initialize and register events double _sessionTimeout = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["session_timeout"]); if (_sessionTimeout > 0) { this._timerCheckLogout = new System.Timers.Timer(); this._timerCheckLogout.AutoReset = true; this._timerCheckLogout.Interval = _sessionTimeout * 1000; this._timerCheckLogout.Elapsed += TimeCheckLogout_EventHandler; } // _jsCallCS _jsCallCS = new JSCallCS(this.LayerWeb, this); _jsCallCS.OnNRICFailed += JSCallCS_OnNRICFailed; _jsCallCS.OnShowMessage += JSCallCS_ShowMessage; _jsCallCS.OnLogOutCompleted += JSCallCS_OnLogOutCompleted; // SmartCard SmartCard.Instance.GetCardInfoSucceeded += GetCardInfoSucceeded; // Fingerprint Fingerprint.Instance.OnIdentificationCompleted += Fingerprint_OnIdentificationCompleted; Fingerprint.Instance.OnDeviceDisconnected += Fingerprint_OnDeviceDisconnected; // NRIC _nric = CodeBehind.Authentication.NRIC.GetInstance(LayerWeb); _nric.OnNRICSucceeded += NRIC_OnNRICSucceeded; _nric.OnShowMessage += OnShowMessage; // Supervisee _superviseeParticulars = new CodeBehind.SuperviseeParticulars(LayerWeb, _jsCallCS, this); _eventCenter = EventCenter.Default; _eventCenter.OnNewEvent += EventCenter_OnNewEvent; #endregion Lib.LayerWeb = LayerWeb; LayerWeb.Url = new Uri(String.Format("file:///{0}/View/html/Layout.html", CSCallJS.curDir)); LayerWeb.ObjectForScripting = _jsCallCS; }
public SuperviseeParticulars(WebBrowser web, JSCallCS _jsCallCS, Main _main) { this._web = web; this._jsCallCS = _jsCallCS; this._main = _main; }
public Supervisee(WebBrowser web) { _web = web; jSCallCS = new JSCallCS(web); }
public PrintMUBAndTTLabels(JSCallCS _jsCallCs) { _web = Lib.LayerWeb; this._jsCallCs = _jsCallCs; }