fyf 2 years ago
parent
commit
bedb5769fe
5 changed files with 74 additions and 47 deletions
  1. +1
    -1
      BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj
  2. +22
    -9
      BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml
  3. +24
    -10
      BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml
  4. +26
    -26
      WpfTest/MainWindow.xaml.cs
  5. +1
    -1
      WpfTest/WpfTest.csproj

+ 1
- 1
BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj View File

@@ -19,7 +19,7 @@
</COMReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="BPA.CustomResource" Version="1.0.12" />
<PackageReference Include="BPA.CustomResource" Version="1.0.13" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1418.22" />
</ItemGroup>



+ 22
- 9
BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml View File

@@ -112,21 +112,27 @@
<Image x:Name="image" Grid.Column="1" Style="{DynamicResource image右1}" Cursor="Hand" ></Image>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsRun}" Value="true">
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
<DataTrigger Binding="{Binding Status}" Value="正在执行">
<Setter TargetName="xs" Property="Foreground" Value="lime"/>
<Setter TargetName="wb" Property="Foreground" Value="lime"/>
<DataTrigger.EnterActions>
<BeginStoryboard x:Name="begin_name" Storyboard="{StaticResource csd_dh}"/>
</DataTrigger.EnterActions>
</DataTrigger>
<DataTrigger Binding="{Binding IsRun}" Value="false">
<DataTrigger Binding="{Binding Status}" Value="执行完成">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="未执行">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>
<Setter TargetName="xs" Property="Foreground" Value="#a2c2e8"/>
<Setter TargetName="wb" Property="Foreground" Value="#a2c2e8"/>
</DataTrigger>

<DataTrigger Binding="{Binding Id}" Value="4">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
@@ -300,14 +306,21 @@
<Image x:Name="image" Grid.Column="1" Style="{DynamicResource image右1}" Cursor="Hand" ></Image>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsRun}" Value="true">
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
<DataTrigger Binding="{Binding Status}" Value="正在执行">
<Setter TargetName="xs" Property="Foreground" Value="lime"/>
<Setter TargetName="wb" Property="Foreground" Value="lime"/>
<DataTrigger.EnterActions>
<BeginStoryboard x:Name="begin_name" Storyboard="{StaticResource csd_dh}"/>
</DataTrigger.EnterActions>
</DataTrigger>
<DataTrigger Binding="{Binding IsRun}" Value="false">
<DataTrigger Binding="{Binding Status}" Value="执行完成">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="未执行">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>


+ 24
- 10
BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml View File

@@ -112,14 +112,21 @@
<Image x:Name="image" Grid.Column="1" Style="{DynamicResource image右1}" Cursor="Hand" ></Image>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsRun}" Value="true">
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
<DataTrigger Binding="{Binding Status}" Value="正在执行">
<Setter TargetName="xs" Property="Foreground" Value="lime"/>
<Setter TargetName="wb" Property="Foreground" Value="lime"/>
<DataTrigger.EnterActions>
<BeginStoryboard x:Name="begin_name" Storyboard="{StaticResource csd_dh}"/>
</DataTrigger.EnterActions>
</DataTrigger>
<DataTrigger Binding="{Binding IsRun}" Value="false">
<DataTrigger Binding="{Binding Status}" Value="执行完成">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="未执行">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>
@@ -127,12 +134,12 @@
<Setter TargetName="wb" Property="Foreground" Value="#a2c2e8"/>
</DataTrigger>

<DataTrigger Binding="{Binding Id}" Value="4">
<!--<DataTrigger Binding="{Binding Id}" Value="{Binding DataContext.Count, RelativeSource={RelativeSource AncestorType=ListBox,Mode=FindAncestor}}">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>
<Setter TargetName="image" Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</DataTrigger>-->
</DataTemplate.Triggers>
</DataTemplate>
</ListBox.ItemTemplate>
@@ -300,14 +307,21 @@
<Image x:Name="image" Grid.Column="1" Style="{DynamicResource image右1}" Cursor="Hand" ></Image>
</Grid>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsRun}" Value="true">
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
<DataTrigger Binding="{Binding Status}" Value="正在执行">
<Setter TargetName="xs" Property="Foreground" Value="lime"/>
<Setter TargetName="wb" Property="Foreground" Value="lime"/>
<DataTrigger.EnterActions>
<BeginStoryboard x:Name="begin_name" Storyboard="{StaticResource csd_dh}"/>
</DataTrigger.EnterActions>
</DataTrigger>
<DataTrigger Binding="{Binding IsRun}" Value="false">
<DataTrigger Binding="{Binding Status}" Value="执行完成">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>
<Setter TargetName="xs" Property="Foreground" Value="#FFD2C106"/>
<Setter TargetName="wb" Property="Foreground" Value="#FFD2C106"/>
</DataTrigger>
<DataTrigger Binding="{Binding Status}" Value="未执行">
<DataTrigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</DataTrigger.EnterActions>


