taoye 2 jaren geleden
bovenliggende
commit
63811dfbcb
13 gewijzigde bestanden met toevoegingen van 321 en 91 verwijderingen
  1. +2
    -0
      BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
  2. BIN
     
  3. +13
    -0
      BPASmartClient.CustomResource/Themes/MyStyle.xaml
  4. +14
    -14
      BPASmartClient.MorkT/Control_MorkT.cs
  5. +9
    -3
      BPASmartClient.MorkTM/Control_MorkTM.cs
  6. +20
    -4
      BPASmartClient.MorkTM/PolymerBatching.cs
  7. +1
    -10
      BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs
  8. +4
    -4
      BPASmartClient/App.config
  9. +1
    -1
      BPASmartClient/MainWindow.xaml
  10. +166
    -52
      FryPot_DosingSystem/View/AgvView.xaml
  11. +24
    -0
      FryPot_DosingSystem/View/AgvView.xaml.cs
  12. +66
    -1
      FryPot_DosingSystem/ViewModel/AgvViewModel.cs
  13. +1
    -2
      SmartClient.sln

+ 2
- 0
BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj Bestand weergeven

@@ -30,6 +30,7 @@
<None Remove="Image\AGV\墙.png" />
<None Remove="Image\AGV\汤碗.png" />
<None Remove="Image\AGV\炒锅.png" />
<None Remove="Image\AGV\炒锅2.png" />
<None Remove="Image\AGV\物流车.png" />
<None Remove="Image\AGV\砖块.png" />
<None Remove="Image\AGV\蔬菜.png" />
@@ -234,6 +235,7 @@
<Resource Include="Image\AGV\墙.png" />
<Resource Include="Image\AGV\汤碗.png" />
<Resource Include="Image\AGV\炒锅.png" />
<Resource Include="Image\AGV\炒锅2.png" />
<Resource Include="Image\AGV\物流车.png" />
<Resource Include="Image\AGV\砖块.png" />
<Resource Include="Image\AGV\蔬菜.png" />



+ 13
- 0
BPASmartClient.CustomResource/Themes/MyStyle.xaml Bestand weergeven

@@ -456,6 +456,19 @@
</Style.Setters>
</Style>

<Style x:Key="border炒锅2" TargetType="Border">
<Style.Setters>
<Setter Property="Height" Value="100"/>
<Setter Property="Width" Value="100"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/AGV/炒锅2.png" />
</Setter.Value>
</Setter>
</Style.Setters>
</Style>

<Style x:Key="border碗" TargetType="Border">
<Style.Setters>
<Setter Property="Height" Value="80"/>


+ 14
- 14
BPASmartClient.MorkT/Control_MorkT.cs Bestand weergeven

@@ -76,21 +76,21 @@ namespace BPASmartClient.MorkT

public override void MainTask()
{
if (morkTime.AddMinutes(Global.TimeInterval).Minute == DateTime.Now.Minute)
{
morkTime = DateTime.Now;
if ((ELebaiRModel)peripheralStatus["RobotMode"] == ELebaiRModel.空闲状态)
{
MessageLog.GetInstance.Show("机器人开始自嗨!");
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }, (o) => { });
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_LebaiSenceEvent { DeviceId = DeviceId, LebaiSence = Lebai_qsqdCode.SENCE_自嗨 });
Wait();
EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 1 }, (o) => { });
Thread.Sleep(50);
}
//if (morkTime.AddMinutes(Global.TimeInterval).Minute == DateTime.Now.Minute)
//{
// morkTime = DateTime.Now;
// if ((ELebaiRModel)peripheralStatus["RobotMode"] == ELebaiRModel.空闲状态)
// {
// MessageLog.GetInstance.Show("机器人开始自嗨!");
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 0 }, (o) => { });
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_LebaiSenceEvent { DeviceId = DeviceId, LebaiSence = Lebai_qsqdCode.SENCE_自嗨 });
// Wait();
// EventBus.EventBus.GetInstance().Publish(new LebaiRobot_SetValueEvent { DeviceId = DeviceId, RobotSetValue = 1 }, (o) => { });
// Thread.Sleep(50);
// }

}
else if (morkTime.AddMinutes(Global.TimeInterval) < DateTime.Now) morkTime = DateTime.Now;
//}
//else if (morkTime.AddMinutes(Global.TimeInterval) < DateTime.Now) morkTime = DateTime.Now;
#region morkt流程
//if (morkT.waitMorkOrder != null)//更新订单取走状态
//{


