private void InitObject() { _config = Config.Instance(); _udpHelper = new UdpHelper(); _deviceControlElement = DeviceControlElement.GetInstance(); _deviceControlElement.AddJoystick(_config.Default.DefaultControlElement.Rus.Guid); _deviceControlElement.AddJoystick(_config.Default.DefaultControlElement.Rud.Guid); _dynamicModelToBmpi = new DynamicModelToBmpi(); _aircraftPosition = new AircraftPosition(); _dynamicModelToVaps = new DynamicModelToVaps(); _modelState = new ModelState(); _channelRadar = new ChannelRadar(); _channelThermalEffect = new ChannelThermalEffect(); _channelTvHeadEffect = new ChannelTvHeadEffect(); _ethernetControlElement = new EthernetControlElement(); _cLSEControl = new CLSEControl(); _cLSEState = new CLSEState(); _parametersOfControl = new ParametersOfControl(); _lptp = new Lptp(); _commandPue = new CommandPue(); if (_typeModel == 0) { _controlElement = new ControlElementKa52(); _dynamicModel = new ModelKa52(); } _startPosition = new StartPosition(); _landing = new Landing(); _route = new Route(); uint version = 0; uint release = 0; uint releaseDay = 0; uint releaseMonth = 0; uint releaseYear = 0; IntPtr pversion = GetIntPtr(version); IntPtr prelease = GetIntPtr(release); IntPtr preleaseDay = GetIntPtr(releaseDay); IntPtr preleaseMonth = GetIntPtr(releaseMonth); IntPtr preleaseYear = GetIntPtr(releaseYear); GetDllVersion(pversion, prelease, preleaseDay, preleaseMonth, preleaseYear); version = (uint)Marshal.ReadInt32(pversion); release = (uint)Marshal.ReadInt32(prelease); releaseDay = (uint)Marshal.ReadInt32(preleaseDay); releaseMonth = (uint)Marshal.ReadInt32(preleaseMonth); releaseYear = (uint)Marshal.ReadInt32(preleaseYear); Init("ConfigBrunner.xml"); }
public MainWindow() { InitializeComponent(); _baseModel = new BaseModel(); _commandPue = new CommandPue(); _lstGraph = new List <GraphInfo>(); _baseModel.Update3DEvent += Update3DEvent; Prepare3DModel(); //// Prepare data in arrays //const int N = 1000; //double[] x = new double[N]; //double[] y = new double[N]; //for (int i = 0; i < N; i++) //{ // x[i] = i * 0.1; // y[i] = Math.Sin(x[i]); //} //// Create data sources: //var xDataSource = x.AsXDataSource(); //var yDataSource = y.AsYDataSource(); //CompositeDataSource compositeDataSource = xDataSource.Join(yDataSource); //// adding graph to plotter //plotter.AddLineGraph(compositeDataSource, Color.FromArgb(255,196,32,222), // 3, // "Sine"); //// Force evertyhing plotted to be visible //plotter.FitToView(); LoadLog(); LoadFault(); LoadParam(); InitPlotter(); SetTimerInterrupts(); ListOfData.ItemsSource = _baseModel.DynamicInfos; LstParameters.ItemsSource = _baseModel.ParameterInfos; }