Package updates & added quickbooks path selection.

This commit is contained in:
Patrick Fic
2020-11-24 15:21:07 -08:00
parent 7967032fae
commit d75f6d414c
9 changed files with 131 additions and 54 deletions

View File

@@ -1,17 +1,18 @@
<Window x:Class="BodyshopPartner.Views.Main"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BodyshopPartner.Views"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:p="clr-namespace:BodyshopPartner.Properties"
xmlns:properties="clr-namespace:BodyshopPartner.Properties"
xmlns:util="clr-namespace:BodyshopPartner.Utils"
xmlns:vm="clr-namespace:BodyshopPartner.ViewModels"
mc:Ignorable="d"
Title="{x:Static p:Resources.Title_Main}"
Height="450"
xmlns:vm="clr-namespace:BodyshopPartner.ViewModels"
Width="800"
xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:p="clr-namespace:BodyshopPartner.Properties"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
@@ -20,8 +21,6 @@
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}"
Loaded="Window_Loaded"
xmlns:util="clr-namespace:BodyshopPartner.Utils"
xmlns:properties="clr-namespace:BodyshopPartner.Properties"
Closing="Window_Closing">
<Window.DataContext>
<vm:MainViewModel />
@@ -109,6 +108,7 @@
</tb:TaskbarIcon>
<StackPanel DockPanel.Dock="Right">
<ComboBox ItemsSource="{Binding ShopData}"
Margin="8"
SelectedItem="{Binding ActiveShop}"
@@ -121,7 +121,10 @@
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
</ComboBox>
<Separator />
<CheckBox IsChecked="{Binding Source={x:Static p:Settings.Default}, Path=AutoStartMonitor}"
Margin="8"
Content="{x:Static p:Resources.Label_AutoStartMonitor}" />
<Button Command="{Binding AddMonitoringPathCommand, UpdateSourceTrigger=PropertyChanged}"
Margin="8"
ToolTip="{x:Static p:Resources.Label_AddMonitoringPath}"
@@ -132,22 +135,28 @@
<Button Command="{Binding StopFolderMonitorsCommand, UpdateSourceTrigger=PropertyChanged}"
Margin="8"
Content="{x:Static p:Resources.Label_StopAllMonitors}" />
<CheckBox IsChecked="{Binding Source={x:Static p:Settings.Default}, Path=AutoStartMonitor}"
Margin="8"
Content="{x:Static p:Resources.Label_AutoStartMonitor}" />
<Button Command="{Binding StopFolderMonitorsCommand, UpdateSourceTrigger=PropertyChanged}"
Margin="8"
Content="{x:Static p:Resources.Label_StopAllMonitors}" />
<Separator />
<Button Command="{Binding BrowseForQbFolderCommand, UpdateSourceTrigger=PropertyChanged}"
Margin="8"
Content="{x:Static p:Resources.Label_BrowseForQb}" />
<Separator />
<Button DockPanel.Dock="Top"
Margin="8"
Command="{Binding TestCommand}"
Content="_TEST" />
Background="Tomato"
Content="_TEST COMMAND" />
</StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<DataGrid Grid.Column="0"
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<DataGrid Grid.Row="0"
ItemsSource="{Binding MonitoringPaths}"
AutoGenerateColumns="False"
VerticalContentAlignment="Center"
@@ -206,16 +215,18 @@
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Column="1"
<DockPanel Grid.Row="1"
Height="Auto">
<TextBox Text="{Binding Source={x:Static properties:Settings.Default},
<TextBox DockPanel.Dock="Top" Text="{Binding Source={x:Static properties:Settings.Default},
Path=QuickBooksFilePath}"
materialDesign:HintAssist.Hint="QuickBooks File Path" TextChanged="TextBox_TextChanged"/>
materialDesign:HintAssist.Hint="{x:Static p:Resources.Label_QbFilePath}" TextChanged="TextBox_TextChanged"/>
<TextBox Height="Auto"
materialDesign:HintAssist.Hint="{x:Static p:Resources.Label_InteractionLog}"
Text="{Binding HttpServerLog}"
TextWrapping="Wrap"
IsReadOnly="True"
AcceptsReturn="True" />
</StackPanel>
</DockPanel>
</Grid>