Beispiel #1
0
 public X52()
 {
     DeviceInterface = new DirectOutput();
     DeviceInterface.Initialize("ED X52 MFD Controller");
     DeviceInterface.Enumerate(DirectOutputDeviceEnumerate);
     DeviceInterface.RegisterDeviceCallback(DirectOutputDeviceChanged);
 }
Beispiel #2
0
        /// <summary>
        /// Configures the system based on the data loaded from ini files.
        /// </summary>
        /// <param name="LedControlConfigList">The list of loaded led control config data.</param>
        /// <param name="Table">The table object to be configured.</param>
        /// <param name="Cabinet">The cabinet object to be configured.</param>
        /// <param name="RomName">Name of the rom to be used for the setup.</param>
        public void Setup(LedControlConfigList LedControlConfigList, DirectOutput.Table.Table Table, Cabinet Cabinet, string RomName)
        {
            Dictionary<int, TableConfig> TableConfigDict = LedControlConfigList.GetTableConfigDictonary(RomName);

            Dictionary<int, Dictionary<int, IToy>> ToyAssignments = SetupCabinet(TableConfigDict, Cabinet);

            SetupTable(Table, TableConfigDict, ToyAssignments);


        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LedWizEquivalent"/> class.
        /// </summary>
        /// <param name="LedWiz">Reference to a LedWiz object used to configure the LedWizEquivalent.</param>
        public LedWizEquivalent(DirectOutput.Cab.Out.LW.LedWiz LedWiz)
        {
            this.LedWizNumber = LedWiz.Number;
            this.Name = "LedWizEquivalent {0}".Build(LedWiz.Number);
            foreach (DirectOutput.Cab.Out.IOutput O in LedWiz.Outputs)
            {
                Outputs.Add(new LedWizEquivalentOutput() {OutputName="{0}\\{1}".Build(LedWiz.Name,O.Name),LedWizEquivalentOutputNumber=((DirectOutput.Cab.Out.LW.LedWizOutput)O).LedWizOutputNumber});

            }
        }
Beispiel #4
0
        /// <summary>
        /// Creates a new X52ProManager and finds all currently connected devices
        /// </summary>
        /// <param name="appName">App name for the DirectOutput library</param>
        public X52ProManager(string appName)
        {
            directOutput    = new DirectOutput();
            attachedDevices = new List <IntPtr>();
            pages           = new List <int>();
            directOutput.Initialize(appName);
            FindDevices();

            pageCallback   = ChangeActivePage;
            deviceCallback = DeviceChange;

            foreach (IntPtr device in attachedDevices)
            {
                directOutput.RegisterPageCallback(device, pageCallback);
                directOutput.RegisterDeviceChangeCallback(deviceCallback);
            }
        }