Esempio n. 1
0
        public SettingsViewController(UIViewController parentViewController, uint joinNumber, string title)
            : base(parentViewController, joinNumber, title, TimeSpan.Zero)
        {
            var ui = UIController as UIControllerWithSmartObjects;

            _autoModeButtons = new ButtonCollection
            {
                { 1, new UIButton(this, Digitals.AutoModeRoom1Btn) },
                { 2, new UIButton(this, Digitals.AutoModeRoom2Btn) },
            };
            var tabBar = new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioPresetsTabs]);

            _roomModeTabButtons    = new ButtonCollection(tabBar);
            _roomModeLayoutButtons = new ButtonCollection
            {
                { 1, new UIButton(this, Digitals.RoomModeLayout1Btn) },
                { 2, new UIButton(this, Digitals.RoomModeLayout2Btn) },
                { 3, new UIButton(this, Digitals.RoomModeLayout3Btn) },
            };
            _saveRoomModeButton = new UIButton(this, Digitals.RoomModeSaveBtn)
            {
                EnableJoin = Device.BooleanInput[Digitals.RoomModeChangeEnable]
            };
            _revertRoomModeButton = new UIButton(this, Digitals.RoomModeRevertBtn)
            {
                EnableJoin = Device.BooleanInput[Digitals.RoomModeChangeEnable]
            };
            _codec1DualBtn = new UIButton(this, Digitals.Codec1DualModeBtn);
        }
        /// <summary>
        /// Displays a message box in front of the specified window. The message box displays
        /// a message; and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="string"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="string"/> that specifies the title bar caption to display.</param>
        /// <param name="customDialogButtons"> A <see cref="ButtonCollection"/> shown instead of the conventional dialog buttons.</param>
        /// <param name="strength"> Determines the opacity of the window which is set to 0.75 by default and may not exceed 1</param>
        /// <returns>A <see cref="BlurryDialogResult"/> value that specifies which message box button is clicked by the user.</returns>
        public static BlurryDialogResult Show(string messageBoxText, string caption, ButtonCollection customDialogButtons, double strength = Strength)
        {
            var result = BlurryDialogResult.None;
            var dialog = new BlurBehindDialogWindow
            {
                Title               = caption,
                DialogIcon          = BlurryDialogIcon.None,
                DialogMessage       = messageBoxText,
                CustomDialogButtons = customDialogButtons,
                Owner               = Application.Current.MainWindow,
                Strength            = strength,
                BlurDuration        = BlurDuration,
                UnblurDuration      = UnblurDuration,
                BlurRadius          = BlurRadius
            };

            dialog.ResultAquired += (sender, args) =>
            {
                dialog.Close();
                result = args.Result;
            };

            dialog.ShowDialog();

            return(result);
        }
Esempio n. 3
0
        public MpcUIController(SystemBase system, RoomBase defaultRoom)
            : base(system, system.ControlSystem.MPC3x201TouchscreenSlot, defaultRoom)
        {
            var mpc = system.ControlSystem.MPC3x201TouchscreenSlot;

            mpc.Register();

            _sourceButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 5) },
                { 2, new UIButton(this, 6) }
            };

            _chanButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 7) },
                { 2, new UIButton(this, 10) }
            };

            _audioButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 8) },
                { 2, new UIButton(this, 9) }
            };

            _sourceButtons.ButtonEvent += SourceButtonsOnButtonEvent;
            _chanButtons.ButtonEvent   += ChanButtonsOnButtonEvent;
            _audioButtons.ButtonEvent  += AudioButtonsOnButtonEvent;
            _powerBtn              = new UIButton(this, 10);
            _powerBtn.ButtonEvent += PowerBtnOnButtonEvent;
            _level = new MpcVolume(mpc);
            ((ASystem)system).Dsp.HasIntitialized += DspOnHasIntitialized;
        }
        public CameraControlViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageTechCameras, "Camera Control", TimeSpan.Zero)
        {
            var tabs = new UITabBar((UIControllerWithSmartObjects)parentViewController.UIController,
                                    Device.SmartObjects[Joins.SmartObjects.CamTrackingProcessorSelectTabs]);

            _processorSelectButtons = new ButtonCollection(tabs);
            _cameraButtons          = new ButtonCollection
            {
                { Digitals.CameraUp, new UIButton(this, Digitals.CameraUp) },
                { Digitals.CameraDown, new UIButton(this, Digitals.CameraDown) },
                { Digitals.CameraLeft, new UIButton(this, Digitals.CameraLeft) },
                { Digitals.CameraRight, new UIButton(this, Digitals.CameraRight) },
                { Digitals.CameraZoomIn, new UIButton(this, Digitals.CameraZoomIn) },
                { Digitals.CameraZoomOut, new UIButton(this, Digitals.CameraZoomOut) },
                { Digitals.CameraTrackingOff, new UIButton(this, Digitals.CameraTrackingOff) },
                { Digitals.CameraTrackingOn, new UIButton(this, Digitals.CameraTrackingOn) },
                { Digitals.CameraRecordBtn, new UIButton(this, Digitals.CameraRecordBtn) },
                { Digitals.CameraRecordStopBtn, new UIButton(this, Digitals.CameraRecordStopBtn) },
                { Digitals.CameraStreamBtn, new UIButton(this, Digitals.CameraStreamBtn) },
            };
            _layoutsList = new UIDynamicButtonList(
                (UIControllerWithSmartObjects)parentViewController.UIController,
                Device.SmartObjects[Joins.SmartObjects.CameraLayoutsList]);
            _layoutsListButtons = new ButtonCollection(_layoutsList);
            _roomConfigsList    = new UIDynamicButtonList(
                (UIControllerWithSmartObjects)parentViewController.UIController,
                Device.SmartObjects[Joins.SmartObjects.CameraRoomConfigsList]);
            _roomConfigsListButtons = new ButtonCollection(_roomConfigsList);
            _cameraSelectList       = new UIDynamicButtonList(
                (UIControllerWithSmartObjects)parentViewController.UIController,
                Device.SmartObjects[Joins.SmartObjects.CameraSelectList]);
            _cameraSelectListButtons = new ButtonCollection(_cameraSelectList);
            _autoSwitchEnableButton  = new UIButton(this, Digitals.CameraAutoTracking);
        }
