Procházet zdrojové kódy

本地菜单

master
NXX před 1 rokem
rodič
revize
9a1f09697f
4 změnil soubory, kde provedl 82 přidání a 1 odebrání
  1. +1
    -1
      BPASmartClient.MorkF/Control_MorkF.cs
  2. +35
    -0
      BPASmartClient.MorkF/Convert/PotActionToVisibilityConvert.cs
  3. +21
    -0
      BPASmartClient.MorkF/Model/FoodMenuModel.cs
  4. +25
    -0
      BPASmartClient.MorkF/View/LocalMenu.xaml

+ 1
- 1
BPASmartClient.MorkF/Control_MorkF.cs Zobrazit soubor

@@ -1345,7 +1345,7 @@ namespace BPASmartClient.MorkF

//MessageLog.GetInstance.Show("机械臂移动操作完成");

Thread.Sleep(500);
Thread.Sleep(300);

return true;
}


+ 35
- 0
BPASmartClient.MorkF/Convert/PotActionToVisibilityConvert.cs Zobrazit soubor

@@ -0,0 +1,35 @@
using AlibabaCloud.SDK.Iot20180120.Models;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;

namespace BPASmartClient.MorkF.Convert
{
internal class PotActionToVisibilityConvert : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
Visibility vs = Visibility.Collapsed;
if(value is string action)
{
switch (action)
{
case "":
default:
break;
}
}
return vs;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

+ 21
- 0
BPASmartClient.MorkF/Model/FoodMenuModel.cs Zobrazit soubor

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkF.Model
{
public class FoodMenuModel
{
public string ID { get; set; }
public string FoodName { get; set; }
public Dictionary<int,int> FoodHouseMaterials { get; set; } = new Dictionary<int,int>();
}



}

+ 25
- 0
BPASmartClient.MorkF/View/LocalMenu.xaml Zobrazit soubor

@@ -18,6 +18,30 @@
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="ListBoxItem" x:Key="newFoodList" >
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border BorderBrush="Black" BorderThickness="0" Background="Transparent" Margin="5">
<StackPanel Orientation="Vertical">
<TextBlock Text="步骤:"/>
<TextBox Text="{Binding FryTime}" HorizontalAlignment="Center" VerticalAlignment="Center" />
<ComboBox Width="120" ItemsSource="{Binding DataContext.strPotActions , RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
SelectedValue="{Binding Actions}" Margin="10,0"/>
<TextBlock Text="时间"/>
<TextBox Text="{Binding During}" Margin="10,0"/>
<TextBox Text="{Binding SeasoningLists[0].Loc}" Margin="10,0"/>
<TextBox Text="{Binding SeasoningLists[0].Qty}" Margin="10,0"/>
<Button Content="删除" Margin="10,0" HorizontalAlignment="Center"/>
</StackPanel>
</Border>

</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="ListBoxItem" >
<Setter Property="Template">
<Setter.Value>
@@ -96,6 +120,7 @@
</Grid>
<ListBox x:Name="listview1" Grid.Row="3" BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Center" AllowDrop="True"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding PotActionStep}" Margin=" 10" Background="Transparent"
ItemContainerStyle="{DynamicResource newFoodList}"
>
</ListBox>


Načítá se…
Zrušit
Uložit