+ 26
- 26
WpfTest/MainWindow.xaml.cs View File

@@ -139,11 +139,11 @@ namespace WpfTest
MaxWok_Dishes_1 = "猪肉炖粉条",
MaxWok_Task_1 = "炒菜中",
MaxWok_Process_1 = new List<ProcessModel> {
new ProcessModel{ Id=0,Name= "清洗", IsRun=M>=0 ?true:false},
new ProcessModel{ Id=1,Name= "到菜", IsRun=M>=1 ?true:false},
new ProcessModel{ Id=2,Name= "翻炒", IsRun=M>=2?true:false},
new ProcessModel{ Id=3,Name= "调料", IsRun=M>=3 ?true:false},
new ProcessModel{ Id=4,Name= "完成", IsRun=M>=4 ?true:false},
new ProcessModel{ Id=0,Name= "清洗", Status=(M==0) ? ProcessStatus.正在执行:((M>0)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=1,Name= "到菜", Status=(M==1) ? ProcessStatus.正在执行:((M>1)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=2,Name= "翻炒", Status=(M==2) ? ProcessStatus.正在执行:((M>2)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=3,Name= "调料", Status=(M==3) ? ProcessStatus.正在执行:((M>3)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=4,Name= "完成", Status=(M==4) ? ProcessStatus.正在执行:((M>4)?ProcessStatus.执行完成:ProcessStatus.未执行)},
},
MaxWok_HeatGear_1 = "1",
MaxWok_StirGear_1 = "2",
@@ -155,11 +155,11 @@ namespace WpfTest
MaxWok_Dishes_2 = "烂肉排骨",
MaxWok_Task_2 = "结算中",
MaxWok_Process_2 = new List<ProcessModel> {
new ProcessModel{ Id=0,Name= "清洗", IsRun=k>=0 ?true:false},
new ProcessModel{ Id=1,Name= "到菜", IsRun=k>=1 ?true:false},
new ProcessModel{ Id=2,Name= "翻炒", IsRun=k>=2 ?true:false},
new ProcessModel{ Id=3,Name= "调料", IsRun=k>=3 ?true:false},
new ProcessModel{ Id=4,Name= "完成", IsRun=k>=4 ?true:false},
new ProcessModel{ Id=0,Name= "清洗", Status=(k==0) ? ProcessStatus.正在执行:((k>0)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=1,Name= "到菜", Status=(k==1) ? ProcessStatus.正在执行:((k>1)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=2,Name= "翻炒", Status=(k==2) ? ProcessStatus.正在执行:((k>2)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=3,Name= "调料", Status=(k==3) ? ProcessStatus.正在执行:((k>3)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=4,Name= "完成", Status=(k==4) ? ProcessStatus.正在执行:((k>4)?ProcessStatus.执行完成:ProcessStatus.未执行)},
},
MaxWok_HeatGear_2 = "2",
MaxWok_StirGear_2 = "3",
@@ -194,11 +194,11 @@ namespace WpfTest
MinWok_Dishes_1 = "猪肉炖粉条",
MinWok_Task_1 = "炒菜中",
MinWok_Process_1 = new List<ProcessModel> {
new ProcessModel{ Id=0,Name= "清洗", IsRun=M>=0 ?true:false},
new ProcessModel{ Id=1,Name= "到菜", IsRun=M>=1 ?true:false},
new ProcessModel{ Id=2,Name= "翻炒", IsRun=M>=2?true:false},
new ProcessModel{ Id=3,Name= "调料", IsRun=M>=3 ?true:false},
new ProcessModel{ Id=4,Name= "完成", IsRun=M>=4 ?true:false},
new ProcessModel{ Id=0,Name= "清洗", Status=(M==0) ? ProcessStatus.正在执行:((M>0)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=1,Name= "到菜", Status=(M==1) ? ProcessStatus.正在执行:((M>1)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=2,Name= "翻炒", Status=(M==2) ? ProcessStatus.正在执行:((M>2)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=3,Name= "调料", Status=(M==3) ? ProcessStatus.正在执行:((M>3)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=4,Name= "完成", Status=(M==4) ? ProcessStatus.正在执行:((M>4)?ProcessStatus.执行完成:ProcessStatus.未执行)},
},
MinWok_HeatGear_1 = "1",
MinWok_StirGear_1 = "2",
@@ -210,11 +210,11 @@ namespace WpfTest
MinWok_Dishes_2 = "烂肉排骨",
MinWok_Task_2 = "结算中",
MinWok_Process_2 = new List<ProcessModel> {
new ProcessModel{ Id=0,Name= "清洗", IsRun=k>=0 ?true:false},
new ProcessModel{ Id=1,Name= "到菜", IsRun=k>=1 ?true:false},
new ProcessModel{ Id=2,Name= "翻炒", IsRun=k>=2 ?true:false},
new ProcessModel{ Id=3,Name= "调料", IsRun=k>=3 ?true:false},
new ProcessModel{ Id=4,Name= "完成", IsRun=k>=4 ?true:false},
new ProcessModel{ Id=0,Name= "清洗", Status=(k==0) ? ProcessStatus.正在执行:((k>0)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=1,Name= "到菜", Status=(k==1) ? ProcessStatus.正在执行:((k>1)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=2,Name= "翻炒", Status=(k==2) ? ProcessStatus.正在执行:((k>2)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=3,Name= "调料", Status=(k==3) ? ProcessStatus.正在执行:((k>3)?ProcessStatus.执行完成:ProcessStatus.未执行)},
new ProcessModel{ Id=4,Name= "完成", Status=(k==4) ? ProcessStatus.正在执行:((k>4)?ProcessStatus.执行完成:ProcessStatus.未执行)},
},
MinWok_HeatGear_2 = "2",
MinWok_StirGear_2 = "3",
@@ -245,7 +245,7 @@ namespace WpfTest
new StatsModel{Name= name_s[3],Count=new Random().Next(0, 100)},
new StatsModel{Name= name_s[4],Count=new Random().Next(0, 100)},
},
MorkS_OrderCount= new Random().Next(0, 100),
MorkS_OrderCount = new Random().Next(0, 100),
MorkS_ErrorOrderCount = new Random().Next(0, 100),
MorkS_NoodleUpOrDown_1 = new Random().Next(0, 2) == 0 ? "true" : "false",
MorkS_NoodleUpOrDown_2 = new Random().Next(0, 2) == 0 ? "true" : "false",
@@ -258,7 +258,7 @@ namespace WpfTest
MorkS_BinLocation = new Random().Next(0, 6).ToString(),
MorkS_SiloMeas = new Random().Next(0, 2) == 0 ? "true" : "false",
MorkS_NoBowMeas = new Random().Next(0, 2) == 0 ? "true" : "false",
MakeOrder=new List<OrderMakeModel> {
MakeOrder = new List<OrderMakeModel> {
new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()},
new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()},
new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()},
@@ -271,7 +271,7 @@ namespace WpfTest
new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()},
new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()},
},
};
}
else if (screen == ScreenDeviceType.分餐机)
@@ -307,7 +307,7 @@ namespace WpfTest

SplitMeals_CreditCardCount_3 = new Random().Next(0, 100),
SplitMeals_CreditCardNameBefore_3 = name_XM[new Random().Next(0, 5)],
SplitMeals_CreditCardName_3= name_XM[new Random().Next(0, 5)],
SplitMeals_CreditCardName_3 = name_XM[new Random().Next(0, 5)],
SplitMeals_CookType_3 = new List<string>() { "担担面", "鸡蛋面", "火鸡面" },

SplitMeals_CreditCardCount_4 = new Random().Next(0, 100),
@@ -333,7 +333,7 @@ namespace WpfTest

System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
if (textwb.Text.Length > 100000)
{
textwb.Text = "";
@@ -373,7 +373,7 @@ namespace WpfTest
i++;
}
}
}
}
}

+ 1
- 1
WpfTest/WpfTest.csproj View File

@@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BPA.CustomResource" Version="1.0.12" />
<PackageReference Include="BPA.CustomResource" Version="1.0.13" />
</ItemGroup>

</Project>

Loading…
Cancel
Save