Esempio n. 5
0
        /// <summary>
        /// Setup a panel with the tabbed view
        /// </summary>
        /// <param name="rpc"></param>

        void SetupTabbedPanel(
            DockPanel dp)
        {
            dp.Options.AllowFloating      = false;
            dp.Options.FloatOnDblClick    = false;
            dp.Options.ShowMaximizeButton = false;
            dp.Options.ShowAutoHideButton = false;
            dp.Options.ShowCloseButton    = false;

            dp.Tabbed = true;             // tabbed view

            ButtonCollection chbs = dp.CustomHeaderButtons;

            chbs.Clear();

            CustomHeaderButton chb = new CustomHeaderButton             // add close button
                                         ("", null, 2, HorizontalImageLocation.Default, ButtonStyle.PushButton, "Close", false, -1, true, null, true, false, true, null, null, "Close", -1);

            chbs.Add(chb);

            chb = new CustomHeaderButton             // add restore button
                      ("", null, 1, HorizontalImageLocation.Default, ButtonStyle.PushButton, "Restore", false, -1, true, null, true, false, true, null, null, "Restore", -1);
            chbs.Add(chb);

            dp.CustomButtonClick += new ButtonEventHandler(TabDockPanel_CustomButtonClick);

            return;
        }
Esempio n. 6
0
 public VCShareViewController(UIViewController parentViewController)
     : base(parentViewController, Digitals.SubPageVCShare)
 {
     var ui = parentViewController.UIController as UIControllerWithSmartObjects;
     _list = new UIDynamicButtonList(ui, ui.Device.SmartObjects[Joins.SmartObjects.VCShareSourceList]);
     _sourceButtons = new ButtonCollection(_list);
     _closeBtn = new UIButton(this, Digitals.VCDialViewCloseBtn);
 }
Esempio n. 7
0
        public VCMainMenuViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageVCMenu)
        {
            var ui = (UIControllerWithSmartObjects)parentViewController.UIController;

            _list    = new CiscoLargeIconList(ui, ui.Device.SmartObjects[Joins.SmartObjects.VCMainMenuList]);
            _buttons = new ButtonCollection(_list);
            _list.AddItem(CiscoLargeIconListItemType.Call, "Call", Parent.DialView);
            _list.AddItem(CiscoLargeIconListItemType.Share, "Share", Parent.ShareView);
        }
Esempio n. 8
0
        private void InitCollections()
        {
            controls = new ControlCollection(control.Controls);

            // These will be initialized as needed
            buttons   = null;
            labels    = null;
            textboxes = null;
            combos    = null;
        }
Esempio n. 9
0
 public TechAudioControlListItem(UISubPageReferenceList list, uint index) : base(list, index)
 {
     _buttons = new ButtonCollection
     {
         { 1, new UIButton(list.SmartObject, BoolOutputSigs[1].Name, BoolInputSigs[1].Name) },
         { 2, new UIButton(list.SmartObject, BoolOutputSigs[2].Name, BoolInputSigs[2].Name) },
         { 3, new UIButton(list.SmartObject, BoolOutputSigs[3].Name, BoolInputSigs[3].Name) }
     };
     _buttons.ButtonEvent += ButtonsOnButtonEvent;
 }
