motorTest/FeiYu/MainWindow.xaml
2026-10-17 11:49:45 +08:00

78 lines
5.0 KiB
XML

<mah:MetroWindow x:Class="FeiYu.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Motion="clr-namespace:Views.Motion;assembly=Views"
xmlns:MyNamespace="clr-namespace:Views;assembly=Views"
xmlns:Vision="clr-namespace:Views.Vision;assembly=Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FeiYu"
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{Binding SystemPar.MachineName}"
Width="1920" Height="1080" Closing="MetroWindow_Closing"
Icon="Resources/logo1.ico"
WindowStartupLocation="CenterScreen" WindowState="Maximized"
mc:Ignorable="d">
<mah:MetroWindow.Background>
<!--<ImageBrush ImageSource="Resources/3.jpg"/>-->
<ImageBrush ImageSource="{Binding SystemPar.SystemBackgroundPath}" />
</mah:MetroWindow.Background>
<!-- FontFamily="方正宋一繁体" -->
<mah:MetroWindow.RightWindowCommands>
<mah:WindowCommands>
<!--<CheckBox Content="空跑模式" IsChecked="{Binding RunningMode}" />-->
<!--<ComboBox Grid.Row="4" Grid.Column="5" VerticalContentAlignment="Center" Margin="1" Text="请选择串口" ItemsSource="{Binding LightCOM.ComPortList}" SelectedItem="{Binding SerialProt}"/>-->
<Button Click="SubjectSwitch" Content="切换主题" />
<Button Click="BackgroundSwitch" Content="切换背景" />
<Menu Background="{x:Null}">
<MenuItem Background="{x:Null}" FontFamily="楷体" Foreground="White" Header="帮助">
<MenuItem Name="menSystemSet" Background="AliceBlue" Click="menSystemSet_Click" Foreground="Black" Header="{Binding PermissionButtonName}" />
<MenuItem Name="menPwdAlter" Background="AliceBlue" Click="menPwdAlter_Click" Foreground="Black" Header="修改密码" Visibility="{Binding AllVis}" />
<MenuItem Background="AliceBlue" Visibility="{Binding AllVis}" Command="{Binding CountClearedCommand}" Foreground="Black" Header="生产数据清零" />
<MenuItem Background="AliceBlue" Visibility="{Binding AllVis}" Command="{Binding ManulTest}" CommandParameter="手动贴左" Foreground="Black" Header="手动贴左" />
<MenuItem Background="AliceBlue" Visibility="{Binding AllVis}" Command="{Binding ManulTest}" CommandParameter="手动贴右" Foreground="Black" Header="手动贴右" />
<MenuItem Background="AliceBlue" Visibility="{Binding AllVis}" Command="{Binding ManulTest}" CommandParameter="手动检右" Foreground="Black" Header="手动检右" />
<MenuItem Background="AliceBlue" Visibility="{Binding AllVis}" Command="{Binding ManulTest}" CommandParameter="手动压合" Foreground="Black" Header="手动压合" />
<CheckBox Content="启用安全门" FontFamily="楷体" IsChecked="{Binding EnableAnquanmen}" Visibility="{Binding AllVis}" />
<ComboBox Height="26" VerticalAlignment="Center"
HorizontalContentAlignment="Center" Background="#4CFFFFFF"
DisplayMemberPath="MachineName"
ItemsSource="{Binding EnableMachineList}"
SelectedValue="{Binding CurrentMachineID}"
SelectedValuePath="ID" />
</MenuItem>
</Menu>
</mah:WindowCommands>
</mah:MetroWindow.RightWindowCommands>
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70*" />
<!--<ColumnDefinition Width="1"></ColumnDefinition>-->
<ColumnDefinition Width="{Binding GridWidth}" />
</Grid.ColumnDefinitions>
<TabControl Background="Transparent" ItemsSource="{Binding TabItemList}" SelectedItem="{Binding SelectTabItem}" />
<!--<GridSplitter Grid.Column="1" Background="Transparent"></GridSplitter>-->
<Border Grid.Column="2">
<!--<MyNamespace:ControlPanel />-->
</Border>
</Grid>
<!--<Grid Height="42" VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border Grid.Column="1" Height="42" Background="{Binding ShowStatu.StatusBackground}">
<TextBlock Text="{Binding ShowStatu.StatuInfo}" Tag="{Binding ShowStatu.StatuInfo}" FontSize="25" FontWeight="Bold" Foreground="{Binding ShowStatu.StatusForeground}" VerticalAlignment="Center" />
</Border>
</Grid>-->
</Grid>
</mah:MetroWindow>