/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e) { if (PowerDownModal != null) { PowerDownModal.HideDialog(); } EndMeetingButtonSig.BoolValue = false; ShareButtonSig.BoolValue = CurrentRoom.OnFeedback.BoolValue; CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange; }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void ShutdownPromptTimer_HasStarted(object sender, EventArgs e) { // Do we need to check where the UI is? No? var timer = CurrentRoom.ShutdownPromptTimer; EndMeetingButtonSig.BoolValue = true; ShareButtonSig.BoolValue = false; if (CurrentRoom.ShutdownType == eShutdownType.Manual || CurrentRoom.ShutdownType == eShutdownType.Vacancy) { PowerDownModal = new ModalDialog(TriList); var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds); // Attach timer things to modal CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange; CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange += ShutdownPromptTimer_PercentFeedback_OutputChange; // respond to offs by cancelling dialog var onFb = CurrentRoom.OnFeedback; EventHandler <FeedbackEventArgs> offHandler = null; offHandler = (o, a) => { if (!onFb.BoolValue) { EndMeetingButtonSig.BoolValue = false; PowerDownModal.HideDialog(); onFb.OutputChange -= offHandler; //gauge.OutputChange -= gaugeHandler; } }; onFb.OutputChange += offHandler; PowerDownModal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true, true, but => { if (but != 2) // any button except for End cancels { timer.Cancel(); } else { timer.Finish(); } }); } }
/// <summary> /// Handles status changes for calls /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e) { var call = e.CallItem; switch (e.CallItem.Status) { case eCodecCallStatus.Connected: // fire at SRL item KeypadMode = eKeypadMode.DTMF; DialStringBuilder.Remove(0, DialStringBuilder.Length); DialStringFeedback.FireUpdate(); DialStringTextCheckEnables(); Parent.ShowNotificationRibbon("Connected", 2000); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); ShowKeypad(); ((Parent.CurrentRoom as IHasCurrentVolumeControls).CurrentVolumeControls as IBasicVolumeWithFeedback).MuteOff(); //VCControlsInterlock.ShowInterlocked(UIBoolJoin.VCKeypadVisible); break; case eCodecCallStatus.Connecting: // fire at SRL item Parent.ShowNotificationRibbon("Connecting", 0); break; case eCodecCallStatus.Dialing: Parent.ShowNotificationRibbon("Connecting", 0); break; case eCodecCallStatus.Disconnected: if (IncomingCallModal != null) { IncomingCallModal.HideDialog(); } if (!Codec.IsInCall) { KeypadMode = eKeypadMode.Dial; // show keypad if we're in call UI mode ShowKeypad(); DialStringBuilder.Remove(0, DialStringBuilder.Length); DialStringFeedback.FireUpdate(); Parent.ShowNotificationRibbon("Disconnected", 2000); } break; case eCodecCallStatus.Disconnecting: break; case eCodecCallStatus.EarlyMedia: break; case eCodecCallStatus.Idle: break; case eCodecCallStatus.OnHold: break; case eCodecCallStatus.Preserved: break; case eCodecCallStatus.RemotePreserved: break; case eCodecCallStatus.Ringing: { // fire up a modal if (!Codec.CodecInfo.AutoAnswerEnabled && call.Direction == eCodecCallDirection.Incoming) { ShowIncomingModal(call); } break; } default: break; } TriList.UShortInput[UIUshortJoin.VCStagingConnectButtonMode].UShortValue = (ushort)(Codec.IsInCall ? 1 : 0); uint stageJoin; if (Codec.IsInCall) { stageJoin = UIBoolJoin.VCStagingActivePopoverVisible; } else { stageJoin = UIBoolJoin.VCStagingInactivePopoverVisible; } if (IsVisible) { StagingBarsInterlock.ShowInterlocked(stageJoin); } else { StagingBarsInterlock.SetButDontShow(stageJoin); } HeaderDriver.ComputeHeaderCallStatus(Codec); // Update active call list UpdateHeaderActiveCallList(); }