From cf05045448915e52fec9aff459b8e3b4da3fe31c Mon Sep 17 00:00:00 2001 From: watsonb8 Date: Tue, 10 Dec 2019 15:10:27 -0500 Subject: [PATCH] Progress --- .../Components/DataGrid/DataGrid.xaml.cs | 18 ++- .../Components/HostSelector/HostSelector.xaml | 37 ------ .../HostSelector/HostSelector.xaml.cs | 121 ------------------ .../Design/Components/Library/Library.xaml.cs | 65 ++++++++-- Aurora/Design/Views/BaseDialogViewModel.cs | 2 +- Aurora/Design/Views/DialogReturnObject.cs | 7 - Aurora/Design/Views/MainView/MainView.xaml | 3 +- Aurora/Design/Views/MainView/MainView.xaml.cs | 3 +- .../Party/NewPartyDialog/ConnectionDetails.cs | 2 +- Aurora/Design/Views/Party/PartyView.xaml | 7 +- Aurora/Design/Views/Party/PartyViewModel.cs | 70 ++++------ 11 files changed, 98 insertions(+), 237 deletions(-) delete mode 100644 Aurora/Design/Components/HostSelector/HostSelector.xaml delete mode 100644 Aurora/Design/Components/HostSelector/HostSelector.xaml.cs delete mode 100644 Aurora/Design/Views/DialogReturnObject.cs diff --git a/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs b/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs index aba83ea..35eafee 100644 --- a/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs +++ b/Aurora/Design/Components/DataGrid/DataGrid.xaml.cs @@ -99,10 +99,24 @@ namespace Aurora.Design.Components.DataGrid self._noDataView.IsVisible = false; } }); - void HandleItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - InternalItems = new List(((IEnumerable)sender).Cast()); + // InternalItems = new List(((IEnumerable)sender).Cast()); + if (e.NewItems != null) + { + foreach (object item in e.NewItems) + { + InternalItems.Add(item); + } + } + + if (e.OldItems != null) + { + foreach (object item in e.OldItems) + { + InternalItems.Remove(item); + } + } if (SelectedItem != null && !InternalItems.Contains(SelectedItem)) SelectedItem = null; } diff --git a/Aurora/Design/Components/HostSelector/HostSelector.xaml b/Aurora/Design/Components/HostSelector/HostSelector.xaml deleted file mode 100644 index 931ce04..0000000 --- a/Aurora/Design/Components/HostSelector/HostSelector.xaml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - -