Fix enabled/disabled on buttons

This commit is contained in:
2026-02-16 19:33:30 +09:00
parent be17639e18
commit 4855954b59
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -292,6 +292,7 @@ class MainViewModel : BaseViewModel, IFontResolver
LogInfo(e.InnerException.StackTrace); LogInfo(e.InnerException.StackTrace);
} }
} }
LogInfo("Please report this error to a programmer or fix the issue listed above.");
} }
} }
} }
+4 -4
View File
@@ -19,7 +19,7 @@
HorizontalAlignment="Center"/> HorizontalAlignment="Center"/>
<Button Content="Choose Receipt Folder" <Button Content="Choose Receipt Folder"
Command="{Binding ChooseFolder}" Command="{Binding ChooseFolder}"
IsEnabled="{Binding !IsCreatingPDF}" /> IsEnabled="{Binding IsCreatePDFButtonEnabled}" />
<Label Content="Report Title" <Label Content="Report Title"
IsVisible="{Binding IsTitleBoxVisible}" /> IsVisible="{Binding IsTitleBoxVisible}" />
<TextBox Text="{Binding ReportTitle}" <TextBox Text="{Binding ReportTitle}"
@@ -128,15 +128,15 @@
<StackPanel Orientation="Horizontal" <StackPanel Orientation="Horizontal"
Spacing="4"> Spacing="4">
<Button Command="{Binding AddItem}" <Button Command="{Binding AddItem}"
IsEnabled="{Binding IsTitleBoxVisible}"> IsEnabled="{Binding IsCreatePDFButtonEnabled}">
<TextBlock><Run Text="&#x002b;" FontFamily="{StaticResource FontAwesomeSolid}"/> Add Item</TextBlock> <TextBlock><Run Text="&#x002b;" FontFamily="{StaticResource FontAwesomeSolid}"/> Add Item</TextBlock>
</Button> </Button>
<Button Command="{Binding SaveInterimReportInfo}" <Button Command="{Binding SaveInterimReportInfo}"
IsEnabled="{Binding IsTitleBoxVisible}"> IsEnabled="{Binding IsCreatePDFButtonEnabled}">
<TextBlock><Run Text="&#xf0c7;" FontFamily="{StaticResource FontAwesomeSolid}"/> Save Report Info</TextBlock> <TextBlock><Run Text="&#xf0c7;" FontFamily="{StaticResource FontAwesomeSolid}"/> Save Report Info</TextBlock>
</Button> </Button>
<Button Command="{Binding ResortPDFItemsByDate}" <Button Command="{Binding ResortPDFItemsByDate}"
IsEnabled="{Binding IsTitleBoxVisible}"> IsEnabled="{Binding IsCreatePDFButtonEnabled}">
<TextBlock><Run Text="&#xf162;" FontFamily="{StaticResource FontAwesomeSolid}"/> Resort PDF Items</TextBlock> <TextBlock><Run Text="&#xf162;" FontFamily="{StaticResource FontAwesomeSolid}"/> Resort PDF Items</TextBlock>
</Button> </Button>
<Button Command="{Binding BuildPDF}" <Button Command="{Binding BuildPDF}"