コード例 #1
0
ファイル: E131OutputPlugin.cs プロジェクト: VixenLights/Vixen
        private void LoadSetupNodeInfo()
        {
            if (_data == null)
            {
                _data                    = new E131ModuleDataModel();
                _data.Universes          = new List <UniverseEntry>();
                _data.Warnings           = true;
                _data.Statistics         = false;
                _data.EventRepeatCount   = 0;
                _data.EventSuppressCount = 0;
                _data.AutoPopulate       = true;
                _data.Blind              = false;
                _data.Priority           = 100;
            }

            if (_data.Universes == null)
            {
                _data.Universes = new List <UniverseEntry>();
            }

            if (System.IO.File.Exists("Modules\\Controller\\E131settings.xml"))
            {
                ImportOldSettingsFile();
                System.IO.File.Move("Modules\\Controller\\E131settings.xml", "Modules\\Controller\\E131settings.xml.old");
            }
        }
コード例 #2
0
        private void LoadSetupNodeInfo()
        {
            if (_data == null)
            {
                _data                    = new E131ModuleDataModel();
                _data.Universes          = new List <UniverseEntry>();
                _data.Warnings           = true;
                _data.Statistics         = false;
                _data.EventRepeatCount   = 0;
                _data.EventSuppressCount = 0;
            }

            if (_data.Universes == null)
            {
                _data.Universes = new List <UniverseEntry>();
            }

            if (System.IO.File.Exists("Modules\\Controller\\E131settings.xml"))
            {
                ImportOldSettingsFile();
                System.IO.File.Move("Modules\\Controller\\E131settings.xml", "Modules\\Controller\\E131settings.xml.old");
            }

            foreach (var uE in _data.Universes)
            {
                // somehow.. maybe when moving a config from one system to another
                // or when network ids come and go on the same system
                // or if the serializer fails to load these
                // if both of these are zero the Setup will fail leaving
                // this instance in a bad state
                // so make sure at least multicast is non-null
                // Setup will report the error and deactivate this universe
                // At least then we can start up without null ptr exceptions
                if (uE.Unicast == null && uE.Multicast == null)
                {
                    //Console.WriteLine("e131 fixing null multicast...");
                    uE.Multicast = "null";
                }
            }
        }