/// <summary> /// Sets the status of a guest control. /// </summary> public void SetGuestControlStatus(int whichGuest, GuestControlStatus newStatus) { if (RCThread.CurrentThread == MainForm.UiThread) { throw new Exception("This call is not allowed from the UI-thread!"); } if (whichGuest < 0 || whichGuest >= this.statusMgr.GuestStatuses.Length) { throw new Exception("Unexpected guest index!"); } GuestCtrlStatusMgrCall uiCall = new GuestCtrlStatusMgrCall(this.statusMgr.GuestStatuses[whichGuest], newStatus); this.ui.InvokeUI(uiCall); }
/// <summary> /// Constructs a GuestCtrlStatusMgrCall object. /// </summary> public GuestCtrlStatusMgrCall(GuestControlStatusManager statusMgr, GuestControlStatus newStatus) { this.statusMgr = statusMgr; this.newStatus = newStatus; }