/////////////////////////////////////////////////////////////////////////////// // Construction and Initializing methods // /////////////////////////////////////////////////////////////////////////////// #region CONSTRUCTION /// <summary> /// Initializes a new instance of the aslSettingsDialog class. /// </summary> /// <param name="tracker">The <see cref="AslTracker"/> to be used</param> /// <param name="aslSerialPort">The connection to the dll.</param> public aslSettingsDialog(AslTracker tracker, ASLSerialOutPort3Class aslSerialPort) { this.records = new ArrayList(); // call the Windows Form Designer generated method this.InitializeComponent(); this.aslTracker = tracker; this.userSettings = this.aslTracker.Settings; this.serialOutClass = aslSerialPort; // call the additional local initialize method this.CustomInitialize(); this.InitializeControls(); this.somethingChange = false; }
/// <summary> /// Sets up calibration procedure and wires the events. Reads settings from file. /// </summary> protected override void Initialize() { #if ASL // Create Port COM Object this.aslPort = new ASLSerialOutPort3Class(); // ??? this.stopwatch2 = new Stopwatch(); // Load Asl tracker settings. if (File.Exists(this.UserSettingsFile)) { this.settings = UserSettings.Load(this.UserSettingsFile); } else { this.settings = new UserSettings(); this.settings.Store(this.UserSettingsFile); } #endif }