WIP: Add iOS version #10

Draft
Deadpikle wants to merge 67 commits from feature/ios into main
4 changed files with 31 additions and 19 deletions
Showing only changes of commit d99fefe74d - Show all commits
@@ -340,11 +340,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()
{ {
@@ -130,6 +130,21 @@ class StartNewChooseReportViewModel : BaseViewModel, ICanCheckShutdown, IUpdateR
await _settings.SaveSettingsAsync(); // update saved items list await _settings.SaveSettingsAsync(); // update saved items list
} }
} }
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()
{ {
@@ -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="&#xf013;" 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="&#xf059;" 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="&#xf013;" 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="&#xf059;" FontFamily="{StaticResource FontAwesomeSolid}"/> About</TextBlock>
</Button>
<TextBlock HorizontalAlignment="Center" <TextBlock HorizontalAlignment="Center"
FontSize="36" FontSize="36"
FontWeight="Bold" FontWeight="Bold"