Feiyu/FeiYu/MainWindow.xaml
2025-12-10 17:55:48 +08:00

65 lines
4.2 KiB
XML

<mah:MetroWindow xmlns:Vision="clr-namespace:Views.Vision;assembly=Views" x:Class="FeiYu.MainWindow"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:MyNamespace="clr-namespace:Views;assembly=Views"
xmlns:Motion="clr-namespace:Views.Motion;assembly=Views"
xmlns:local="clr-namespace:FeiYu"
mc:Ignorable="d"
Title="{Binding SystemPar.MachineName}" Height="1080" Width="1920" WindowStartupLocation="CenterScreen" Icon="Resources/logo1.ico" WindowState="Maximized" Closing="MetroWindow_Closing">
<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 CurrentMachine.RunningMode}"></CheckBox>
<!--<CheckBox Content="联机空跑" IsChecked="{Binding RunningModePlas}"></CheckBox>-->
<!--<ComboBox Grid.Row="4" Grid.Column="5" VerticalContentAlignment="Center" Margin="1" Text="请选择串口" ItemsSource="{Binding LightCOM.ComPortList}" SelectedItem="{Binding SerialProt}"/>-->
<Button Content="切换主题" Click="SubjectSwitch" ></Button>
<Button Content="切换背景" Click="BackgroundSwitch" ></Button>
<Menu Background="{x:Null}">
<MenuItem Header="帮助" FontFamily="楷体" Background="{x:Null}" Foreground="White">
<MenuItem Name="menSystemSet" Header="{Binding PermissionButtonName}" Click="menSystemSet_Click" Background="AliceBlue" Foreground="Black"/>
<MenuItem Name="menPwdAlter" Header="修改密码" Click="menPwdAlter_Click" Background="AliceBlue" Visibility="{Binding AllVis}" Foreground="Black"/>
<MenuItem Header="生产数据清零" Background="AliceBlue" Foreground="Black" Visibility="{Binding AllVis}" Command="{Binding CountClearedCommand}"/>
<!--<CheckBox Content="不进行MES验证" IsChecked="{Binding MesCheck}" FontFamily="楷体"></CheckBox>
<CheckBox Content="不上传数据" IsChecked="{Binding NoUpData}" FontFamily="楷体"></CheckBox>-->
<ComboBox Background="#4CFFFFFF" ItemsSource="{Binding EnableMachineList}" DisplayMemberPath="MachineName" SelectedValuePath="ID" SelectedValue="{Binding CurrentMachineID}" VerticalAlignment="Center" HorizontalContentAlignment="Center" Height="26" ></ComboBox>
</MenuItem>
</Menu>
</mah:WindowCommands>
</mah:MetroWindow.RightWindowCommands>
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="70*"></ColumnDefinition>
<!--<ColumnDefinition Width="1"></ColumnDefinition>-->
<ColumnDefinition Width="{Binding GridWidth}"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TabControl Background="Transparent" ItemsSource="{Binding TabItemList}" SelectedItem="{Binding SelectTabItem}"></TabControl>
<!--<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>