/// <summary> /// 获得单个SystemObject实例 /// </summary> /// <returns></returns> public static SystemObject GetInstance() { if (systemObject == null) { lock (_object) { if (systemObject == null) { return(systemObject = new SystemObject()); } } } return(systemObject); }
private void Window_Loaded(object sender, RoutedEventArgs e) { InitializeFormState(); clientObject = OperateResult.SystemObject.GetInstance(); if (clientObject.ObjCardReader != null) { clientObject.ObjCardReader.CardNoGeted += new SeatManage.ISystemTerminal.IPOS.EventPosCardNo(ObjCardReader_CardNoGeted); clientObject.ObjCardReader.Start(); } clientObject.UpdateConfigError += new EventHandler(clientObject_UpdateConfigError); ReadCardOperator posCardHandle = ReadCardOperator.GetInstance(); posCardHandle.popMessage += new ReadCardOperator.PopMessageEventHandler(posCardHandle_popMessage); viewModel.ImageChange += new EventHandler(viewModel_ImageChange); viewModel.ImageSwitch += new EventHandler(viewModel_ImageSwitch); viewModel.ImageChangeRun(); viewModel.ShowTimeRun(); viewModel.LastSeatRun(); }