private void OnAttach() { loki = host.GetLokiInfo(); loki.PropertyChanged += loki_PropertyChanged; foreach (BoardInfo plank in host.GetPlankInfo()) { loki.Planks.Add(plank); plank.PropertyChanged += plank_PropertyChanged; } }
public LokiInfo GetLokiInfo() { HIDCommunicationsChannel channel = this._channel as HIDCommunicationsChannel; LokiInfo loki = new LokiInfo( string.Format("{0} {1} [{2:X}, {3:X}]", channel.Device.Manufacturer, channel.Device.Product, channel.Device.VendorID, channel.Device.ProductID), string.Format("{0:X}.{1:X}", this.SiliconId, this.SiliconRev), this.bootloaderVersion, LOKI_EEPROM_ADDR); try { loki.Deserialize(this.OpenEEPROM(LOKI_EEPROM_ADDR, 65536)); } catch (BoardInfoFormatException) { } return loki; }
public LokiInfo GetLokiInfo() { HIDCommunicationsChannel channel = this._channel as HIDCommunicationsChannel; LokiInfo loki = new LokiInfo( string.Format("{0} {1} [{2:X}, {3:X}]", channel.Device.Manufacturer, channel.Device.Product, channel.Device.VendorID, channel.Device.ProductID), string.Format("{0:X}.{1:X}", this.SiliconId, this.SiliconRev), this.bootloaderVersion, LOKI_EEPROM_ADDR); try { loki.Deserialize(this.OpenEEPROM(LOKI_EEPROM_ADDR, 65536)); } catch (BoardInfoFormatException) { } return(loki); }
public LokiPanel(LokiInfo lokiInfo) { InitializeComponent(); this.lokiInfo = lokiInfo; boardInfoBindingSource.DataSource = lokiInfo; }