private void UpdateStatus(FocuserStatusUpdatedMessage action) { // This is a registered message handler. It could be called from a worker thread // and we need to be sure that the work is done on the U/I thread. Task.Factory.StartNew(() => { Status = action.Status; IsConnected = Status.Connected; }, CancellationToken.None, TaskCreationOptions.None, Globals.UISyncContext); }
private void DisconnectFocuser() { IsConnected = false; FocuserManager.Disconnect(); Status = null; }