Пример #1
0
        /// <summary>
        ///     Deserializes a LuiConfig instance from XML file.
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static LuiConfig FromFile(string FileName)
        {
            var       serializer = new XmlSerializer(typeof(LuiConfig));
            LuiConfig Config     = null;

            using (var reader = new StreamReader(FileName))
            {
                Config = (LuiConfig)serializer.Deserialize(reader);
            }

            return(Config);
        }
Пример #2
0
        public static LuiConfig DummyConfig()
        {
            var config = new LuiConfig();
            var bf     = new BeamFlagsParameters(typeof(DummyBeamFlags))
            {
                Name = "Dummy"
            };
            var cam = new CameraParameters(typeof(DummyAndorCamera))
            {
                Name = "Dummy"
            };
            var dg = new DelayGeneratorParameters(typeof(DummyDigitalDelayGenerator))
            {
                Name = "Dummy"
            };

            config.AddParameters(bf);
            config.AddParameters(cam);
            config.AddParameters(dg);
            return(config);
        }