WIP: Add iOS version #10

Draft
Deadpikle wants to merge 67 commits from feature/ios into main
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 71ca0c6459 - Show all commits
@@ -112,9 +112,15 @@ class CreatePDFReportViewModel : BaseViewModel, ICanCheckShutdown, ILogger
NotifyPropertyChanged(); NotifyPropertyChanged();
NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled)); NotifyPropertyChanged(nameof(IsCreatePDFButtonEnabled));
NotifyPropertyChanged(nameof(CanAddItem)); NotifyPropertyChanged(nameof(CanAddItem));
NotifyPropertyChanged(nameof(IsSaveButtonAccentOn));
} }
} }
public bool IsSaveButtonAccentOn
{
get => !_isCreatingPDF && HasUnsavedWork;
}
public bool IsCreatePDFButtonEnabled public bool IsCreatePDFButtonEnabled
{ {
get => !_isCreatingPDF && _pdfReport.Files.Count > 0; get => !_isCreatingPDF && _pdfReport.Files.Count > 0;
@@ -133,6 +139,7 @@ class CreatePDFReportViewModel : BaseViewModel, ICanCheckShutdown, ILogger
{ {
_hasUnsavedWork = value; _hasUnsavedWork = value;
NotifyPropertyChanged(); NotifyPropertyChanged();
NotifyPropertyChanged(nameof(IsSaveButtonAccentOn));
} }
} }
@@ -222,7 +222,7 @@
Spacing="4"> Spacing="4">
<Button Command="{Binding AddItem}" <Button Command="{Binding AddItem}"
IsEnabled="{Binding CanAddItem}"> IsEnabled="{Binding CanAddItem}">
<TextBlock><Run Text="&#x002b;" FontFamily="{StaticResource FontAwesomeSolid}"/> Add Item(s)</TextBlock> <TextBlock><Run Text="&#x002b;" FontFamily="{StaticResource FontAwesomeSolid}"/> Add Item(s)...</TextBlock>
</Button> </Button>
<Button Command="{Binding RemoveAllItems}" <Button Command="{Binding RemoveAllItems}"
IsEnabled="{Binding IsCreatePDFButtonEnabled}" IsEnabled="{Binding IsCreatePDFButtonEnabled}"
@@ -234,6 +234,7 @@
<TextBlock><Run Text="&#xf162;" FontFamily="{StaticResource FontAwesomeSolid}"/> Re-sort PDF Items</TextBlock> <TextBlock><Run Text="&#xf162;" FontFamily="{StaticResource FontAwesomeSolid}"/> Re-sort PDF Items</TextBlock>
</Button> </Button>
<Button Command="{Binding SaveInterimReportInfo}" <Button Command="{Binding SaveInterimReportInfo}"
Classes.accent="{Binding IsSaveButtonAccentOn}"
IsEnabled="{Binding !IsCreatingPDF}"> IsEnabled="{Binding !IsCreatingPDF}">
<TextBlock><Run Text="&#xf0c7;" FontFamily="{StaticResource FontAwesomeSolid}"/> Save Report Info</TextBlock> <TextBlock><Run Text="&#xf0c7;" FontFamily="{StaticResource FontAwesomeSolid}"/> Save Report Info</TextBlock>
</Button> </Button>