-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettingsPage.xaml
More file actions
92 lines (83 loc) · 4.12 KB
/
SettingsPage.xaml
File metadata and controls
92 lines (83 loc) · 4.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="DWT_REST_MAUI.SettingsPage"
xmlns:viewModels="clr-namespace:DWT_REST_MAUI.ViewModels"
x:DataType="viewModels:SettingsViewModel"
Title="Settings">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Save"
Order="Primary"
Command="{Binding SaveSettingsCommand}"
/>
</ContentPage.ToolbarItems>
<ScrollView>
<VerticalStackLayout Spacing="20" Padding="30">
<!-- License Input -->
<VerticalStackLayout Spacing="5">
<Label Text="License Key:" FontAttributes="Bold"/>
<Entry Placeholder="Enter your license key"
Text="{Binding LicenseKey}"/>
</VerticalStackLayout>
<!-- IP Address Input -->
<VerticalStackLayout Spacing="5">
<Label Text="IP Address:" FontAttributes="Bold"/>
<Entry Placeholder="Enter Web TWAIN service address"
Keyboard="Plain"
Text="{Binding IpAddress}"/>
<Button Text="{Binding FindServiceButtonText}" Command="{Binding FindServiceCommand}"></Button>
</VerticalStackLayout>
<!-- Scanner Dropdown -->
<VerticalStackLayout Spacing="5">
<Label Text="Scanner Model:" FontAttributes="Bold"/>
<Picker
ItemsSource="{Binding ScannerModels}"
SelectedItem="{Binding SelectedScannerModel}">
<Picker.Items>
</Picker.Items>
</Picker>
<Button Text="{Binding ReloadButtonText}" Command="{Binding LoadScannersCommand}"></Button>
</VerticalStackLayout>
<!-- DPI Radio Buttons -->
<VerticalStackLayout Spacing="5">
<Label Text="DPI:" FontAttributes="Bold"/>
<RadioButton GroupName="DpiGroup"
Content="150 DPI"
IsChecked="{Binding Is150Dpi}"/>
<RadioButton GroupName="DpiGroup"
Content="300 DPI"
IsChecked="{Binding Is300Dpi}"/>
<RadioButton GroupName="DpiGroup"
Content="600 DPI"
IsChecked="{Binding Is600Dpi}"/>
</VerticalStackLayout>
<!-- Color Mode Radio Buttons -->
<VerticalStackLayout Spacing="5">
<Label Text="Color Mode:" FontAttributes="Bold"/>
<RadioButton GroupName="ColorModeGroup"
Content="Black & White"
IsChecked="{Binding IsBlackWhite}"/>
<RadioButton GroupName="ColorModeGroup"
Content="Grayscale"
IsChecked="{Binding IsGrayscale}"/>
<RadioButton GroupName="ColorModeGroup"
Content="Color"
IsChecked="{Binding IsColor}"/>
</VerticalStackLayout>
<Label Text="Auto Feeder" FontAttributes="Bold"></Label>
<CheckBox IsChecked="{Binding AutoFeeder}" HorizontalOptions="Start"></CheckBox>
<Label Text="Duplex" FontAttributes="Bold"></Label>
<CheckBox IsChecked="{Binding Duplex}" HorizontalOptions="Start"></CheckBox>
<HorizontalStackLayout HorizontalOptions="Center" Spacing="20">
<!-- Save Button -->
<Button Text="Save Settings"
Command="{Binding SaveSettingsCommand}"
WidthRequest="200"/>
<!-- Reset Button -->
<Button Text="Reset Settings"
Command="{Binding ResetSettingsCommand}"
WidthRequest="200"/>
</HorizontalStackLayout>
</VerticalStackLayout>
</ScrollView>
</ContentPage>