2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 08:23:42 -04:00

Export, plugin archive install, and herald cache race condition fixes (#82)

* WIP: Grid export and plugin extraction

* Tweak export process

* Check for recursion of the same assembly load.

* Individual screens aren't always primary?

* Wait for cache to be writable

* Export selection only.

* Update built xml docs

* Ignore invalid archives.

* Need to ensure task is started.
This commit is contained in:
Jonathan Miller
2022-05-09 11:11:57 -02:30
committed by GitHub
parent a67cf7f6bb
commit fb45b5c3e2
10 changed files with 227 additions and 26 deletions

View File

@ -82,10 +82,11 @@ namespace Observatory.UI.Views
SelectionMode = DataGridSelectionMode.Extended,
GridLinesVisibility = DataGridGridLinesVisibility.Vertical,
AutoGenerateColumns = true,
IsReadOnly = true,
IsReadOnly = true
};
dataGrid.AutoGeneratingColumn += ColumnGeneration;
dataGrid.DataContextChanged += OnDataContextSet;
dataGrid.SelectionChanged += OnSelectionChanged;
uiPanel.Children.Clear();
uiPanel.Children.Add(dataGrid);
break;
@ -103,6 +104,12 @@ namespace Observatory.UI.Views
}
}
private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
((Observatory.UI.ViewModels.BasicUIViewModel)dataGrid.DataContext).SelectedItems = dataGrid.SelectedItems;
}
private void OnDataContextSet(object sender, EventArgs e)
{
if (UIType != PluginUI.UIType.Basic || !(sender is DataGrid)) return;

View File

@ -73,6 +73,14 @@
Cursor="Hand">
Update Available
</Button>
<Button
Name="export"
Margin="10"
FontSize="15"
Command="{Binding ExportGrid}"
Content="Export">
Export
</Button>
<Button
Name="ToggleMonitor"
Margin="10"

View File

@ -130,7 +130,10 @@ namespace Observatory.UI.Views
int corner = Properties.Core.Default.NativeNotifyCorner;
if (screen == -1 || screen > Screens.All.Count)
screenBounds = Screens.Primary.Bounds;
if (Screens.All.Count == 1)
screenBounds = Screens.All[0].Bounds;
else
screenBounds = Screens.Primary.Bounds;
else
screenBounds = Screens.All[screen - 1].Bounds;