Esempio n. 10
0
		private void InitCollections()
		{
			controls = new ControlCollection( control.Controls );
			
			// These will be initialized as needed
			buttons = null;
			labels = null;
			textboxes = null;
			combos = null;
		}
Esempio n. 11
0
        public VCKeyboardViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageVCKeyboard, string.Empty, TimeSpan.Zero)
        {
            _closeBtn        = new UIButton(this, Digitals.VCDialKeyboardCloseBtn);
            _shiftBtn        = new UIButton(this, Digitals.VCDialKeyboardShiftBtn);
            _callBtn         = new UIButton(this, Digitals.VCDialKeyboardCallBtn);
            _keyboardButtons = new ButtonCollection();

            var joinOffset = 0U;

            //joins here start at Digitals.VCDialKeyboardCharRangeStart
            for (var c = '0'; c <= '9'; c++)
            {
                _keyboardButtons.Add(c, new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
                joinOffset++;
            }

            //joins here start at Digitals.VCDialKeyboardCharRangeStart + 10

            for (var c = 'a'; c <= 'z'; c++)
            {
                _keyboardButtons.Add(c, new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
                joinOffset++;
            }

            //joins here start at Digitals.VCDialKeyboardCharRangeStart + 35

            _keyboardButtons.Add(' ', new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
            joinOffset++;

            _keyboardButtons.Add('-', new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
            joinOffset++;

            _keyboardButtons.Add('_', new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
            joinOffset++;

            _keyboardButtons.Add('@', new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
            joinOffset++;

            _keyboardButtons.Add('/', new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
            joinOffset++;

            _keyboardButtons.Add('.', new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset));
            joinOffset++;

            _keyboardButtons.Add((char)8, new UIButton(this, Digitals.VCDialKeyboardCharRangeStart + joinOffset)
            {
                HoldTime = TimeSpan.FromSeconds(0.5)
            });

            _keypadView    = new VCKeypadViewController(this);
            _keypadModeBtn = new UIButton(this, Digitals.VCDialKeyboardKeypadToggleBtn);
        }
        public AudioFadersViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageTechAudioFaders, string.Empty, TimeSpan.Zero)
        {
            var ui = parentViewController.UIController as UIControllerWithSmartObjects;

            _faders = new AudioFaderList(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioFaderList]);
            var tabs = new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioFaderListTabs]);

            _tabButtonsGroups = new ButtonCollection(tabs);
            tabs = new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.AudioFaderListTabsFilter]);
            _tabButtonsFilter = new ButtonCollection(tabs);
        }
            public void AddRange(ButtonCollection navigationButtonsToAdd)
            {
                if (navigationButtonsToAdd == null)
                {
                    throw new ArgumentNullException("navigationButtonsToAdd");
                }

                foreach (NuGenNavigationButton button in navigationButtonsToAdd)
                {
                    this.Add(button);
                }
            }
Esempio n. 14
0
 /// <summary>
 /// Disposes of the resources (other than memory) used by the <see cref="RibbonBarPage" />.
 /// </summary>
 /// <param name="disposing">true when this method is called by the application rather than a finalizer.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this._buttons != null)
         {
             this._buttons.Clear(true);
             this._buttons = null;
         }
     }
     base.Dispose(disposing);
 }
Esempio n. 15
0
 /// <summary>
 /// Find components in scene and attach them to this members.
 /// </summary>
 void AssignSceneComponents()
 {
     _canvas  = GameObject.Find("Canvas").GetComponent <Canvas>();
     _buttons = new ButtonCollection()
     {
         Play        = GameObject.Find("ButtonPlay").GetComponent <Button>(),
         Profile     = GameObject.Find("ButtonProfile").GetComponent <Button>(),
         Entitlement = GameObject.Find("ButtonEntitlement").GetComponent <Button>(),
         Account     = GameObject.Find("ButtonAccount").GetComponent <Button>(),
         Logout      = GameObject.Find("ButtonLogout").GetComponent <Button>()
     };
     AssignButtonFunction();
 }
