/// <summary>
        /// this function starts flight gear, while the loading window is shown.
        /// </summary>
        /// <param name="sender"> the sender object </param>
        /// <param name="e"> the event args </param>
        void bg_DoWork(object sender, DoWorkEventArgs e)
        {
            // run the view model
            string binFolder   = Directory.GetParent(fileFG).ToString();
            string XMLFileName = System.IO.Path.GetFileNameWithoutExtension(fileXML);

            DataModel.CreateModel(fileCSV, fileXML);
            FGModelImp.CreateModel(new TelnetClient());
            FGModelImp model = FGModelImp.Instance;

            vm = new FGViewModel(model);
            vm.Run(binFolder, fileFG, XMLFileName);
        }
示例#2
0
 /// <summary>
 /// CTOR of InspectorWindow
 /// </summary>
 /// <param name="vm"> model of FlightGear </param>
 /// <param name="csvFilePath"> the csv file to load </param>
 /// <param name="dllPath"> a .dll file which detects anomalies </param>
 public InspectorWindow(FGViewModel vm, string csvFilePath, string dllPath)
 {
     InitializeComponent();
     this.vm          = vm;
     this.dllPath     = dllPath;
     this.csvFilePath = csvFilePath;
     // add a new graphs user control
     graphs = new UserControls.Graph(csvFilePath, DataModel.Instance.ColNames, this.dllPath)
     {
         VerticalAlignment   = VerticalAlignment.Center,
         HorizontalAlignment = HorizontalAlignment.Left
     };
     Grid.SetColumn(graphs, 0);
     Grid.SetRow(graphs, 1);
     Grid.SetColumnSpan(graphs, 2);
     Grid.SetRowSpan(graphs, 2);
     UserControls.Children.Add(graphs);
 }