コード例 #1
0
        public static DmpsRoutingController GetDmpsRoutingController(string key, string name,
                                                                     DmpsRoutingPropertiesConfig properties)
        {
            try
            {
                ISystemControl systemControl = null;

                systemControl = Global.ControlSystem.SystemControl as ISystemControl;

                if (systemControl == null)
                {
                    return(null);
                }

                var controller = new DmpsRoutingController(key, name, systemControl);

                controller.InputNames  = properties.InputNames;
                controller.OutputNames = properties.OutputNames;

                if (!string.IsNullOrEmpty(properties.NoRouteText))
                {
                    controller.NoRouteText = properties.NoRouteText;
                }

                return(controller);
            }
            catch (System.Exception e)
            {
                Debug.Console(0, "Error getting DMPS Controller:\r{0}", e);
            }
            return(null);
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="key"></param>
        /// <param name="name"></param>
        /// <param name="chassis"></param>
        public DmpsRoutingController(string key, string name, ISystemControl systemControl)
            : base(key, name)
        {
            Dmps          = Global.ControlSystem;
            SystemControl = systemControl;

            InputPorts     = new RoutingPortCollection <RoutingInputPort>();
            OutputPorts    = new RoutingPortCollection <RoutingOutputPort>();
            VolumeControls = new Dictionary <uint, DmCardAudioOutputController>();
            TxDictionary   = new Dictionary <uint, string>();
            RxDictionary   = new Dictionary <uint, string>();

            VideoOutputFeedbacks          = new Dictionary <uint, IntFeedback>();
            AudioOutputFeedbacks          = new Dictionary <uint, IntFeedback>();
            VideoInputSyncFeedbacks       = new Dictionary <uint, BoolFeedback>();
            InputNameFeedbacks            = new Dictionary <uint, StringFeedback>();
            OutputNameFeedbacks           = new Dictionary <uint, StringFeedback>();
            OutputVideoRouteNameFeedbacks = new Dictionary <uint, StringFeedback>();
            OutputAudioRouteNameFeedbacks = new Dictionary <uint, StringFeedback>();
            InputEndpointOnlineFeedbacks  = new Dictionary <uint, BoolFeedback>();
            OutputEndpointOnlineFeedbacks = new Dictionary <uint, BoolFeedback>();

            Debug.Console(1, this, "{0} Switcher Inputs Present.", Dmps.SwitcherInputs.Count);
            Debug.Console(1, this, "{0} Switcher Outputs Present.", Dmps.SwitcherOutputs.Count);

            SetupOutputCards();

            SetupInputCards();
        }
コード例 #3
0
 public void AddSystemControl(ISystemControl control)
 {
     if (control is UIElement uiElement)
     {
         ControlPanel.Children.Insert(ControlPanel.Children.Count - 2, uiElement);
     }
 }
コード例 #4
0
 public void AddSystemControl(ISystemControl control)
 {
     if (control is UIElement uiElement)
     {
         SystemControlStackPanel.Children.Add(uiElement);
     }
 }
コード例 #5
0
 public PrivateControlModule(InputControls inputControls, ISystemControl systemControl, IAmplifier amplifier, IDisposable disposer)
 {
     this.Amplifier     = amplifier;
     this.SystemControl = systemControl;
     this.InputControls = inputControls;
     this.Disposer      = disposer;
 }
コード例 #6
0
ファイル: ShutdownController.cs プロジェクト: hugener/Aupli
 /// <summary>
 /// Initializes a new instance of the <see cref="ShutdownController" /> class.
 /// </summary>
 /// <param name="idleMonitor">The input controller.</param>
 /// <param name="systemControl">The shutdown button.</param>
 /// <param name="applicationExit">The application exit.</param>
 /// <param name="allowShutdown">if set to <c>true</c> [allow shutdown].</param>
 /// <param name="shutdownControllerReporter">The shutdown controller reporter.</param>
 public ShutdownController(
     IIdleMonitor idleMonitor,
     ISystemControl systemControl,
     IApplicationExit applicationExit,
     bool allowShutdown,
     IShutdownControllerReporter?shutdownControllerReporter = null)
 {
     this.idleMonitor                = idleMonitor;
     this.systemControl              = systemControl;
     this.applicationExit            = applicationExit;
     this.allowShutdown              = allowShutdown;
     this.shutdownControllerReporter = shutdownControllerReporter;
     this.shutdownControllerReporter?.SetSource(this);
     this.idleMonitor.SystemIdle      += this.OnIdleControllerSystemIdle;
     this.systemControl.ShuttingDown  += this.OnShutdownControlShuttingDown;
     this.applicationExit.ExitRequest += this.OnApplicationExitRequest;
     this.applicationExit.Exiting     += this.OnApplicationExiting;
 }