+ 9
- 3
BPASmartClient.MorkTM/Control_MorkTM.cs Bestand weergeven

@@ -14,14 +14,14 @@ namespace BPASmartClient.MorkTM
{
public class Control_MorkTM : BaseDevice
{
public override DeviceClientType DeviceType => throw new NotImplementedException();
public override global::BPA.Message.Enum.DeviceClientType DeviceType { get { return BPA.Message.Enum.DeviceClientType.TMC_MT; } }

GVL_MorkTM morkTM = new GVL_MorkTM();
public override void DoMain()
{
ServerInit();
DataParse();
PolymerBatching.GetMaterialInfo();
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
if (o != null && o is WritePar writePar) WriteData(writePar.Address, writePar.Value);
@@ -158,7 +158,13 @@ namespace BPASmartClient.MorkTM

public override void SimOrder()
{
throw new NotImplementedException();
ActionManage.GetInstance.Register(new Action<object>((o) =>
{
if (o is string goodName)
{

}
}), "");
}

public override void Stop()


+ 20
- 4
BPASmartClient.MorkTM/PolymerBatching.cs Bestand weergeven

@@ -6,19 +6,35 @@ using System.Threading.Tasks;

namespace BPASmartClient.MorkTM
{
public enum Material
public enum MaterialPosion
{
Material_Top_1, Material_Top_2, Material_Top_3, Material_Top_4, Material_Top_5, Material_Top_6,
Material_Mid_1, Material_Mid_2, Material_Mid_3, Material_Mid_4, Material_Mid_5, Material_Mid_6, Material_Mid_7, Material_Mid_8, Material_Mid_9, Material_Mid_10,
Marerial_Bottom_1, Marerial_Bottom_2, Marerial_Bottom_3, Marerial_Top_4,Marerial_Bottom_5, Marerial_Bottom_6
Marerial_Bottom_1, Marerial_Bottom_2, Marerial_Bottom_3, Marerial_Bottom_4, Marerial_Bottom_5, Marerial_Bottom_6,
Matetial_Tea_1, Matetial_Tea_2, Matetial_Tea_3, Matetial_Tea_4, Matetial_Tea_5, Matetial_Tea_6

}
public enum TeaStorageBox
public enum OutMaterialPosion
{
TeaStorageBox_1, TeaStorageBox_2, TeaStorageBox_3, TeaStorageBox_4, TeaStorageBox_5, TeaStorageBox_6
OutMaterial_1, OutMaterial_2, OutMaterial_3, OutMaterial_4, OutMaterial_5, OutMaterial_6, OutMaterial_7, OutMaterial_8, OutMaterial_9, OutMaterial_10
}

public class PolymerBatching
{
public static void GetMaterialInfo()
{
Array arrayPosion = Enum.GetValues(typeof(MaterialPosion));
Array arrayOutPosion = Enum.GetValues(typeof(OutMaterialPosion));
for (int i = 0; i < arrayPosion.Length; i++)
{
int j = (int)Math.Ceiling((double)(i + 1) / 3) - 1;
GoodsMaterialPosion.Add((MaterialPosion)arrayPosion.GetValue(i), (OutMaterialPosion)arrayOutPosion.GetValue(j));

}
}

public static Dictionary<MaterialPosion, OutMaterialPosion> GoodsMaterialPosion = new Dictionary<MaterialPosion, OutMaterialPosion>();
}
}

+ 1
- 10
BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs Bestand weergeven

@@ -33,16 +33,7 @@ namespace BPASmartClient.MorkTM.ViewModel
public DebugViewModel()
{
foreach(TeaStorageBox code in Enum.GetValues(typeof(TeaStorageBox)))
{
Materials.Add(code.ToString());
}

foreach (Material materials in Enum.GetValues(typeof(Material)))
{
Materials.Add(materials.ToString());
}

}
}


+ 4
- 4
BPASmartClient/App.config Bestand weergeven

@@ -7,14 +7,14 @@
<add key="IsEnableTest" value="false"/>

<!--测试环境-->
<add key="apollouri" value="http://10.2.1.21:28080/"/>
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/>
<add key="AppId" value="test1_HostComputer"/>
<add key ="Namespaces" value="DEV.test1.Config"/>
<add key ="Namespaces" value="DEV.test1.Config"/>-->

<!--开发环境-->
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/>
<add key="apollouri" value="http://10.2.1.21:28080/"/>
<add key="AppId" value="dev1_common"/>
<add key ="Namespaces" value="DEV.Config"/>-->
<add key ="Namespaces" value="DEV.Config"/>

<!--正式环境-->
<!--<add key="apollouri" value="http://47.108.65.220:28080/"/>


+ 1
- 1
BPASmartClient/MainWindow.xaml Bestand weergeven

@@ -55,7 +55,7 @@
<StackPanel
x:Name="myPanel"
Orientation="Horizontal"
Visibility="Collapsed">
Visibility="Hidden">
<Button
Width="120"
Height="40"


+ 166
- 52
FryPot_DosingSystem/View/AgvView.xaml Bestand weergeven

@@ -40,27 +40,49 @@
<DiscreteObjectKeyFrame KeyTime="00:00:01" Value="{x:Static Visibility.Visible}"/>
<DiscreteObjectKeyFrame KeyTime="00:00:1.2" Value="{x:Static Visibility.Collapsed}"/>
</ObjectAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="select_color" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="Lime"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Red"/>
<EasingColorKeyFrame KeyTime="00:00:2" Value="Lime"/>
<EasingColorKeyFrame KeyTime="00:00:3" Value="#FF1F4D69"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="unselect_color" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Lime"/>
<EasingColorKeyFrame KeyTime="00:00:2" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:3" Value="Yellow"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="gridSplitter" Storyboard.TargetProperty="(Control.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Yellow"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="gridSplitter1" Storyboard.TargetProperty="(Control.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Yellow"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid Width="60" Height="240" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0">
<GridSplitter Width="5"></GridSplitter>
<GridSplitter Width="5" HorizontalAlignment="Left"></GridSplitter>
<GridSplitter x:Name="gridSplitter" Width="5"></GridSplitter>
<GridSplitter x:Name="gridSplitter1" Width="5" HorizontalAlignment="Left"></GridSplitter>
<Border x:Name="select_color" Background="#FF1F4D69" Visibility="Collapsed"></Border>
<Border x:Name="unselect_color" Background="#FF1F4D69" Visibility="Collapsed"></Border>
<StackPanel>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color }" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
</StackPanel>
<StackPanel VerticalAlignment="Bottom" Margin="0,0,0,20">
<Grid x:Name="c1" Width="40" Height="27" >
@@ -284,27 +306,49 @@
<DiscreteObjectKeyFrame KeyTime="00:00:01" Value="{x:Static Visibility.Visible}"/>
<DiscreteObjectKeyFrame KeyTime="00:00:1.2" Value="{x:Static Visibility.Collapsed}"/>
</ObjectAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="select_color" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="Lime"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Red"/>
<EasingColorKeyFrame KeyTime="00:00:2" Value="Lime"/>
<EasingColorKeyFrame KeyTime="00:00:3" Value="#FF1F4D69"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="unselect_color" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Lime"/>
<EasingColorKeyFrame KeyTime="00:00:2" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:3" Value="Yellow"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="gridSplitter" Storyboard.TargetProperty="(Control.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Yellow"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames Storyboard.TargetName="gridSplitter1" Storyboard.TargetProperty="(Control.Background).(SolidColorBrush.Color)">
<EasingColorKeyFrame KeyTime="00:00:00" Value="#FF1F4D69"/>
<EasingColorKeyFrame KeyTime="00:00:1" Value="Yellow"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid Width="60" Height="240" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0">
<GridSplitter Width="5"></GridSplitter>
<GridSplitter Width="5" HorizontalAlignment="Left"></GridSplitter>
<GridSplitter x:Name="gridSplitter" Width="5"></GridSplitter>
<GridSplitter x:Name="gridSplitter1" Width="5" HorizontalAlignment="Left"></GridSplitter>
<Border x:Name="select_color" Background="#FF1F4D69" Visibility="Collapsed"></Border>
<Border x:Name="unselect_color" Background="#FF1F4D69" Visibility="Collapsed"></Border>
<StackPanel>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{TemplateBinding Foreground}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color }" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=select_color}" Height="5" Margin="5"/>
<Rectangle Fill="{Binding Background, ElementName=unselect_color}" Height="5" Margin="5"/>
</StackPanel>
<StackPanel VerticalAlignment="Bottom" Margin="0,0,0,20">
<Grid x:Name="c1" Width="40" Height="27" >
@@ -1114,6 +1158,71 @@
</Setter.Value>
</Setter>
</Style>

<Style x:Key="炒锅" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#FF1F4D69"/>
<Setter Property="Text" Value="Start"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<ControlTemplate.Resources>
<Storyboard RepeatBehavior="Forever" x:Key="csd_dh1">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:0.5" Value="90"/>
<EasingDoubleKeyFrame KeyTime="00:00:1" Value="180"/>
<EasingDoubleKeyFrame KeyTime="00:00:1.5" Value="270"/>
<EasingDoubleKeyFrame KeyTime="00:00:2" Value="360"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>

</ControlTemplate.Resources>
<Grid Width="100" Height="100">
<Border Style="{DynamicResource border炒锅2}">
<!--<Border x:Name="cai" VerticalAlignment="Top" Width="30" Height="25" Margin="0,10,0,0" Style="{DynamicResource border菜}">
</Border>-->
</Border>
<Ellipse x:Name="ellipse" StrokeThickness="5" Width="50" Height="50" RenderTransformOrigin="0.5,0.5" Margin="5,-3,0,0" VerticalAlignment="Top">
<Ellipse.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform AngleY="-0"/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Ellipse.RenderTransform>
<Ellipse.Stroke>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#CCA48E42"/>
<GradientStop Color="#CC2D48DA" Offset="1"/>
<GradientStop Color="#FF3FD256" Offset="0.305"/>
<GradientStop Color="#FFB12C87" Offset="0.67"/>
</LinearGradientBrush>
</Ellipse.Stroke>
</Ellipse>

</Grid>
<ControlTemplate.Triggers>
<Trigger Property="Text" Value="Start">
<Setter TargetName="ellipse" Property="Visibility" Value="Visible" />
<!--<Setter TargetName="cai" Property="Visibility" Value="Visible" />-->
<Trigger.EnterActions>
<BeginStoryboard x:Name="begin_name" Storyboard="{StaticResource csd_dh1}"/>
</Trigger.EnterActions>
</Trigger>
<Trigger Property="Text" Value="Stop">
<Trigger.EnterActions>
<StopStoryboard BeginStoryboardName="begin_name"/>
</Trigger.EnterActions>
<Setter TargetName="ellipse" Property="Visibility" Value="Collapsed" />
<!--<Setter TargetName="cai" Property="Visibility" Value="Collapsed" />-->
</Trigger>

</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Viewbox>
@@ -1159,11 +1268,16 @@
<TextBox x:Name="xiaochewuping_text" Margin="5">1</TextBox>
<Button Margin="5" Click="Button_Click" Tag="有菜和碗" Cursor="Hand">有菜和碗</Button>
<Button Margin="5" Click="Button_Click" Tag="只有碗" Cursor="Hand">只有碗</Button>

<Button Margin="5" Click="Button_Click" Tag="无物品" Cursor="Hand">无物品</Button>


</StackPanel>
<StackPanel>
<TextBlock Margin="5">滚筒炒锅</TextBlock>
<TextBox x:Name="guntongchaoguo_text" Margin="5">1</TextBox>
<Button Margin="5" Click="Button_Click" Tag="启动炒锅" Cursor="Hand">启动炒锅</Button>
<Button Margin="5" Click="Button_Click" Tag="停止炒锅" Cursor="Hand">停止炒锅</Button>
</StackPanel>

</StackPanel>
</Grid>

@@ -1276,22 +1390,26 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Style="{DynamicResource border炒锅}" HorizontalAlignment="Left">
<Grid Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="45,0,0,20">
<TextBox Style="{StaticResource 炒锅}" Text="{Binding wokModel_1.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
<TextBlock Style="{DynamicResource 80号字体样式}" FontSize="16" Width="18" Margin="-10,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom">炒锅(1)号</TextBlock>
</Border>
<Border Style="{DynamicResource border炒锅}" Grid.Column="1" HorizontalAlignment="Left">
</Grid>
<Grid Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="45,0,0,20">
<TextBox Style="{StaticResource 炒锅}" Text="{Binding wokModel_2.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
<TextBlock Style="{DynamicResource 80号字体样式}" FontSize="16" Width="18" Margin="-10,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom">炒锅(2)号</TextBlock>
</Border>
<Border Style="{DynamicResource border炒锅}" Grid.Column="2" HorizontalAlignment="Left">
</Grid>
<Grid Grid.Column="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="45,0,0,20">
<TextBox Style="{StaticResource 炒锅}" Text="{Binding wokModel_3.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
<TextBlock Style="{DynamicResource 80号字体样式}" FontSize="16" Width="18" Margin="-10,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom">炒锅(3)号</TextBlock>
</Border>
<Border Style="{DynamicResource border炒锅}" Grid.Column="3" HorizontalAlignment="Left">
</Grid>
<Grid Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="45,0,0,20">
<TextBox Style="{StaticResource 炒锅}" Text="{Binding wokModel_4.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
<TextBlock Style="{DynamicResource 80号字体样式}" FontSize="16" Width="18" Margin="-10,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom">炒锅(4)号</TextBlock>
</Border>
<Border Style="{DynamicResource border炒锅}" Grid.Column="4" HorizontalAlignment="Left">
</Grid>
<Grid Grid.Column="4" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="45,0,0,20">
<TextBox Style="{StaticResource 炒锅}" Text="{Binding wokModel_5.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBox>
<TextBlock Style="{DynamicResource 80号字体样式}" FontSize="16" Width="18" Margin="-10,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Bottom">炒锅(5)号</TextBlock>
</Border>

</Grid>
<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="100,0,-40,80" Grid.Column="0">
<Rectangle Stroke="#FFFFA400" StrokeDashArray="5 5" Margin="10"/>
<StackPanel>
@@ -1318,7 +1436,6 @@
</ListBox>
</StackPanel>
</Grid>

<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="100,0,-40,80" Grid.Column="1">
<Rectangle Stroke="#FFFFA400" StrokeDashArray="5 5" Margin="10"/>
<StackPanel>
@@ -1345,7 +1462,6 @@
</ListBox>
</StackPanel>
</Grid>

<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="100,0,-40,80" Grid.Column="2">
<Rectangle Stroke="#FFFFA400" StrokeDashArray="5 5" Margin="10"/>
<StackPanel>
@@ -1372,7 +1488,6 @@
</ListBox>
</StackPanel>
</Grid>

<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="100,0,-40,80" Grid.Column="3">
<Rectangle Stroke="#FFFFA400" StrokeDashArray="5 5" Margin="10"/>
<StackPanel>
@@ -1399,7 +1514,6 @@
</ListBox>
</StackPanel>
</Grid>

<Grid HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="100,0,-40,80" Grid.Column="4">
<Rectangle Stroke="#FFFFA400" StrokeDashArray="5 5" Margin="10"/>
<StackPanel>


+ 24
- 0
FryPot_DosingSystem/View/AgvView.xaml.cs Bestand weergeven

@@ -163,6 +163,30 @@ namespace FryPot_DosingSystem.View
}
AgvViewModel.GetInstance().Set小车是否承载物品(id, IsBool.No);
break;
case "启动炒锅":
try
{
id = int.Parse(guntongchaoguo_text.Text.ToString());
}
catch (Exception ex)
{
MessageBox.Show("只能输入 1-4 的数字!");
return;
}
AgvViewModel.GetInstance().Set启动或停止炒锅(id, IsRun.Start);
break;
case "停止炒锅":
try
{
id = int.Parse(guntongchaoguo_text.Text.ToString());
}
catch (Exception ex)
{
MessageBox.Show("只能输入 1-4 的数字!");
return;
}
AgvViewModel.GetInstance().Set启动或停止炒锅(id, IsRun.Stop);
break;

}
}


