public LiveChartsViewModel() { LiveHeart = new ObservableCollection<KeyValuePair<int, double>>(); LiveTemp = new ObservableCollection<KeyValuePair<int, double>>(); InstanceContext context = new InstanceContext(this); _service = new ServiceLive.ServiceLiveClient(context); try { _service.Subscribe(); } catch { } }
public LiveChartsViewModel() { LiveHeart = new ObservableCollection <KeyValuePair <int, double> >(); LiveTemp = new ObservableCollection <KeyValuePair <int, double> >(); InstanceContext context = new InstanceContext(this); _service = new ServiceLive.ServiceLiveClient(context); try { _service.Subscribe(); } catch { } }
public PatientLiveViewModel() { _callBackClass = new LiveCallBack(); var slc = new ServiceLive.ServiceLiveClient(new InstanceContext(_callBackClass)); _state = "Waiting..."; _heartData = new List<KeyValuePair<DateTime, double>>(); _tempData = new List<KeyValuePair<DateTime, double>>(); _worker.DoWork += new DoWorkEventHandler((s, e) => slc.Subscribe()); _worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_worker_RunWorkerCompleted); _dataUpdater.DoWork += new DoWorkEventHandler((s, e) => UpdateData()); _worker.RunWorkerAsync(); }
/// <summary> /// constructeur /// </summary> public HomeViewModel(Page lkView) { _linkedView = lkView; manageUserCommand = new RelayCommand(param => ClickUser(), param => true); managePatientCommand = new RelayCommand(param => ClickPatient(), param => true); manageObservationCommand = new RelayCommand(param => ClickObservation(), param => true); manageImageCommand = new RelayCommand(param => ClickImage(), param => true); _createCommand = new RelayCommand(param => ClickCreate(), param => true); BackgroundWorker worker = new BackgroundWorker(); System.ServiceModel.InstanceContext context = new System.ServiceModel.InstanceContext(new ServiceLiveCallback()); ServiceLive.ServiceLiveClient liveService = new ServiceLive.ServiceLiveClient(context); worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) => { liveService.Subscribe(); }); worker.RunWorkerAsync(); }
/// <summary> /// constructeur /// </summary> public HomeViewModel(Page lkView) { _linkedView = lkView; manageUserCommand = new RelayCommand(param => ClickUser(), param => true); managePatientCommand = new RelayCommand(param => ClickPatient(), param => true); manageObservationCommand = new RelayCommand(param => ClickObservation(), param => true); manageImageCommand = new RelayCommand(param => ClickImage(), param => true); _createCommand = new RelayCommand(param => ClickCreate(), param => true); BackgroundWorker worker = new BackgroundWorker(); System.ServiceModel.InstanceContext context = new System.ServiceModel.InstanceContext(new ServiceLiveCallback()); ServiceLive.ServiceLiveClient liveService = new ServiceLive.ServiceLiveClient(context); worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) => { liveService.Subscribe(); }); worker.RunWorkerAsync(); }