SHARE
TWEET

MainWindowXAML

thommy1972de2 May 28th, 2020 (edited) 856 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Windows;
  2. using SCSSdkClient;
  3. using SCSSdkClient.Object;
  4. using WPF_TESTAPP.ViewModel;
  5.  
  6. namespace WPF_TESTAPP
  7. {
  8.     public partial class MainWindow : Window
  9.     {
  10.         public SCSSdkTelemetry Telemetry;
  11.         public bool InvokeRequired { get; private set; }
  12.         public MainWindow()
  13.         {
  14.             Telemetry = new SCSSdkTelemetry();
  15.             Telemetry.Data += Telemetry_Data;
  16.             Telemetry.JobStarted += TelemetryHandler.JobStarted;
  17.             Telemetry.JobCancelled += TelemetryHandler.JobCancelled;
  18.             Telemetry.JobDelivered += TelemetryHandler.JobDelivered;
  19.             Telemetry.Fined += TelemetryHandler.Fined;
  20.             Telemetry.Tollgate += TelemetryHandler.Tollgate;
  21.             Telemetry.Ferry += TelemetryHandler.FerryUsed;
  22.             Telemetry.Train += TelemetryHandler.TrainUsed;
  23.             Telemetry.RefuelStart += TelemetryHandler.RefuelStart;
  24.             Telemetry.RefuelEnd += TelemetryHandler.RefuelEnd;
  25.             Telemetry.RefuelPayed += TelemetryHandler.RefuelPayed;
  26.             InitializeComponent();
  27.            
  28.             Hersteller = ???
  29.         }
  30.         public void Telemetry_Data(SCSTelemetry data, bool updated)
  31.         {
  32.             try
  33.             {
  34.                 if (!InvokeRequired)
  35.                 {
  36.                    // Here comes Data from DLL
  37.                     // The Data from here must in
  38.                     Hersteller = data.TruckData.CurrentData.Brand.ToString();
  39.                 }
  40.             }
  41.             catch
  42.             { }
  43.         }
  44.  
  45.  
  46.  
  47.     }
  48. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top