public LPTLCDTestForm(ModuleConfiguration configuration) { _port = new LPTPort(configuration.LPTAddress); InitializeComponent(); if (configuration.LCD1.Enabled) { configuration.LCD1.Device = this; configuration.LCD1.Initialize(); DataGridViewRow row = new DataGridViewRow(); row.Tag = configuration.LCD1; row.CreateCells(dataGridView1, configuration.LCD1.Description, "On", "Clear", "Off"); dataGridView1.Rows.Add(row); } if (configuration.LCD2.Enabled) { configuration.LCD2.Device = this; configuration.LCD2.Initialize(); DataGridViewRow row = new DataGridViewRow(); row.Tag = configuration.LCD2; row.CreateCells(dataGridView1, configuration.LCD2.Description, "On", "Clear", "Off"); dataGridView1.Rows.Add(row); } foreach (LPTLCDArea area in configuration.Areas) { DataGridViewRow row = new DataGridViewRow(); row.Tag = area; row.CreateCells(dataGridView2, area.ID, ""); dataGridView2.Rows.Add(row); } }
public void Start(HomeSimCockpitSDK.StartStopType startType) { _working = true; _queue.Clear(); if (_registered.Count > 0) { _port = new LPTPort(_configuration.LPTAddress); _configuration.LCD1.Device = this; if (_configuration.LCD1.Enabled) { _configuration.LCD1.Initialize(); } _configuration.LCD2.Device = this; if (_configuration.LCD2.Enabled) { _configuration.LCD2.Initialize(); } _thread = new Thread(new ThreadStart(ProcessingThread)); _thread.Start(); } }
public Device(int lptAddress) { _port = new LPTPort(lptAddress); }