alielie
2025-03-03 4c3eb7f334abb8129b57e86f2935d75d0b3070b4
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
<UserControl x:Class="HMI.SettingControl.SystemConfig"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:HMI.SettingControl"
            xmlns:pw="https://opensource.panuon.com/wpf"
            xmlns:pu="https://opensource.panuon.com/wpf-ui"
             xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
            mc:Ignorable="d" 
            Background="#FFF"
            d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <pu:StyleDictionary Includes="TabControl" />
                <ResourceDictionary Source="/HMI.UI;component/Style/PanuonResource.xaml"/>
                <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
            </ResourceDictionary.MergedDictionaries>
 
            <uic:PathImageConverter x:Key="path2Image"/>
            <uic:DataGridRowNumberConverter x:Key="rowNumber"/>
        </ResourceDictionary>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <GroupBox Header="基础设置" Padding="10">
            <StackPanel>
                <pu:FormGroup Header="Logo" GroupName="MyFormGroup">
                    <TextBox Text="{Binding LogoPath}"/>
                </pu:FormGroup>
 
                <pu:FormGroup Header="标题" GroupName="MyFormGroup">
                    <TextBox Text="{Binding WindowTitle}"/>
                </pu:FormGroup>
            </StackPanel>
        </GroupBox>
 
        <GroupBox Grid.Row="1"  Header="PLC设置" Padding="10">
            <StackPanel>
                <pu:FormGroup Header="PLC Ip" GroupName="MyFormGroup">
                    <TextBox Text="{Binding PlcIp}"/>
                </pu:FormGroup>
 
                <pu:FormGroup Header="是否启用" GroupName="MyFormGroup">
                    <CheckBox IsChecked="{Binding PlcEnabled,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
                </pu:FormGroup>
            </StackPanel>
        </GroupBox>
    </Grid>
</UserControl>