Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        void ShowIncomingModal(CodecActiveCallItem call)
        {
            (Parent as IAVWithVCDriver).PrepareForCodecIncomingCall();
            IncomingCallModal = new ModalDialog(TriList);
            string msg;
            string icon;

            if (call.Type == eCodecCallType.Audio)
            {
                icon = "Phone";
                msg  = string.Format("Incoming phone call from: {0}", call.Name);
            }
            else
            {
                icon = "Camera";
                msg  = string.Format("Incoming video call from: {0}", call.Name);
            }
            IncomingCallModal.PresentModalDialog(2, "Incoming Call", icon, msg,
                                                 "Ignore", "Accept", false, false, b =>
            {
                if (b == 1)
                {
                    Codec.RejectCall(call);
                }
                else                                 //2
                {
                    AcceptIncomingCall(call);
                }
                IncomingCallModal = null;
            });
        }
Ejemplo n.º 2
0
        /// <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();
                    }
                });
            }
        }