private void btnAdd_Click(object sender, RoutedEventArgs e) { if (AddEventType == EventType.UNKNOWN) { return; } EventDefinitionChild eventDef = new EventDefinitionChild(AddEventType, AddIsRecursive, LogEvents); EventDefinitions.Add(eventDef); AddEventType = EventType.UNKNOWN; AddIsRecursive = false; }
public InspectWindow(MainWindow window) { InitializeComponent(); CalculateStartupLocation(); GetSettings(); this.DataContext = this; MainWindow = window; MainWindow.Tracker.TrackingEvents.ToList().ForEach(i => EventDefinitions.Add(EventDefinitionChild.CastOrCreate(i))); EventDefinitions.CollectionChanged += EventDefinitions_CollectionChanged; Config.Instance.Log += LogEvents; EventProcessing.Instance.ProcessingStarted += LogEvents; EventProcessing.Instance.ProcessingFinished += LogEvents; }