Move settings and about to main screen
This commit is contained in:
@@ -341,11 +341,6 @@ class CreatePDFReportViewModel : BaseViewModel, ICanCheckShutdown, ILogger
|
|||||||
NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled));
|
NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowAbout()
|
|
||||||
{
|
|
||||||
DialogHost.Show(new AboutViewModel());
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task ShowSettings()
|
public async Task ShowSettings()
|
||||||
{
|
{
|
||||||
var updatedSettings = await DialogHost.Show(new SettingsViewModel(_settings, TopLevelGrabber));
|
var updatedSettings = await DialogHost.Show(new SettingsViewModel(_settings, TopLevelGrabber));
|
||||||
|
|||||||
@@ -131,6 +131,21 @@ class StartNewChooseReportViewModel : BaseViewModel, ICanCheckShutdown, IUpdateR
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ShowAbout()
|
||||||
|
{
|
||||||
|
DialogHost.Show(new AboutViewModel());
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task ShowSettings()
|
||||||
|
{
|
||||||
|
var updatedSettings = await DialogHost.Show(new SettingsViewModel(_settings, TopLevelGrabber));
|
||||||
|
if (updatedSettings != null)
|
||||||
|
{
|
||||||
|
_settings = (Settings)updatedSettings;
|
||||||
|
await _settings.SaveSettingsAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<bool> CheckIsSafeToShutdown()
|
public async Task<bool> CheckIsSafeToShutdown()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -15,20 +15,6 @@
|
|||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid ColumnDefinitions="*"
|
<Grid ColumnDefinitions="*"
|
||||||
RowDefinitions="Auto, 2*, Auto, Auto, *">
|
RowDefinitions="Auto, 2*, Auto, Auto, *">
|
||||||
<Button Command="{Binding ShowSettings}"
|
|
||||||
Grid.Row="0"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Margin="4,4,0,4">
|
|
||||||
<TextBlock><Run Text="" FontFamily="{StaticResource FontAwesomeSolid}"/> Settings</TextBlock>
|
|
||||||
</Button>
|
|
||||||
<Button Command="{Binding ShowAbout}"
|
|
||||||
Grid.Row="0"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Margin="0,4,4,4">
|
|
||||||
<TextBlock><Run Text="" FontFamily="{StaticResource FontAwesomeSolid}"/> About</TextBlock>
|
|
||||||
</Button>
|
|
||||||
<StackPanel Orientation="Vertical"
|
<StackPanel Orientation="Vertical"
|
||||||
Spacing="2"
|
Spacing="2"
|
||||||
Margin="0,4,0,0">
|
Margin="0,4,0,0">
|
||||||
|
|||||||
@@ -12,6 +12,22 @@
|
|||||||
x:DataType="vm:StartNewChooseReportViewModel">
|
x:DataType="vm:StartNewChooseReportViewModel">
|
||||||
<Grid ColumnDefinitions="100, *, 100"
|
<Grid ColumnDefinitions="100, *, 100"
|
||||||
RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, *">
|
RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, *">
|
||||||
|
<Button Command="{Binding ShowSettings}"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Margin="4,4,0,4">
|
||||||
|
<TextBlock><Run Text="" FontFamily="{StaticResource FontAwesomeSolid}"/> Settings</TextBlock>
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding ShowAbout}"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Margin="0,4,4,4">
|
||||||
|
<TextBlock><Run Text="" FontFamily="{StaticResource FontAwesomeSolid}"/> About</TextBlock>
|
||||||
|
</Button>
|
||||||
<TextBlock HorizontalAlignment="Center"
|
<TextBlock HorizontalAlignment="Center"
|
||||||
FontSize="36"
|
FontSize="36"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
|
|||||||
Reference in New Issue
Block a user