Esempio n. 16
0
            /// <summary>
            /// Initializes a new instance of the <see cref="NuGenNavigationBar"/> class.
            /// </summary>
            /// <param name="serviceProvider">
            /// <para>Requires:</para>
            /// <para><see cref="INuGenControlStateTracker"/></para>
            /// <para><see cref="INuGenNavigationBarRenderer"/></para>
            /// <para><see cref="INuGenNavigationBarLayoutManager"/></para>
            /// <para><see cref="INuGenToolStripRenderer"/></para>
            /// <para><see cref="INuGenToolTipLayoutManager"/></para>
            /// <para><see cref="INuGenToolTipRenderer"/></para>
            /// </param>
            /// <exception cref="ArgumentNullException">
            /// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
            /// </exception>
            public ButtonBlock(INuGenServiceProvider serviceProvider)
                : base(serviceProvider)
            {
                _buttons = new ButtonCollection(this);

                _contextMenuStrip = new NuGenContextMenuStrip(serviceProvider);
                _addRemoveButtons = new ToolStripMenuItem(Resources.Text_NavigationBar_AddRemoveButtons);
                _contextMenuStrip.Items.Add(_addRemoveButtons);
                _overflowSeparator = new ToolStripSeparator();
                _tooltip           = new NuGenToolTip(serviceProvider);

                this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
                this.SetStyle(ControlStyles.Opaque, true);
                this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
                this.SetStyle(ControlStyles.ResizeRedraw, true);
            }
Esempio n. 17
0
        public QuickAccessMenu(RectangleF rectangle, MenuGroup parentGroup)
        {
            Rectangle = rectangle;
            MenuGroup = parentGroup;

            LastButton = Game.Time;
            ButtonDelay = 0.1f;

            ButtonRectangle = new RectangleF(0, 0, 24, 24);
            ButtonSprites = new ButtonCollection<Sprite>();
            ButtonSprites.AddAll(
                new Sprite(TextureLoader.BitmapToTexture(Get(Properties.Resources.Button_A, ButtonRectangle.Width))),
                new Sprite(TextureLoader.BitmapToTexture(Get(Properties.Resources.Button_B, ButtonRectangle.Width))),
                new Sprite(TextureLoader.BitmapToTexture(Get(Properties.Resources.Button_X, ButtonRectangle.Width))),
                new Sprite(TextureLoader.BitmapToTexture(Get(Properties.Resources.Button_Y, ButtonRectangle.Width))));
        }
