Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertBeekman committed Feb 19, 2024
2 parents 00c510c + 9126601 commit c901bce
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
2 changes: 2 additions & 0 deletions src/Artemis.UI.Shared/Routing/Router/Router.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ private void MainWindowServiceOnMainWindowOpened(object? sender, EventArgs e)
{
if (_previousWindowRoute != null && _currentRouteSubject.Value == "blank")
Dispatcher.UIThread.InvokeAsync(async () => await Navigate(_previousWindowRoute, new RouterNavigationOptions {AddToHistory = false, EnableLogging = false}));
else if (_currentRouteSubject.Value == null || _currentRouteSubject.Value == "blank")
Dispatcher.UIThread.InvokeAsync(async () => await Navigate("home", new RouterNavigationOptions {AddToHistory = false, EnableLogging = true}));
}

private void MainWindowServiceOnMainWindowClosed(object? sender, EventArgs e)
Expand Down
6 changes: 3 additions & 3 deletions src/Artemis.UI/Screens/Root/RootViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ public RootViewModel(IRouter router,
registrationService.RegisterBuiltInDataModelDisplays();
registrationService.RegisterBuiltInDataModelInputs();
registrationService.RegisterBuiltInPropertyEditors();
_router.Navigate("home");
});
}

Expand Down Expand Up @@ -130,7 +128,9 @@ private bool ShouldShowUI()
bool minimized = Constants.StartupArguments.Contains("--minimized");
bool showOnAutoRun = _settingsService.GetSetting("UI.ShowOnStartup", true).Value;

return (autoRunning && showOnAutoRun) || !minimized;
if (autoRunning)
return showOnAutoRun;
return !minimized;
}

private void ShowSplashScreen()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,24 @@
<Button HorizontalAlignment="Center" Command="{CompiledBinding AddSubmission}">Submit new entry</Button>
</StackPanel>

<ScrollViewer IsVisible="{CompiledBinding Entries.Count}">
<ItemsControl ItemsSource="{CompiledBinding Entries}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<ContentControl Content="{CompiledBinding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
<StackPanel Spacing="15">
<Button HorizontalAlignment="Right" Command="{CompiledBinding AddSubmission}">Submit new entry</Button>
<ScrollViewer IsVisible="{CompiledBinding Entries.Count}">
<ItemsControl ItemsSource="{CompiledBinding Entries}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<ContentControl Content="{CompiledBinding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</ScrollViewer>
</StackPanel>

</Panel>
</Panel>

Expand Down

0 comments on commit c901bce

Please sign in to comment.