private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            EventLogEditor      w = new EventLogEditor();
            EventLogEditorModel m = new EventLogEditorModel();

            w.ViewModel = m;

            if (w.ShowDialog() == true)
            {
                EventLogDescription nel = w.ViewModel.GetEventLog();
                this.Logs.Add(nel);
                this.eventLogsGrid.SelectedItem = nel;
            }
        }
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.eventLogsGrid.SelectedItem == null)
            {
                return;
            }

            EventLogEditor      w = new EventLogEditor();
            EventLogEditorModel m = new EventLogEditorModel();

            w.ViewModel = m;

            EventLogDescription c = (EventLogDescription)this.eventLogsGrid.SelectedItem;

            w.ViewModel.SetEventLog(c);

            if (w.ShowDialog() == true)
            {
                EventLogDescription nc = w.ViewModel.GetEventLog();
                this.Logs.Remove(c);
                this.Logs.Add(nc);
                this.eventLogsGrid.SelectedItem = nc;
            }
        }
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.eventLogsGrid.SelectedItem == null)
                return;

            EventLogEditor w = new EventLogEditor();
            EventLogEditorModel m = new EventLogEditorModel();
            w.ViewModel = m;

            EventLogDescription c = (EventLogDescription)this.eventLogsGrid.SelectedItem;
            w.ViewModel.SetEventLog(c);

            if (w.ShowDialog() == true)
            {
                EventLogDescription nc = w.ViewModel.GetEventLog();
                this.Logs.Remove(c);
                this.Logs.Add(nc);
                this.eventLogsGrid.SelectedItem = nc;
            }
        }
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            EventLogEditor w = new EventLogEditor();
            EventLogEditorModel m = new EventLogEditorModel();
            w.ViewModel = m;

            if (w.ShowDialog() == true)
            {
                EventLogDescription nel = w.ViewModel.GetEventLog();
                this.Logs.Add(nel);
                this.eventLogsGrid.SelectedItem = nel;
            }
        }