/// <summary> /// /// </summary> /// <param name="trilist"></param> /// <param name="parent"></param> public EssentialsHuddleTechPageDriver(BasicTriListWithSmartObject trilist, EssentialsRoomTechConfig config) : base(trilist) { Config = config; PagesInterlock = new JoinedSigInterlock(trilist); PagesInterlock.SetButDontShow(UIBoolJoin.TechSystemStatusVisible); trilist.SetSigFalseAction(UIBoolJoin.TechExitButton, Hide); MenuList = new SmartObjectDynamicList(trilist.SmartObjects[UISmartObjectJoin.TechMenuList], true, 3100); MenuList.SetFeedback(1, true); // initial fb ushort count = 0; MenuList.SetItemMainText(1, "System Status"); MenuList.SetItemButtonAction(1, b => { if (b) { PagesInterlock.ShowInterlocked(UIBoolJoin.TechSystemStatusVisible); } MenuList.SetFeedback(1, true); }); MenuList.SetItemMainText(2, "Display Controls"); MenuList.SetItemButtonAction(2, b => { if (b) { PagesInterlock.ShowInterlocked(UIBoolJoin.TechDisplayControlsVisible); } MenuList.SetFeedback(2, true); }); count = 2; // Don't show panel setup on iPad or xpanel if (TriList is Crestron.SimplSharpPro.DeviceSupport.TswFt5Button) { count++; MenuList.SetItemMainText(count, "Panel Setup"); MenuList.SetItemButtonAction(count, b => { if (b) { PagesInterlock.ShowInterlocked(UIBoolJoin.TechPanelSetupVisible); } MenuList.SetFeedback(count, true); }); } MenuList.Count = count; BuildStatusList(); BuildDisplayList(); SetupPinModal(); }
/// <summary> /// /// </summary> /// <param name="triList"></param> /// <param name="codec"></param> public EssentialsVideoCodecUiDriver(BasicTriListWithSmartObject triList, IAVWithVCDriver parent, VideoCodecBase codec, EssentialsHeaderDriver headerDriver) : base(triList) { try { if (codec == null) { throw new ArgumentNullException("Codec cannot be null"); } Codec = codec; Parent = parent; HeaderDriver = headerDriver; SetupCallStagingPopover(); SetupDialKeypad(); ActiveCallsSRL = new SubpageReferenceList(triList, UISmartObjectJoin.CodecActiveCallsHeaderList, 5, 5, 5); SetupRecentCallsList(); SetupFavorites(); SetupLayoutControls(); codec.CallStatusChange += new EventHandler <CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange); // If the codec is ready, then get the values we want, otherwise wait if (Codec.IsReady) { Codec_IsReady(); } else { codec.IsReadyChange += (o, a) => Codec_IsReady(); } //InCall = new BoolFeedback(() => false); LocalPrivacyIsMuted = new BoolFeedback(() => false); VCControlsInterlock = new JoinedSigInterlock(triList); if (CodecHasFavorites) { VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadWithFavoritesVisible); } else { VCControlsInterlock.SetButDontShow(UIBoolJoin.VCKeypadVisible); } StagingBarsInterlock = new JoinedSigInterlock(triList); StagingBarsInterlock.SetButDontShow(UIBoolJoin.VCStagingInactivePopoverVisible); StagingButtonsFeedbackInterlock = new JoinedSigInterlock(triList); StagingButtonsFeedbackInterlock.ShowInterlocked(UIBoolJoin.VCStagingKeypadPress); // Return formatted when dialing, straight digits when in call DialStringFeedback = new StringFeedback(() => { if (KeypadMode == eKeypadMode.Dial) { return(GetFormattedDialString(DialStringBuilder.ToString())); } else { return(DialStringBuilder.ToString()); } }); DialStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecAddressEntryText]); DialStringBackspaceVisibleFeedback = new BoolFeedback(() => DialStringBuilder.Length > 0); DialStringBackspaceVisibleFeedback .LinkInputSig(triList.BooleanInput[UIBoolJoin.VCKeypadBackspaceVisible]); SearchStringFeedback = new StringFeedback(() => { if (SearchStringBuilder.Length > 0) { Parent.Keyboard.EnableGoButton(); return(SearchStringBuilder.ToString()); } else { Parent.Keyboard.DisableGoButton(); return("Tap for keyboard"); } }); SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]); SetupDirectoryList(); SearchStringBackspaceVisibleFeedback = new BoolFeedback(() => SearchStringBuilder.Length > 0); SearchStringBackspaceVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackspaceVisible]); triList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackPress, GetDirectoryParentFolderContents); DirectoryBackButtonVisibleFeedback = (codec as IHasDirectory).CurrentDirectoryResultIsNotDirectoryRoot; DirectoryBackButtonVisibleFeedback .LinkInputSig(triList.BooleanInput[UIBoolJoin.VCDirectoryBackVisible]); triList.SetSigFalseAction(UIBoolJoin.VCKeypadTextPress, RevealKeyboard); triList.SetSigFalseAction(UIBoolJoin.VCDirectorySearchTextPress, RevealKeyboard); triList.SetSigHeldAction(UIBoolJoin.VCDirectoryBackspacePress, 500, StartSearchBackspaceRepeat, StopSearchBackspaceRepeat, SearchKeypadBackspacePress); } catch (Exception e) { Debug.Console(1, "Exception in VideoCodecUiDriver Constructor: {0}", e); } }