2025-10-04 18:42:12 +08:00
|
|
|
|
<UserControl
|
|
|
|
|
|
x:Class="DMS.WPF.Views.SettingView"
|
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
|
|
|
|
|
d:DesignHeight="450"
|
|
|
|
|
|
d:DesignWidth="800"
|
|
|
|
|
|
mc:Ignorable="d">
|
2025-07-06 11:09:57 +08:00
|
|
|
|
<StackPanel>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
|
|
|
|
|
<ui:SettingsExpander Description="通用程序行为设置" Header="通用设置">
|
2025-07-09 20:48:14 +08:00
|
|
|
|
<ui:SettingsExpander.HeaderIcon>
|
|
|
|
|
|
<ui:FontIcon Glyph="" />
|
|
|
|
|
|
</ui:SettingsExpander.HeaderIcon>
|
|
|
|
|
|
<ui:SettingsExpander.Items>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:SettingsCard Description="切换应用程序的主题" Header="主题切换">
|
|
|
|
|
|
<ComboBox
|
|
|
|
|
|
Width="120"
|
|
|
|
|
|
ItemsSource="{Binding Themes}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedTheme, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
2025-07-12 12:55:46 +08:00
|
|
|
|
</ui:SettingsCard>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:SettingsCard
|
|
|
|
|
|
Description="开启后,点击主窗口的关闭按钮会将程序最小化到系统通知栏,而不是直接退出。"
|
|
|
|
|
|
Header="点击关闭按钮时最小化到通知栏"
|
|
|
|
|
|
IsClickEnabled="True">
|
2025-07-09 20:48:14 +08:00
|
|
|
|
<ui:ToggleSwitch IsOn="{Binding MinimizeToTrayOnClose, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
|
</ui:SettingsCard>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:SettingsCard Description="设置变量的默认轮询间隔时间(毫秒)" Header="默认轮询间隔">
|
|
|
|
|
|
<TextBox Width="120" Text="{Binding DefaultPollingInterval, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
2025-10-02 12:35:42 +08:00
|
|
|
|
</ui:SettingsCard>
|
2025-07-09 20:48:14 +08:00
|
|
|
|
</ui:SettingsExpander.Items>
|
|
|
|
|
|
</ui:SettingsExpander>
|
2025-07-06 11:09:57 +08:00
|
|
|
|
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ui:SettingsExpander Description="设置要连接的数据库,数据全部在数据库中存放" Header="设置数据库">
|
2025-07-06 11:09:57 +08:00
|
|
|
|
<ui:SettingsExpander.HeaderIcon>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:FontIcon
|
|
|
|
|
|
FontFamily="{StaticResource MdFontIcons}"
|
|
|
|
|
|
FontSize="18"
|
|
|
|
|
|
Glyph="󰆼" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsExpander.HeaderIcon>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<Button
|
|
|
|
|
|
Margin="0,10,0,0"
|
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
|
Command="{Binding TestConnectionCommand}"
|
|
|
|
|
|
Content="测试连接"
|
|
|
|
|
|
Style="{StaticResource AccentButtonStyle}" />
|
|
|
|
|
|
|
2025-07-06 11:09:57 +08:00
|
|
|
|
<ui:SettingsExpander.Items>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:SettingsCard Description="使用的数据库类型,如Mysql,SqlServer等" Header="数据库类型">
|
|
|
|
|
|
<ComboBox
|
|
|
|
|
|
MinWidth="200"
|
|
|
|
|
|
ItemsSource="{Binding AvailableDbTypes}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedDbType}" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsCard>
|
|
|
|
|
|
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:SettingsCard Description="数据库所在电脑的地址" Header="服务器地址">
|
|
|
|
|
|
<TextBox MinWidth="200" Text="{Binding Server, UpdateSourceTrigger=PropertyChanged}" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsCard>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Description="数据库服务器端口号" Header="服务器端口">
|
|
|
|
|
|
<TextBox MinWidth="200" Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsCard>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Description="数据库登录用户名" Header="用户名">
|
|
|
|
|
|
<TextBox MinWidth="200" Text="{Binding UserId, UpdateSourceTrigger=PropertyChanged}" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsCard>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Description="数据库登录密码" Header="密码">
|
|
|
|
|
|
<TextBox MinWidth="200" Text="{Binding Password, UpdateSourceTrigger=PropertyChanged}" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsCard>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
|
|
|
|
|
<ui:SettingsCard Description="要连接的数据库名称" Header="数据库名称">
|
|
|
|
|
|
<TextBox MinWidth="200" Text="{Binding DbName, UpdateSourceTrigger=PropertyChanged}" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsCard>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
2025-07-06 11:09:57 +08:00
|
|
|
|
|
|
|
|
|
|
</ui:SettingsExpander.Items>
|
|
|
|
|
|
|
|
|
|
|
|
</ui:SettingsExpander>
|
|
|
|
|
|
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:SettingsExpander>
|
2025-07-06 11:09:57 +08:00
|
|
|
|
<ui:SettingsExpander.HeaderIcon>
|
2025-10-04 18:42:12 +08:00
|
|
|
|
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ScreenTime}" />
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</ui:SettingsExpander.HeaderIcon>
|
|
|
|
|
|
</ui:SettingsExpander>
|
|
|
|
|
|
|
2025-10-04 18:42:12 +08:00
|
|
|
|
|
2025-07-06 11:09:57 +08:00
|
|
|
|
</StackPanel>
|
2025-06-23 17:01:06 +08:00
|
|
|
|
</UserControl>
|