示例#1
0
        public SetupInterfaceSettings()
        {
            // init data provider
            m_settings       = new XPlaneInterfaceSettings();
            this.DataContext = m_settings;

            // Init components
            InitializeComponent();
        }
        /// <summary>
        /// Initializes X-Plane communication class
        /// </summary>
        /// <param name="in_settings"></param>
        public void Initialize(SettingsFileBase in_settings)
        {
            ParserRealtimeObject parser = new ParserRealtimeObject();

            // update settings
            m_settings = in_settings.GetSettings <XPlaneInterfaceSettings>();;

            // parse realtime object description
            //using (TextReader reader = new StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("XPlaneInterface.RealtimeDataConfig.xml")))
            {
                //TODO parser.ParseXMLStream("/" + ParserRealtimeObject.XMLRootName + "/*", reader);
            }

            // TODO m_realtime_objects = parser.Collection;
        }
示例#3
0
 public override void OnSetupPageActivating(Window in_parent, SetupPageEventArgs in_event_info)
 {
     // setup data provider
     m_settings       = SetupDialog.CurrentSettings.GetSettings <XPlaneInterfaceSettings>();
     this.DataContext = m_settings;
 }