dev
liuwf 1 year ago
parent e982f57313
commit 68bf2eb05c

@ -18,7 +18,11 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
{ {
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MainWindowViewModel)); private static readonly log4net.ILog log = LogManager.GetLogger(typeof(MainWindowViewModel));
OldBoxFoamPageView oldBoxFoamPage = new OldBoxFoamPageView();
private OldBoxFoamPageView oldBoxFoamPage = new OldBoxFoamPageView();
private OldWarehousePageView oldWarehousePage = new OldWarehousePageView();
private FoamPlanPageView foamPlanPage = new FoamPlanPageView();
private RealRoadPageView realRoadPage = new RealRoadPageView();
public MainWindowViewModel() public MainWindowViewModel()
{ {
UserContent = oldBoxFoamPage; UserContent = oldBoxFoamPage;
@ -198,13 +202,17 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
UserContent = oldBoxFoamPage; UserContent = oldBoxFoamPage;
break; break;
case "OldWarehousePage": case "OldWarehousePage":
OldWarehousePageView oldWarehousePage = new OldWarehousePageView();
UserContent = oldWarehousePage; UserContent = oldWarehousePage;
break; break;
case "FoamPlanPage": case "FoamPlanPage":
FoamPlanPageView foamPlanPage = new FoamPlanPageView();
UserContent = foamPlanPage; UserContent = foamPlanPage;
break; break;
case "RealRoadPage":
UserContent = realRoadPage;
break;
default: default:
break; break;

@ -61,6 +61,7 @@
<Grid> <Grid>
<StackPanel Grid.Row="1" Height="50" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left"> <StackPanel Grid.Row="1" Height="50" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left">
<Button Content="发泡机监控" Height="40" x:Name="FoamMachinesPage" FontSize="18" Margin="2 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamMachinesPage}" /> <Button Content="发泡机监控" Height="40" x:Name="FoamMachinesPage" FontSize="18" Margin="2 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamMachinesPage}" />
<Button Content="货道监控" Height="40" x:Name="RealRoadPage" FontSize="18" Margin="2 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=RealRoadPage}" />
<Button Content="老发泡线监控" Height="40" x:Name="OldBoxFoamPage" FontSize="18" Margin="2 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=OldBoxFoamPage}" /> <Button Content="老发泡线监控" Height="40" x:Name="OldBoxFoamPage" FontSize="18" Margin="2 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=OldBoxFoamPage}" />
<Button Content="发泡计划" Height="40" x:Name="FoamPlanPage" FontSize="18" Margin="2 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamPlanPage}" /> <Button Content="发泡计划" Height="40" x:Name="FoamPlanPage" FontSize="18" Margin="2 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamPlanPage}" />
<Button Content="键 盘" Height="40" x:Name="TabTip" FontSize="18" Margin="2 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" /> <Button Content="键 盘" Height="40" x:Name="TabTip" FontSize="18" Margin="2 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />

@ -0,0 +1,291 @@
<UserControl x:Class="Aucma.Core.OldBoxFoam.Views.RealRoadPageView"
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:Aucma.Core.OldBoxFoam.Views"
mc:Ignorable="d" Background="#1152AC" FontFamily="Microsoft YaHei"
d:DesignHeight="1080" d:DesignWidth="1920">
<Border x:Name="HeightHelperPanel" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5">
<Grid>
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
</Style>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="#0288d1"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0"></Border>
<Border Grid.Row="1" Grid.Column="0" >
<TextBlock Text="1" x:Name="PlanId1" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="2" x:Name="PlanId2" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="0" >
<TextBlock Text="3" x:Name="PlanId3" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="0" >
<TextBlock Text="4" x:Name="PlanId4" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="0" >
<TextBlock Text="5" x:Name="PlanId5" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="0" >
<TextBlock Text="6" x:Name="PlanId6" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="0" >
<TextBlock Text="7" x:Name="PlanId7" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="0" >
<TextBlock Text="8" x:Name="PlanId8" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="0" >
<TextBlock Text="9" x:Name="PlanId9" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="0" >
<TextBlock Text="10" x:Name="PlanId10" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="0" >
<TextBlock Text="11" x:Name="PlanId11" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="0" >
<TextBlock Text="12" x:Name="PlanId12" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="1" >
<TextBlock Text="物料编号" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="2" >
<TextBlock Text="物料名称" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="3" >
<TextBlock Text="发泡计划量" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="0" Grid.Column="4" >
<TextBlock Text="操作" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[0], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[0], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[0], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="1" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId1}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId1}"/>
</WrapPanel>
</Border>
<Border Grid.Row="2" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[1], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[1], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[1], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="2" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId2}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId2}"/>
</WrapPanel>
</Border>
<Border Grid.Row="3" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[2], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[2], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[2], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="3" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId3}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId3}"/>
</WrapPanel>
</Border>
<Border Grid.Row="4" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[3], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[3], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[3], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="4" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId3}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId3}"/>
</WrapPanel>
</Border>
<Border Grid.Row="5" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[4], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[4], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[4], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="5" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId5}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId5}" />
</WrapPanel>
</Border>
<Border Grid.Row="6" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[5], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[5], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[5], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="6" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId6}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId6}"/>
</WrapPanel>
</Border>
<Border Grid.Row="7" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[6], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[6], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[6], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="7" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId7}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId7}" />
</WrapPanel>
</Border>
<Border Grid.Row="8" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[8], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[8], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[9], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="8" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId8}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId8}" />
</WrapPanel>
</Border>
<Border Grid.Row="9" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[8], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[8], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[8], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="9" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId9}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId9}" />
</WrapPanel>
</Border>
<Border Grid.Row="10" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[9], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[9], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[9], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="10" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId10}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId10}" />
</WrapPanel>
</Border>
<Border Grid.Row="11" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[10], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[10], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[10], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="11" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId11}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId11}" />
</WrapPanel>
</Border>
<Border Grid.Row="12" Grid.Column="1" >
<TextBlock Text="{Binding MaterialCode[11], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="2" >
<TextBlock Text="{Binding MaterialName[11], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="3" >
<TextBlock Text="{Binding PlanAmount[11], Mode=TwoWay}" Foreground="White" FontSize="20"/>
</Border>
<Border Grid.Row="12" Grid.Column="4" >
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="添加" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding AddPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId12}" />
<Button Content="清除" FontSize="20" Width="100" Height="40" Margin="3" Command="{Binding ClearPlanCommand}" CommandParameter="{Binding Text, ElementName=PlanId12}" />
</WrapPanel>
</Border>
</Grid>
</Border>
</UserControl>

@ -0,0 +1,30 @@
using Aucma.Core.OldBoxFoam.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Aucma.Core.OldBoxFoam.Views
{
/// <summary>
/// FoamPlanPageView.xaml 的交互逻辑
/// </summary>
public partial class RealRoadPageView : UserControl
{
public RealRoadPageView()
{
InitializeComponent();
this.DataContext = new FoamPlanPageViewModel();
}
}
}
Loading…
Cancel
Save