Ejemplo n.º 1
0
 /// <summary>
 /// Reveals the tech page and puts away anything that's in the way.
 /// </summary>
 public void ShowTech()
 {
     PopupInterlock.HideAndClear();
     TechDriver.Show();
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        public override void Show()
        {
            if (CurrentRoom == null)
            {
                Debug.Console(1, "ERROR: AVUIFunctionsDriver, Cannot show. No room assigned");
                return;
            }

            var roomConf = CurrentRoom.PropertiesConfig;

            if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero)
            {
                TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
                                          PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
            }
            else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose)
            {
                // room name on join 1, concat phone and sip on join 2, no button method
                //var addr = roomConf.Addresses;
                //if (addr == null) // protect from missing values by using default empties
                //    addr = new EssentialsRoomAddressPropertiesConfig();
                //// empty string when either missing, pipe when both showing
                //TriList.SetString(UIStringJoin.RoomAddressPipeText,
                //    (string.IsNullOrEmpty(addr.PhoneNumber.Trim())
                //    || string.IsNullOrEmpty(addr.SipAddress.Trim())) ? "" : " | ");
                //TriList.SetString(UIStringJoin.RoomPhoneText, addr.PhoneNumber);
                //TriList.SetString(UIStringJoin.RoomSipText, addr.SipAddress);
            }

            TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
            TriList.SetBool(UIBoolJoin.DateOnlyVisible, Config.ShowDate && !Config.ShowTime);
            TriList.SetBool(UIBoolJoin.TimeOnlyVisible, !Config.ShowDate && Config.ShowTime);

            TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
            TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = true;

            // Default to showing rooms/sources now.
            if (CurrentRoom.OnFeedback.BoolValue)
            {
                TriList.SetBool(UIBoolJoin.TapToBeginVisible, false);
                SetupActivityFooterWhenRoomOn();
            }
            else
            {
                TriList.SetBool(UIBoolJoin.StartPageVisible, true);
                TriList.SetBool(UIBoolJoin.TapToBeginVisible, true);
                SetupActivityFooterWhenRoomOff();
            }
            ShowCurrentDisplayModeSigsInUse();

            // Attach actions
            TriList.SetSigFalseAction(UIBoolJoin.VolumeButtonPopupPress, VolumeButtonsTogglePress);

            // Generic "close" button for popup modals
            TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, PopupInterlock.HideAndClear);

            // Volume related things
            TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels());
            TriList.SetString(UIStringJoin.AdvancedVolumeSlider1Text, "Room");

            //TriList.SetSigFalseAction(UIBoolJoin.RoomHeaderButtonPress, () =>
            //    ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));


            //if(TriList is CrestronApp)
            //    TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false;
            //else
            //    TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = true;

            // power-related functions
            // Note: some of these are not directly-related to the huddle space UI, but are held over
            // in case
            TriList.SetSigFalseAction(UIBoolJoin.ShowPowerOffPress, EndMeetingPress);

            TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
            {
                if (CurrentRoom != null && CurrentRoom.DefaultDisplay is IPower)
                {
                    (CurrentRoom.DefaultDisplay as IPower).PowerToggle();
                }
            });

            base.Show();
        }