Skip to content

Main Application

Thao Tran edited this page Jun 7, 2018 · 4 revisions

The main application is a Windows Presentation Foundation (WPF) application written in C# followed by the Model-View-View Model (MVVM) design pattern.

Used functionality in WPF

  • Data binding using INotifyPropertyChanged interface and ObservableCollection to establish connection between the UI components and the business logics.
  • ICommand interface to provide a mechanism for the View to invoke operations on the ViewModel

App features:

  • Info and error logging on the UI and to a log file using NLog
  • User/Device settings using ApplicationSettingsBase standard .NET framework
  • Full access to the scanned CPUs related files stored in user's computer storage
  • Issue commands to the Arduino to control motors and lights

The app has 3 threads:

  • UI thread. The UI is kept responsive by using asynchronous programing async/await introduced in .NET framework or higher
  • Scan thread starts when hitting the Scan button
  • UpdatePorts thread always runs in the background to update the port list, if there is no ports connected, the app will be disable otherwise, it is enable for using.

Clone this wiki locally