Esempio n. 18
0
        /// <summary>
        /// SetupDockPanel
        /// </summary>
        /// <param name="dp"></param>
        /// <param name="view"></param>

        void SetupDockPanel(
            DockPanel dp,
            ResultsViewProps view,
            XtraPanel viewPanel)
        {
            dp.Options.AllowFloating      = false;
            dp.Options.FloatOnDblClick    = false;
            dp.Options.ShowMaximizeButton = false;
            dp.Options.ShowAutoHideButton = false;
            dp.Options.ShowCloseButton    = false;

            ButtonCollection chbs = dp.CustomHeaderButtons;

            chbs.Clear();

            CustomHeaderButton chb = new CustomHeaderButton             // add close button
                                         ("", null, 2, HorizontalImageLocation.Default, ButtonStyle.PushButton, "Close", false, -1, true, null, true, false, true, null, null, "Close", -1);

            chbs.Add(chb);

            chb = new CustomHeaderButton             // add maximize button
                      ("", null, 0, HorizontalImageLocation.Default, ButtonStyle.PushButton, "Maximize", false, -1, true, null, true, false, true, null, null, "Maximize", -1);
            chbs.Add(chb);

            dp.CustomButtonClick += new ButtonEventHandler(ViewDockPanel_CustomButtonClick);
            dp.Enter             += new EventHandler(ViewDockPanel_Enter);                // when dock panel is selected
            dp.Leave             += new EventHandler(ViewDockPanel_Leave);                // when dock panel loses focus
            dp.VisibilityChanged += new VisibilityChangedEventHandler(ViewDockPanel_VisibilityChanged);
            dp.ClosedPanel       += new DockPanelEventHandler(ViewDockPanel_ClosedPanel); // when dock panel is closed
            dp.MouseClick        += new MouseEventHandler(ViewDockPanel_Click);

            dp.Tag = view;             // link the dockpanel to the view

            dp.Text = view.Title;      // set the view title

            int vi = view.GetViewIndex();

            if (dp.Text == "")
            {
                dp.Text = "View " + (vi + 1);
            }
            dp.Name = dp.Text;

            dp.ControlContainer.Controls.Add(viewPanel);             // put the view panel in the dock panel

            return;
        }
        public UsbRoutingViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageTechUsb, string.Empty, TimeSpan.Zero)
        {
            try
            {
                var ui = parentViewController.UIController as UIControllerWithSmartObjects;
                _lists    = new Dictionary <uint, UIDynamicButtonList>();
                _buttons  = new Dictionary <uint, ButtonCollection>();
                _pcInputs = new Dictionary <uint, uint>
                {
                    { 1, 11 },
                    { 2, 12 },
                    { 3, 13 },
                    { 4, 14 },
                };
                for (uint i = 0; i < 4; i++)
                {
                    var list = new UIDynamicButtonList(ui,
                                                       ui.Device.SmartObjects[Joins.SmartObjects.UsbRoutingList1 + i]);
                    _lists[i + 1]   = list;
                    _buttons[i + 1] = new ButtonCollection(list);

                    for (uint j = 1; j <= 3; j++)
                    {
                        switch (j)
                        {
                        case 1:
                            list.AddItem("Aud 1 Lectern", new[] { 1U, 2U });
                            break;

                        case 2:
                            list.AddItem("Aud 2 Lectern", new[] { 3U, 4U });
                            break;

                        case 3:
                            list.AddItem("Control Room", new[] { 10U });
                            break;
                        }
                    }
                }
            }
            catch (Exception e)
            {
                CloudLog.Error("Error loading {0}, {1}", GetType().Name, e.Message);
            }
        }
        public VCDialViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageVCDial)
        {
            var ui = parentViewController.UIController as UIControllerWithSmartObjects;

            _list                 = new VCDialList(ui, ui.Device.SmartObjects[Joins.SmartObjects.VCDialList]);
            _listButtons          = new ButtonCollection(_list);
            _closeBtn             = new UIButton(this, Digitals.VCDialViewCloseBtn);
            _textField            = new UILabel(this, Serials.VCDialTextField);
            _textFieldButton      = new UIButton(this, Digitals.VCDialTextField);
            _textFieldClearButton = new UIButton(this, Digitals.VCDialTextFieldClear)
            {
                VisibleJoin = Device.BooleanInput[Digitals.VCDialTextFieldClearVisible]
            };
            _keyboard  = new VCKeyboardViewController(this);
            _dotComBtn = new UIButton(this, Digitals.VCDialKeyboardDotComBtn);
        }
 /// <summary>
 /// Find components in scene and attach them to this members.
 /// </summary>
 void AssignSceneComponents()
 {
     _buttons = new ButtonCollection()
     {
         Back = GameObject.Find("ButtonBack").GetComponent <Button>(),
         Add  = GameObject.Find("ButtonAdd").GetComponent <Button>()
     };
     _inputFields = new InputFieldCollection()
     {
         Email    = GameObject.Find("InputFieldEmail").GetComponent <InputField>(),
         Password = GameObject.Find("InputFieldPassword").GetComponent <InputField>(),
         UserId   = GameObject.Find("InputFieldUserId").GetComponent <InputField>()
     };
     _inputFields.UserId.text         = user.UserId;
     _inputFields.UserId.interactable = false;
     _textInfo = GameObject.Find("TextInfo").GetComponent <Text>();
     AssignButtonFunction();
 }
        public VCInCallViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageVCInCall)
        {
            var ui = (UIControllerWithSmartObjects)parentViewController.UIController;

            _list    = new CiscoSmallIconList(ui, ui.Device.SmartObjects[Joins.SmartObjects.VCCallActionList]);
            _buttons = new ButtonCollection(_list);
            _list.AddItem(CiscoSmallIconListItemType.MicMute, "Privacy");
            _list.AddItem(CiscoSmallIconListItemType.Keypad, "Keypad");
            _list.AddItem(CiscoSmallIconListItemType.Hold, "Hold");
            _list.AddItem(CiscoSmallIconListItemType.Share, "Share");
            _list.AddItem(CiscoSmallIconListItemType.EndCall, "End Call");
            _list[2].Hide();
            _list[3].Hide();
            _statusLabel = new UILabel(this, Serials.VCCallInfoStatus);
            _nameLabel   = new UILabel(this, Serials.VCCallInfoName);
            _timerLabel  = new UILabel(this, Serials.VCCallTimerText);
        }
        private void SampleInvokeButton_OnClick(object sender, RoutedEventArgs e)
        {
            //show a custom dialog
            var mainWindow             = Application.Current.MainWindow;
            var dogeControl            = new BlurryDogeControl();
            var customButtonCollection = new ButtonCollection()
            {
                new Button()
                {
                    Content = "Custom Ok", Margin = new Thickness(2.5, 0, 2.5, 0)
                },
                new Button()
                {
                    Content = "Custom Cancel", Margin = new Thickness(2.5, 0, 2.5, 0)
                }
            };

            var result = BlurryMessageBox.Show(mainWindow, "Custom Dialog", dogeControl, customButtonCollection, 0d);
        }
        public TechPageViewController(BaseUIController uiController)
            : base(uiController, Digitals.PageTechControl, string.Empty)
        {
            _navList    = new NavIconMenu(uiController, uiController.Device.SmartObjects[1]);
            _navButtons = new ButtonCollection(_navList);

            _subPages = new List <IVisibleItem>
            {
                new DMRoutingViewController(this, Digitals.SubPageTechDmRouting, "AV Routing"),
                new SettingsViewController(this, Digitals.SubPageTechSettings, "System Settings"),
                new RecordingViewController(this),
                new PowerViewController(this),
                new RoomControlViewController(this),
                new TVControlViewController(this),
                new AudioFadersViewController(this),
                new VCViewController(this),
                new UsbRoutingViewController(this),
                new CameraControlViewController(this),
            };

            _navList.AddItem(JSIcons.Power, "Power Control", _subPages.FirstOrDefault(s => s is PowerViewController));
            _navList.AddItem(JSIcons.Video, "DM Routing",
                             _subPages.FirstOrDefault(s => s.VisibleJoin.Number == Digitals.SubPageTechDmRouting));
            _navList.AddItem(JSIcons.AudioLevels, "Audio Control", _subPages.FirstOrDefault(s => s is AudioFadersViewController));
            if (UIController.System is ClassroomSystem || UIController.System is AuditoriumSystem)
            {
                _navList.AddItem(JSIcons.VideoConf, "Video Conference",
                                 _subPages.FirstOrDefault(s => s is VCViewController));
                _navList.AddItem(JSIcons.Camera, "Cameras",
                                 _subPages.FirstOrDefault(s => s is CameraControlViewController));
                _navList.AddItem(JSIcons.Recording, "Recording", _subPages.FirstOrDefault(s => s is RecordingViewController));
            }
            _navList.AddItem(JSIcons.TV, "IPTV Control", _subPages.FirstOrDefault(s => s is TVControlViewController));
            if (UIController.System is AuditoriumSystem)
            {
                _navList.AddItem(JSIcons.Lights, "Room Control",
                                 _subPages.FirstOrDefault(s => s is RoomControlViewController));
                _navList.AddItem(JSIcons.Presets, "USB Routing",
                                 _subPages.FirstOrDefault(s => s is UsbRoutingViewController));
                _navList.AddItem(JSIcons.Settings, "System Settings",
                                 _subPages.FirstOrDefault(s => s.VisibleJoin.Number == Digitals.SubPageTechSettings));
            }
        }
