diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common')
2 files changed, 20 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs index 41b362889..b8ebe9f6a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/HiveColorPickerControl.xaml.cs @@ -93,7 +93,10 @@ namespace Tango.MachineStudio.Common.Controls private void HiveCombo_HiveGenerated(object sender, EventArgs e) { - hiveCombo.GenerateDemoModeHiveColors(SelectedColor.Value); + if (SelectedColor.HasValue) + { + hiveCombo.GenerateDemoModeHiveColors(SelectedColor.Value); + } } private void OnSelectedHiveColorChanged() diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs index f3ae1002b..0a4af6218 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/EventLogging/DefaultEventLogger.cs @@ -120,6 +120,8 @@ namespace Tango.MachineStudio.Common.EventLogging { machine.MachineEventsStateProvider.NewEvents -= MachineEventsStateProvider_NewEvents; machine.MachineEventsStateProvider.NewEvents += MachineEventsStateProvider_NewEvents; + machine.MachineEventsStateProvider.EventsResolved -= MachineEventsStateProvider_EventsResolved; + machine.MachineEventsStateProvider.EventsResolved += MachineEventsStateProvider_EventsResolved; } machine.RequestSent -= Machine_RequestSent; @@ -175,6 +177,19 @@ namespace Tango.MachineStudio.Common.EventLogging } } + /// <summary> + /// Handles the connected machine events state provider EventsResolved event. + /// </summary> + /// <param name="sender">The sender.</param> + /// <param name="events">The events.</param> + private void MachineEventsStateProvider_EventsResolved(object sender, IEnumerable<MachinesEvent> events) + { + foreach (var ev in events) + { + Log(String.Format("Event '{0}' resolved.", ev.EventType.Name)); + } + } + #endregion #region Logging @@ -206,7 +221,7 @@ namespace Tango.MachineStudio.Common.EventLogging } LogManager.Log("Logging event " + machineEvent.EventType.Name + " - " + machineEvent.Description); - machineEvent.MachineGuid = _application.ConnectedMachine.Guid; + machineEvent.MachineGuid = _application.ConnectedMachine.Machine.Guid; machineEvent.UserGuid = _authentication.CurrentUser.Guid; machineEvent.User = _authentication.CurrentUser; _events.Enqueue(machineEvent); |