+ 66
- 1
FryPot_DosingSystem/ViewModel/AgvViewModel.cs Bestand weergeven

@@ -300,6 +300,40 @@ namespace FryPot_DosingSystem.ViewModel

}
}
/// <summary>
/// 启动或停止炒锅
/// </summary>
/// <param name="id">默认:1 2 3 4 5,代表五个炒锅</param>
/// <param name="mode"></param>
public void Set启动或停止炒锅(int id, IsRun mode)
{
try
{
switch (id)
{
case 1:
wokModel_1.isRun= mode;
break;
case 2:
wokModel_2.isRun = mode;
break;
case 3:
wokModel_3.isRun = mode;
break;
case 4:
wokModel_4.isRun = mode;
break;
case 5:
wokModel_5.isRun = mode;
break;
}

}
catch (Exception ex)
{

}
}
#endregion

#region 其他函数
@@ -834,7 +868,7 @@ namespace FryPot_DosingSystem.ViewModel
try
{
count = int.Parse(_DishesNum);
if (count > 0 && count <= 8)
if (count >= 0 && count <= 8)
{
_DishesNum = count.ToString();
}
@@ -932,6 +966,37 @@ namespace FryPot_DosingSystem.ViewModel
OnPropertyChanged("other");
}
}
/// <summary>
/// 是否运行
/// </summary>
private IsRun _isRun = IsRun.Stop;
public IsRun isRun
{
get
{
return _isRun;
}
set
{
_isRun = value;
Text = _isRun.ToString();
OnPropertyChanged("isBool");
}
}
private string _Text = IsRun.Stop.ToString();
public string Text
{
get
{
return _Text;
}
set
{
_Text = value;
OnPropertyChanged("Text");
}
}

/// <summary>
/// 工作流程
/// </summary>


+ 1
- 2
SmartClient.sln Bestand weergeven

@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Blend for Visual Studio Version 17
# Visual Studio Version 17
VisualStudioVersion = 17.0.32002.185
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.DRCoffee", "BPASmartClient.DRCoffee\BPASmartClient.DRCoffee.csproj", "{31E9DC70-5889-4BA5-A5BA-FFDE66AFF314}"
@@ -1165,7 +1165,6 @@ Global
{E7168B03-68E5-4285-BB95-5660F877577A} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{A49E1C5A-9489-451C-9CE6-CEA586234B84} = {8712125E-14CD-4E1B-A1CE-4BDE03805942}
{099E047C-F40E-47A3-A5BA-81FC1500D5E8} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{76B6B333-0109-4EE8-A9B2-3E53A7421D92} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


Laden…
Annuleren
Opslaan