Esempio n. 25
0
        private void ResetButton_OnClick(object sender, RoutedEventArgs e)
        {
            var customButtonCollection = new ButtonCollection();

            foreach (var sizeOption in FieldViewModel.SizeOptions)
            {
                var optionButton = new Button
                {
                    Content = sizeOption,
                    Width   = 50d,
                    ToolTip = string.Format(Properties.Resources.WinTileToolTip,
                                            Math.Pow(FieldViewModel.StartValue,
                                                     FieldViewModel.WinningPowers[sizeOption - FieldViewModel.SizeOptions[0]]))
                };
                optionButton.Click += OptionButtonOnClick;
                customButtonCollection.Add(optionButton);
            }
            BlurBehindMessageBox.Show(this, Properties.Resources.ResetBody, Properties.Resources.ResetHeader,
                                      customButtonCollection);
        }
Esempio n. 26
0
        public ButtonsPanel()
        {
            buttons = new ButtonCollection();

            InitializeComponent();

            buttons.Cleared  += new EventHandler(OnButtonsCleared);
            buttons.Inserted += new CollectionChange(OnButtonInserted);
            buttons.Removed  += new CollectionChange(OnButtonRemoved);

            if (showCaptionPanel)
            {
                shift = captionPanel.Height;
            }
            else
            {
                shift = 0;
            }

            StateChanged();
        }
        public DMRoutingViewController(UIViewController parentViewController, uint joinNumber, string title)
            : base(parentViewController, joinNumber, title, TimeSpan.Zero)
        {
            CrestronEnvironment.ProgramStatusEventHandler += CrestronEnvironmentOnProgramStatusEventHandler;
            var uiController = parentViewController.UIController as UIControllerWithSmartObjects;

            if (uiController == null)
            {
                CloudLog.Error("Could not load smartobject for {0}", GetType().Name);
                return;
            }

            _inputList = new RoutingList(uiController,
                                         uiController.Device.SmartObjects[Joins.SmartObjects.DmRoutingInputsList]);
            _outputList = new RoutingList(uiController,
                                          uiController.Device.SmartObjects[Joins.SmartObjects.DmRoutingOutputsList]);
            _inputListButtons  = new ButtonCollection(_inputList);
            _outputListButtons = new ButtonCollection(_outputList);

            _takeButton = new UIButton(this, Digitals.DmRoutingTakeButton)
            {
                EnableJoin = Device.BooleanInput[Digitals.DmRoutingTakeButtonEnable]
            };
            _cancelButton = new UIButton(this, Digitals.DmRoutingCancelButton)
            {
                EnableJoin = Device.BooleanInput[Digitals.DmRoutingCancelButtonEnable]
            };

            _switcher = ((ASystem)UIController.System).Switcher as DmSwitcherBase;

            if (_switcher == null)
            {
                CloudLog.Error("Invalid switcher type for {0}", GetType().Name);
                return;
            }

            var config = ConfigManager.Config.SwitcherConfig;

            UpdateLists(config);
        }
