change -修改其他页

dev_caoql
frankiecao 7 months ago
commit 515200dc49

@ -169,5 +169,4 @@
</Border> </Border>
</Grid> </Grid>
</Border> </Border>
</Window> </Window>

@ -184,23 +184,10 @@
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0"> <Border Grid.Row="0" Grid.Column="0">
<TextBlock Text="取气缸1" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock> <TextBlock Text="取气缸1" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border> </Border>
<Border Grid.Row="0" Grid.Column="1"> <Border Grid.Row="0" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21"> <Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<!--<Button.Style>
<Style TargetType="{x:Type Button}}">
<Setter Property="AllowDrop">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border" CornerRadius="8" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>-->
<Button.Background> <Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/> <GradientStop Color="#FF0047E2" Offset="1"/>
@ -209,10 +196,218 @@
</Button.Background> </Button.Background>
</Button> </Button>
</Border> </Border>
<Border Grid.Row="0" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="吸料气缸1" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="取料气缸2" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="2" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="3" Grid.Column="0">
<TextBlock Text="吸料气缸2" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="3" Grid.Column="1">
<Button Content="上升" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="3" Grid.Column="2">
<Button Content="下降" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="4" Grid.Column="0">
<TextBlock Text="旋转电机" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="4" Grid.Column="1">
<Button Content="正转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="4" Grid.Column="2">
<Button Content="反转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="5" Grid.Column="0">
<TextBlock Text="层合电机" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="5" Grid.Column="1">
<Button Content="正转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="5" Grid.Column="2">
<Button Content="反转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
</Grid> </Grid>
</Border> </Border>
<Border Grid.Column="1"> <Border Grid.Column="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0">
<TextBlock Text="供料电机" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="0" Grid.Column="1">
<Button Content="正转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="0" Grid.Column="2">
<Button Content="反转" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="上胶辊气缸" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="1">
<Button Content="前进" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="1" Grid.Column="2">
<Button Content="回收" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="下胶辊气缸" VerticalAlignment="Center" HorizontalAlignment ="Center" FontSize="21"></TextBlock>
</Border>
<Border Grid.Row="2" Grid.Column="1">
<Button Content="前进" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF0047E2" Offset="1"/>
<GradientStop Color="#FF00A3FF" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
<Border Grid.Row="2" Grid.Column="2">
<Button Content="回收" Foreground="White" FontSize="21" Style="{StaticResource BUTTON_AGREE}" Margin="6" >
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFF4A00" Offset="1"/>
<GradientStop Color="#FFFFCB00" Offset="0"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</Border>
</Grid>
</Border> </Border>
</Grid> </Grid>
</Border> </Border>

@ -131,7 +131,7 @@
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">
<Border Name="bdr" CornerRadius="3" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1"> <Border Name="bdr" CornerRadius="4" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1">
<!--可使用ContentPresenter代替--> <!--可使用ContentPresenter代替-->
<!--Foreground的值White可以替换为{TemplateBinding Foreground}--> <!--Foreground的值White可以替换为{TemplateBinding Foreground}-->
<Label VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Foreground="White" Content="{TemplateBinding Content}"/> <Label VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Foreground="White" Content="{TemplateBinding Content}"/>

@ -13,6 +13,7 @@ namespace SlnMesnac.WPF.ViewModel
private readonly ILogger<MainWindowViewModel> _logger; private readonly ILogger<MainWindowViewModel> _logger;
private HomePage homePage = new HomePage(); private HomePage homePage = new HomePage();
private LaminatePage laminatePage = new LaminatePage();
#region 参数定义 #region 参数定义
@ -78,7 +79,8 @@ namespace SlnMesnac.WPF.ViewModel
public MainWindowViewModel() public MainWindowViewModel()
{ {
UserContent = homePage; //UserContent = homePage;
UserContent = laminatePage;
_logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>(); _logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>();
ControlOnClickCommand = new RelayCommand<object>(obj => ControlOnClick(obj)); ControlOnClickCommand = new RelayCommand<object>(obj => ControlOnClick(obj));

Loading…
Cancel
Save