public MainForm(IAboutBox aboutBox, ILogger logger, CurrentDataDevice dataDevice, WinformsMainMenuExtender mainMenuExtender, IEnumerable<IStatusbarExtension> statusbarExtensions, IEnumerable<IToolbarExtension> toolbarExtensions) { _aboutBox = aboutBox; _logger = logger; _mainMenuExtender = mainMenuExtender; _statusbarExtensions = statusbarExtensions; _toolbarExtensions = toolbarExtensions; _currentDataDevice = dataDevice; _currentDataDevice.PropertyChanged += (sender, args) => { var oldDataDevice = _dataDevice; _dataDevice = _currentDataDevice.CurrentDevice; if (_dataDevice != null) { _dataDevice.PropertyChanged += DataDeviceOnPropertyChanged; _dataDevice.DataReceived += DataDeviceOnDataReceived; } if (oldDataDevice != null) { oldDataDevice.PropertyChanged -= DataDeviceOnPropertyChanged; oldDataDevice.DataReceived -= DataDeviceOnDataReceived; } }; _dataDevice = _currentDataDevice.CurrentDevice; LogTo.Debug("Mainform object created"); }
protected SerialStatusBarExtension(ISerialPort iSerialPort, CurrentDataDevice currentDataDevice) { _serialPort = iSerialPort; _serialPort.PropertyChanged += (sender, args) => UpdateStatusBarItem(); _currentDataDevice = currentDataDevice; _currentDataDevice.PropertyChanged += (sender, args) => UpdateVisibility(); }
public DeviceSelectionMenu(IDataDevice dataDevice, CurrentDataDevice terminal) { _dataDevice = dataDevice; _terminal = terminal; _dataDevice.PropertyChanged += (sender, args) => UpdateCheckedStates(args.PropertyName); }
public PortMenu(ISerialPort serialPort, CurrentDataDevice terminal) : base(serialPort) { _dataDevice = terminal; }
public SerialStatusbarBaudMenu(ISerialPort serialPort, CurrentDataDevice currentDataDevice) : base(serialPort, currentDataDevice) { _baudRates = new List<int>(new[] { 110, 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 }); }
public SerialStatusbarStatusLabel(ISerialPort serialPort, CurrentDataDevice currentDataDevice) : base(serialPort, currentDataDevice) { }
public SerialStatusbarPortMenu(ISerialPort iSerialPort, CurrentDataDevice currentDataDevice) : base(iSerialPort, currentDataDevice) { }