Esempio n. 28
0
        /// <summary>
        /// Displays a message box in front of the specified window. The message box displays
        /// a message; and returns a result.
        /// </summary>
        /// <param name="messageBoxText">A <see cref="string"/> that specifies the text to display.</param>
        /// <param name="caption">A <see cref="string"/> that specifies the title bar caption to display.</param>
        /// <param name="customDialogButtons"> A <see cref="ButtonCollection"/> shown instead of the conventional dialog buttons.</param>
        /// <param name="strength"> Determines the opacity of the window which is set to 0.75 by default and may not exceed 1</param>
        /// <returns>A <see cref="BlurryDialogResult"/> value that specifies which message box button is clicked by the user.</returns>
        public static BlurryDialogResult Show(string messageBoxText, string caption, ButtonCollection customDialogButtons, double?strength = null)
        {
            var result = BlurryDialogResult.None;
            var dialog = new BlurryDialogWindow
            {
                Title               = caption,
                DialogIcon          = BlurryDialogIcon.None,
                DialogMessage       = messageBoxText,
                CustomDialogButtons = customDialogButtons,
                Owner               = null,
                Strength            = strength ?? ColorHelper.GetStrength()
            };

            dialog.ResultAquired += (sender, args) =>
            {
                dialog.Close();
                result = args.Result;
            };

            dialog.ShowDialog();

            return(result);
        }
Esempio n. 29
0
        public MpcUIController(SystemBase system, BasicTriList comms, RoomBase defaultRoom)
            : base(system, comms, defaultRoom)
        {
            _sourceButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 1) },
                { 2, new UIButton(this, 2) },
                { 3, new UIButton(this, 4) },
            };

            _chanButtons = new ButtonCollection
            {
                { 1, new UIButton(this, 3) },
                { 2, new UIButton(this, 6) }
            };

            _sourceButtons.ButtonEvent += SourceButtonsOnButtonEvent;
            _chanButtons.ButtonEvent   += ChanButtonsOnButtonEvent;
            _powerBtn              = new UIButton(this, 10);
            _powerBtn.ButtonEvent += PowerBtnOnButtonEvent;
            _level = new MpcVolume(this);
            ((ASystem)system).Dsp.HasIntitialized += DspOnHasIntitialized;
        }
 public RecordingViewController(UIViewController parentViewController)
     : base(parentViewController, Digitals.SubPageTechRecording, "Recording Control", TimeSpan.Zero)
 {
     _timeLabels[1]           = new UILabel(this, Serials.ExtronRec1Time);
     _timeLabels[2]           = new UILabel(this, Serials.ExtronRec2Time);
     _timeRemainingLabels[1]  = new UILabel(this, Serials.ExtronRec1TimeRemaining);
     _timeRemainingLabels[2]  = new UILabel(this, Serials.ExtronRec2TimeRemaining);
     _storageLabels[1]        = new UILabel(this, Serials.ExtronRec1Storage);
     _storageLabels[2]        = new UILabel(this, Serials.ExtronRec2Storage);
     _spaceRemainingLabels[1] = new UILabel(this, Serials.ExtronRec1BytesAvailable);
     _spaceRemainingLabels[2] = new UILabel(this, Serials.ExtronRec2BytesAvailable);
     _buttons[1] = new ButtonCollection();
     _buttons[2] = new ButtonCollection();
     _buttons[1].Add(Digitals.ExtronRec1RecordBtn, new UIButton(this, Digitals.ExtronRec1RecordBtn)
     {
         EnableJoin = Device.BooleanInput[Digitals.ExtronRec1Enable]
     });
     _buttons[2].Add(Digitals.ExtronRec2RecordBtn, new UIButton(this, Digitals.ExtronRec2RecordBtn)
     {
         EnableJoin = Device.BooleanInput[Digitals.ExtronRec2Enable]
     });
     _buttons[1].Add(Digitals.ExtronRec1StopBtn, new UIButton(this, Digitals.ExtronRec1StopBtn));
     _buttons[2].Add(Digitals.ExtronRec2StopBtn, new UIButton(this, Digitals.ExtronRec2StopBtn));
 }
Esempio n. 31
0
        public TVControlViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageTechTV, string.Empty, TimeSpan.Zero)
        {
            var ui     = parentViewController.UIController as UIControllerWithSmartObjects;
            var tabBar = new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.TVReceiverSelectTabs]);

            _tabs           = new ButtonCollection(tabBar);
            _channelList    = new UIDynamicButtonList(ui, ui.Device.SmartObjects[Joins.SmartObjects.TVChannelList]);
            _channelButtons = new ButtonCollection(_channelList);
            if (parentViewController.UIController.System is AuditoriumSystem)
            {
                _receiverIds = new Dictionary <uint, uint>
                {
                    { 1, 7 },
                    { 2, 8 },
                    { 3, 5 },
                };
            }
            else if (parentViewController.UIController.System is ClassroomSystem)
            {
                _receiverIds = new Dictionary <uint, uint>
                {
                    { 1, 11 }
                };
            }
            else
            {
                _receiverIds = new Dictionary <uint, uint>();
                var count = 0U;
                foreach (var source in parentViewController.UIController.System.Sources.Where(s => s is TVSource).Cast <TVSource>())
                {
                    count++;
                    _receiverIds[count] = source.ClientId;
                }
            }
        }
Esempio n. 32
0
        public VCViewController(UIViewController parentViewController)
            : base(parentViewController, Digitals.SubPageVCBase, string.Empty, TimeSpan.Zero)
        {
            var ui = parentViewController.UIController as UIControllerWithSmartObjects;

            _tabs = new ButtonCollection(new UITabBar(ui, ui.Device.SmartObjects[Joins.SmartObjects.VCSelectCodecTabs]));

            _dialView  = new VCDialViewController(this);
            _shareView = new VCShareViewController(this);
            _callView  = new VCInCallViewController(this);
            _mainMenu  = new VCMainMenuViewController(this);
            _views.Add(_dialView);
            _views.Add(_shareView);
            _views.Add(_callView);
            _views.Add(_mainMenu);
            foreach (var view in _views)
            {
                view.VisibilityChanged += ViewOnVisibilityChanged;
            }
            _codec1DualModeBtn = new UIButton(this, Digitals.Codec1DualModeBtn)
            {
                VisibleJoin = Device.BooleanInput[Digitals.Codec1DualModeBtnVisible]
            };
        }
Esempio n. 33
0
 protected override void InitControl()
 {
     buttons = new ButtonCollection(this);
     base.InitControl();
 }
			/// <summary>
			/// Initializes a new instance of the <see cref="NuGenNavigationBar"/> class.
			/// </summary>
			/// <param name="serviceProvider">
			/// <para>Requires:</para>
			/// <para><see cref="INuGenControlStateTracker"/></para>
			/// <para><see cref="INuGenNavigationBarRenderer"/></para>
			/// <para><see cref="INuGenNavigationBarLayoutManager"/></para>
			/// <para><see cref="INuGenToolStripRenderer"/></para>
			/// <para><see cref="INuGenToolTipLayoutManager"/></para>
			/// <para><see cref="INuGenToolTipRenderer"/></para>
			/// </param>
			/// <exception cref="ArgumentNullException">
			/// <para><paramref name="serviceProvider"/> is <see langword="null"/>.</para>
			/// </exception>
			public ButtonBlock(INuGenServiceProvider serviceProvider)
				: base(serviceProvider)
			{
				_buttons = new ButtonCollection(this);

				_contextMenuStrip = new NuGenContextMenuStrip(serviceProvider);
				_addRemoveButtons = new ToolStripMenuItem(Resources.Text_NavigationBar_AddRemoveButtons);
				_contextMenuStrip.Items.Add(_addRemoveButtons);
				_overflowSeparator = new ToolStripSeparator();
				_tooltip = new NuGenToolTip(serviceProvider);

				this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
				this.SetStyle(ControlStyles.Opaque, true);
				this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
				this.SetStyle(ControlStyles.ResizeRedraw, true);
			}
Esempio n. 35
0
 protected override void InitControl()
 {
     base.InitControl();
     if (Bounds.IsEmpty) bounds = new System.Drawing.Rectangle(0, 0, 240, 300);
     buttons = new ButtonCollection(null);
     buttons.ListChanged += new System.ComponentModel.ListChangedEventHandler(ButtonsListChanged);
 }