Bläddra i källkod

180更新

样式分支
taoye 2 år sedan
förälder
incheckning
037bba59c3
6 ändrade filer med 214 tillägg och 25 borttagningar
  1. +8
    -0
      FryPot_DosingSystem/AGV/WhichCart.cs
  2. +30
    -13
      FryPot_DosingSystem/Control/DosingLogicControl.cs
  3. +2
    -0
      FryPot_DosingSystem/FryPot_DosingSystem.csproj
  4. +164
    -11
      FryPot_DosingSystem/View/AgvView.xaml
  5. +3
    -1
      FryPot_DosingSystem/View/AgvView.xaml.cs
  6. +7
    -0
      FryPot_DosingSystem/ViewModel/AgvViewModel.cs

+ 8
- 0
FryPot_DosingSystem/AGV/WhichCart.cs Visa fil

@@ -51,6 +51,14 @@ namespace FryPot_DosingSystem.AGV
hs_4,//4号炒锅-运输空碗到-空碗流水线
hs_5,//5号炒锅-运输空碗到-空碗流水线

tqx_1,
tqx_2,
tqx_3,

qxt_4,
jtqx,

qxt_hj,
hj,//空碗流水线-回到充电桩或者停车桩
}



+ 30
- 13
FryPot_DosingSystem/Control/DosingLogicControl.cs Visa fil

@@ -146,6 +146,8 @@ namespace FryPot_DosingSystem.Control
string LNinerobotJobId = string.Empty; //从线体3到清洗台路径
string LTenrobotJobId = string.Empty; //从清洗台到线体4路径

public int CleanNum = 0;//当前清洗台桶数

#endregion
/// <summary>
/// 调试命令注册
@@ -383,7 +385,7 @@ namespace FryPot_DosingSystem.Control
private void FileRegClean()
{
int days = 5; //清除期限
string[] filesOne = Directory.GetFiles("AccessFile//DB//炒锅1状态数据");
string[] filesOne = Directory.GetDirectories("AccessFile//DB//炒锅1状态数据");
if (filesOne.Count() > 0)
{
foreach (var item in filesOne)
@@ -397,7 +399,7 @@ namespace FryPot_DosingSystem.Control
}
}
}
string[] filesTwo = Directory.GetFiles("AccessFile//DB//炒锅2状态数据");
string[] filesTwo = Directory.GetDirectories("AccessFile//DB//炒锅2状态数据");
if (filesTwo.Count() > 0)
{
foreach (var item in filesTwo)
@@ -411,7 +413,7 @@ namespace FryPot_DosingSystem.Control
}
}
}
string[] filesThree = Directory.GetFiles("AccessFile//DB//炒锅3状态数据");
string[] filesThree = Directory.GetDirectories("AccessFile//DB//炒锅3状态数据");
if (filesThree.Count() > 0)
{
foreach (var item in filesThree)
@@ -425,7 +427,7 @@ namespace FryPot_DosingSystem.Control
}
}
}
string[] filesFour = Directory.GetFiles("AccessFile//DB//炒锅4状态数据");
string[] filesFour = Directory.GetDirectories("AccessFile//DB//炒锅4状态数据");
if (filesFour.Count() > 0)
{
foreach (var item in filesFour)
@@ -744,11 +746,11 @@ namespace FryPot_DosingSystem.Control

if (objData.robotJobId == LTenrobotJobId && objData.command == "LOAD")
{
globalVar.agvArriveCleanLoad = true;//agv到达清洗台料位置
globalVar.agvArriveCleanLoad = true;//agv到达清洗台料位置
}
if (objData.robotJobId == LTenrobotJobId && objData.command == "UNLOAD")
{
globalVar.agvArriveLineFour = true;//agv到达清洗台下料位置
globalVar.agvArriveLineFour = true;//agv到达线体4下料位置
}
}

@@ -846,6 +848,7 @@ namespace FryPot_DosingSystem.Control
globalVar.agvArriveLineOneLoadCom = true;
AgvViewModel.GetInstance().Set滚筒线上数量(1, (globalVar.LOneMaterialNum - 1).ToString());
AgvViewModel.GetInstance().Set小车是否承载物品(4, IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(4, CartMotionTrajectory.tqx_1);
//到清洗处
}
//线体2任务上报
@@ -854,7 +857,7 @@ namespace FryPot_DosingSystem.Control
globalVar.agvArriveLineTwoLoadCom = true;
AgvViewModel.GetInstance().Set滚筒线上数量(2, (globalVar.LTwoMaterialNum - 1).ToString());
AgvViewModel.GetInstance().Set小车是否承载物品(4, IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(4, CartMotionTrajectory.tqx_2);
//到清洗处

}
@@ -864,6 +867,7 @@ namespace FryPot_DosingSystem.Control
globalVar.agvArriveLineThreeLoadCom = true;
AgvViewModel.GetInstance().Set滚筒线上数量(3, (globalVar.LThreeMaterialNum - 1).ToString());
AgvViewModel.GetInstance().Set小车是否承载物品(4, IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(4, CartMotionTrajectory.tqx_3);
//到清洗处

}
@@ -1941,10 +1945,10 @@ namespace FryPot_DosingSystem.Control
}
private void LineFourProcessExecute()
{
//
//线体123到清洗台
AgvFromLineToCleanPlate();
AgvArriveCleanPlate();
//清洗台到线体4
CallAgvToLineFour();
CleanPlateUpLoad();
EmptyRollerToLinFour();
@@ -1955,7 +1959,11 @@ namespace FryPot_DosingSystem.Control
if (globalVar.agvArriveCleanLoad)
{
globalVar.agvArriveCleanLoad = false;
MessageLog.GetInstance.ShowRunLog("AGV到达清洗台空桶上料位置");
MessageLog.GetInstance.ShowRunLog("清洗台空桶装载完成");
AgvViewModel.GetInstance().SetCleanRollerNum(--CleanNum);
AgvViewModel.GetInstance().Set小车是否承载物品(4,IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(4, CartMotionTrajectory.qxt_4);
}
}

@@ -2047,7 +2055,7 @@ namespace FryPot_DosingSystem.Control
}
}
}
/// <summary>
/// AGV到达清洗台下料位置
/// </summary>
@@ -2058,6 +2066,10 @@ namespace FryPot_DosingSystem.Control
globalVar.agvArriveCleanUnLoad = false;
MessageLog.GetInstance.ShowRunLog("空桶到达清洗位置,准备卸桶");
MessageLog.GetInstance.ShowRunLog("卸桶完成");
AgvViewModel.GetInstance().Set小车是否承载物品(4, IsBool.No);
AgvViewModel.GetInstance().Set小车运动(4, CartMotionTrajectory.qxt_hj);
AgvViewModel.GetInstance().Set停车桩(4, IsBool.Yes);
AgvViewModel.GetInstance().SetCleanRollerNum(++CleanNum);
//plc交互
}
}
@@ -2893,6 +2905,11 @@ namespace FryPot_DosingSystem.Control
//线体四信号交互
MessageLog.GetInstance.ShowRunLog("AGV到达【4】号回收线体,准备卸桶");
MessageLog.GetInstance.ShowRunLog("卸桶完成");
AgvViewModel.GetInstance().Set滚筒线状态(4,IsRun.Start);
AgvViewModel.GetInstance().Set滚筒线上数量(4, (++globalVar.LFourRollerNum).ToString());
AgvViewModel.GetInstance().Set小车是否承载物品(4,IsBool.No);
AgvViewModel.GetInstance().Set小车运动(4,CartMotionTrajectory.hj);
AgvViewModel.GetInstance().Set停车桩(4, IsBool.Yes);
}
}
///// <summary>
@@ -3607,8 +3624,8 @@ namespace FryPot_DosingSystem.Control
if (errorCode == "SUCCESS")
{
AgvViewModel.GetInstance().Set停车桩(num, IsBool.No);
AgvViewModel.GetInstance().Set小车是否承载物品(num, IsBool.No);
AgvViewModel.GetInstance().Set小车运动(num, AgvViewModel.GetInstance().GetCommandValue($"qc_{num}"));
AgvViewModel.GetInstance().Set小车是否承载物品(4, IsBool.No);
AgvViewModel.GetInstance().Set小车运动(4, AgvViewModel.GetInstance().GetCommandValue($"tqx_{num}"));
MessageLog.GetInstance.ShowRunLog($"AGV去{num}号滚筒线装桶");
}
else if (errorCode == "Analysis Error")
@@ -3631,7 +3648,7 @@ namespace FryPot_DosingSystem.Control
{
AgvViewModel.GetInstance().Set停车桩(num, IsBool.No);
AgvViewModel.GetInstance().Set小车是否承载物品(num, IsBool.No);
AgvViewModel.GetInstance().Set小车运动(num, AgvViewModel.GetInstance().GetCommandValue($"qc_{num}"));
AgvViewModel.GetInstance().Set小车运动(num, CartMotionTrajectory.jtqx);
MessageLog.GetInstance.ShowRunLog($"AGV去{num}号滚筒线卸桶");
}
else if (errorCode == "Analysis Error")


+ 2
- 0
FryPot_DosingSystem/FryPot_DosingSystem.csproj Visa fil

@@ -12,6 +12,7 @@
<None Remove="hbl.ico" />
<None Remove="Resources\fonts\iconfont.ttf" />
<None Remove="Resources\fonts\iconfont2.ttf" />
<None Remove="Resources\pictures\战斗机.jpeg" />
</ItemGroup>

<ItemGroup>
@@ -35,6 +36,7 @@

<ItemGroup>
<Resource Include="Resources\fonts\iconfont.ttf" />
<Resource Include="Resources\pictures\战斗机.jpeg" />
</ItemGroup>

</Project>

+ 164
- 11
FryPot_DosingSystem/View/AgvView.xaml Visa fil

@@ -566,6 +566,7 @@
</Setter.Value>
</Setter>
</Style>

<Style x:Key="停车位" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="#FF1F4D69"/>
@@ -574,7 +575,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Grid Width="60" Height="55">
<Ellipse x:Name="name_11" VerticalAlignment="Bottom" Visibility="Collapsed" Margin="0,0,0,0" Fill="#FF9E4C4C" Stroke="#FF9E4141" Width="60" Height="20"></Ellipse>
<Ellipse x:Name="name_12" VerticalAlignment="Bottom" Visibility="Collapsed" Margin="0,0,0,5" Fill="#FFAD2121" Stroke="#FF9E4141" Width="40" Height="10"></Ellipse>
<Ellipse x:Name="name_21" VerticalAlignment="Bottom" Visibility="Visible" Margin="0,0,0,0" Fill="#FF4CA756" Stroke="#FF419E53" Width="60" Height="20"></Ellipse>
@@ -760,6 +761,16 @@
<PathGeometry x:Key="yc_1_3" Figures="M335,258 L334.5,490.5 680,490.99893 680,840"/>
<PathGeometry x:Key="yc_1_4" Figures="M337,256.5 L334,492 965.5,492 966.50079,840"/>
<PathGeometry x:Key="yc_1_5" Figures="M335.99357,253.70082 L334.33946,490.553 1256.2374,491.4823 1254.2358,840"/>
<!--从123线体到空桶洗桶台-->
<PathGeometry x:Key="tqx_1" Figures="M337,260 L337.5,488.5 1165,490.5 1165,410"/>
<PathGeometry x:Key="tqx_2" Figures="M488.35495,257.41892 L488.65986,490.93723 1165,490.5 1165,410"/>
<PathGeometry x:Key="tqx_3" Figures="M655.97662,256.40013 L655.68368,491.79548 1165,490.5 1165,410"/>
<!--从清洗台到4号线体-->
<PathGeometry x:Key="qxt_4" Figures="M1165,410 L1165,490.5 811.14431,490.74164 811.53039,265"/>
<!--从清洗台回家-->
<PathGeometry x:Key="qxt_hj" Figures="M1165,410 L1165,490.5 1512,491"/>
<!--从家到清洗台-->
<PathGeometry x:Key="jtqx" Figures="M1512,491 L1165,490.5 1164,410"/>
<!--送菜品路线 2号取菜口送到5个锅-->
<PathGeometry x:Key="yc_2_1" Figures="M488.35495,257.41892 L488.65986,490.93723 100,491.1112 100,840"/>
<PathGeometry x:Key="yc_2_2" Figures="M488.35495,257.41892 L488.65986,490.93723 391.20932,490.91674 391.28296,840"/>
@@ -767,11 +778,11 @@
<PathGeometry x:Key="yc_2_4" Figures="M488.35495,257.41892 L488.65986,490.93723 964.81356,491.71074 962.82129,840"/>
<PathGeometry x:Key="yc_2_5" Figures="M488.35495,257.41892 L488.65986,490.93723 1254.2358,491.20803 1254.2358,840"/>
<!--送菜品路线 3号取菜口送到5个锅-->
<PathGeometry x:Key="yc_3_1" Figures="M678.97662,256.40013 L678.68368,491.79548 100,492.63368 100,840"/>
<PathGeometry x:Key="yc_3_2" Figures="M678.97662,256.40013 L678.68368,491.79548 391.28296,488.69436 391.28296,840"/>
<PathGeometry x:Key="yc_3_3" Figures="M678.97662,256.40013 L678.68368,491.79548 680,491.67667 680,840"/>
<PathGeometry x:Key="yc_3_4" Figures="M678.97662,256.40013 L678.68368,491.79548 964.81356,490.50591 962.82129,840"/>
<PathGeometry x:Key="yc_3_5" Figures="M678.97662,256.40013 L678.68368,491.79548 1256.2374,491.4823 1254.2358,840"/>
<PathGeometry x:Key="yc_3_1" Figures="M655.97662,256.40013 L655.68368,491.79548 100,492.63368 100,840"/>
<PathGeometry x:Key="yc_3_2" Figures="M655.97662,256.40013 L655.68368,491.79548 391.28296,488.69436 391.28296,840"/>
<PathGeometry x:Key="yc_3_3" Figures="M655.97662,256.40013 L655.68368,491.79548 680,491.67667 680,840"/>
<PathGeometry x:Key="yc_3_4" Figures="M655.97662,256.40013 L655.68368,491.79548 964.81356,490.50591 962.82129,840"/>
<PathGeometry x:Key="yc_3_5" Figures="M655.97662,256.40013 L655.68368,491.79548 1256.2374,491.4823 1254.2358,840"/>
<!--送完菜品 回收路线-->
<PathGeometry x:Key="hs_1" Figures="M100,862 L99.749407,491.33482 455.92934,491.23722 811.14431,490.74164 811.53039,265"/>
<PathGeometry x:Key="hs_2" Figures="M389.82645,862.91662 L389.79339,491.26265 811.14431,490.74164 811.53039,265"/>
@@ -908,6 +919,40 @@
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="0:0:5" PathGeometry="{StaticResource hj}" Storyboard.TargetName="yunshuche" Source="X"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Duration="0:0:5" PathGeometry="{StaticResource hj}" Storyboard.TargetName="yunshuche" Source="Y"/>
</Storyboard>
<!--线体123到清洗台-->
<Storyboard x:Key="Storyboard_tqx_1" RepeatBehavior="0:0:5">
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(Angle)" Duration="0:0:5" PathGeometry="{StaticResource tqx_1}" Storyboard.TargetName="yunshuche" Source="Angle"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="0:0:5" PathGeometry="{StaticResource tqx_1}" Storyboard.TargetName="yunshuche" Source="X"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Duration="0:0:5" PathGeometry="{StaticResource tqx_1}" Storyboard.TargetName="yunshuche" Source="Y"/>
</Storyboard>
<Storyboard x:Key="Storyboard_tqx_2" RepeatBehavior="0:0:5">
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(Angle)" Duration="0:0:5" PathGeometry="{StaticResource tqx_2}" Storyboard.TargetName="yunshuche" Source="Angle"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="0:0:5" PathGeometry="{StaticResource tqx_2}" Storyboard.TargetName="yunshuche" Source="X"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Duration="0:0:5" PathGeometry="{StaticResource tqx_2}" Storyboard.TargetName="yunshuche" Source="Y"/>
</Storyboard>
<Storyboard x:Key="Storyboard_tqx_3" RepeatBehavior="0:0:5">
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(Angle)" Duration="0:0:5" PathGeometry="{StaticResource tqx_3}" Storyboard.TargetName="yunshuche" Source="Angle"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="0:0:5" PathGeometry="{StaticResource tqx_3}" Storyboard.TargetName="yunshuche" Source="X"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Duration="0:0:5" PathGeometry="{StaticResource tqx_3}" Storyboard.TargetName="yunshuche" Source="Y"/>
</Storyboard>
<!--清洗台到线体4-->
<Storyboard x:Key="Storyboard_qxt_4" RepeatBehavior="0:0:5">
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(Angle)" Duration="0:0:5" PathGeometry="{StaticResource qxt_4}" Storyboard.TargetName="yunshuche" Source="Angle"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="0:0:5" PathGeometry="{StaticResource qxt_4}" Storyboard.TargetName="yunshuche" Source="X"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Duration="0:0:5" PathGeometry="{StaticResource qxt_4}" Storyboard.TargetName="yunshuche" Source="Y"/>
</Storyboard>
<!--从清洗台回家-->
<Storyboard x:Key="Storyboard_qxt_hj" RepeatBehavior="0:0:5">
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(Angle)" Duration="0:0:5" PathGeometry="{StaticResource qxt_hj}" Storyboard.TargetName="yunshuche" Source="Angle"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="0:0:5" PathGeometry="{StaticResource qxt_hj}" Storyboard.TargetName="yunshuche" Source="X"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Duration="0:0:5" PathGeometry="{StaticResource qxt_hj}" Storyboard.TargetName="yunshuche" Source="Y"/>
</Storyboard>
<!--从家到清洗台-->
<Storyboard x:Key="Storyboard_jtqx" RepeatBehavior="0:0:5">
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(Angle)" Duration="0:0:5" PathGeometry="{StaticResource jtqx}" Storyboard.TargetName="yunshuche" Source="Angle"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="0:0:5" PathGeometry="{StaticResource jtqx}" Storyboard.TargetName="yunshuche" Source="X"/>
<DoubleAnimationUsingPath Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Duration="0:0:5" PathGeometry="{StaticResource jtqx}" Storyboard.TargetName="yunshuche" Source="Y"/>
</Storyboard>
</ControlTemplate.Resources>
<Grid x:Name="yunshuche">
<Grid.RenderTransform>
@@ -1010,6 +1055,14 @@
<StopStoryboard BeginStoryboardName="begin_hs_4"/>
<StopStoryboard BeginStoryboardName="begin_hs_5"/>

<StopStoryboard BeginStoryboardName="begin_tqx_1"/>
<StopStoryboard BeginStoryboardName="begin_tqx_2"/>
<StopStoryboard BeginStoryboardName="begin_tqx_3"/>

<StopStoryboard BeginStoryboardName="begin_qxt_4"/>
<StopStoryboard BeginStoryboardName="begin_jtqx"/>

<StopStoryboard BeginStoryboardName="begin_qxt_hj"/>
<StopStoryboard BeginStoryboardName="begin_hj"/>
</Trigger.EnterActions>
<Setter TargetName="yunshuche" Property="Visibility" Value="Collapsed" />
@@ -1168,7 +1221,45 @@
</Trigger.EnterActions>
</Trigger>
<!--#endregion-->

<!--123线体到清洗台-->
<Trigger Property="Tag" Value="tqx_1">
<Setter TargetName="yunshuche" Property="Visibility" Value="Visible" />
<Trigger.EnterActions>
<BeginStoryboard x:Name="begin_tqx_1" Storyboard="{StaticResource Storyboard_tqx_1}"/>
</Trigger.EnterActions>
</Trigger>
<Trigger Property="Tag" Value="tqx_2">
<Setter TargetName="yunshuche" Property="Visibility" Value="Visible" />
<Trigger.EnterActions>
<BeginStoryboard x:Name="begin_tqx_2" Storyboard="{StaticResource Storyboard_tqx_2}"/>
</Trigger.EnterActions>
</Trigger>
<Trigger Property="Tag" Value="tqx_3">
<Setter TargetName="yunshuche" Property="Visibility" Value="Visible" />
<Trigger.EnterActions>
<BeginStoryboard x:Name="begin_tqx_3" Storyboard="{StaticResource Storyboard_tqx_3}"/>
</Trigger.EnterActions>
</Trigger>
<Trigger Property="Tag" Value="qxt_4">
<Setter TargetName="yunshuche" Property="Visibility" Value="Visible" />
<Trigger.EnterActions>
<BeginStoryboard x:Name="begin_qxt_4" Storyboard="{StaticResource Storyboard_qxt_4}"/>
</Trigger.EnterActions>
</Trigger>
<!--从家到清洗台-->
<Trigger Property="Tag" Value="jtqx">
<Setter TargetName="yunshuche" Property="Visibility" Value="Visible" />
<Trigger.EnterActions>
<BeginStoryboard x:Name="begin_jtqx" Storyboard="{StaticResource Storyboard_jtqx}"/>
</Trigger.EnterActions>
</Trigger>
<!--从清洗台回家-->
<Trigger Property="Tag" Value="qxt_hj">
<Setter TargetName="yunshuche" Property="Visibility" Value="Visible" />
<Trigger.EnterActions>
<BeginStoryboard x:Name="begin_qxt_hj" Storyboard="{StaticResource Storyboard_qxt_hj}"/>
</Trigger.EnterActions>
</Trigger>
<!--#region 回家路线-->
<Trigger Property="Tag" Value="hj">
<Setter TargetName="yunshuche" Property="Visibility" Value="Visible" />
@@ -1247,7 +1338,7 @@
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
@@ -1294,12 +1385,13 @@
<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>
<Button Margin="5" Click="Button_Click" Tag="清洗桶数" Cursor="Hand">清洗桶数</Button>
</StackPanel>

</StackPanel>
@@ -1322,13 +1414,17 @@

<Grid x:Name="一号道路" Margin="0,80,0,0">
<Path Data="M1016.6667,415.98725 L330.95862,417.18254 331.55089,170.03705" Fill="Transparent" HorizontalAlignment="Left" Height="243" Margin="334,170,0,0" Stroke="#FF627569" StrokeDashArray="5 5" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="1160" />
<Path Data="M1016.0158,386.81528 L725.54498,387.52324 725.50328,170.91436" Fill="Transparent" HorizontalAlignment="Left" Height="215" Margin="840,172,0,0" Stroke="#FF2D3E33" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="649" />
<Path Data="M1016.0158,386.81528 L725.54498,387.52324 725.50328,170.91436" Fill="Transparent" HorizontalAlignment="Left" Height="215" Margin="840,172,0,0" Stroke="#FF2D3E33" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="300" />
<Path Data="M725.50328,386.81528 L725.50328,330.91436" Stroke="#FF2D3E33" StrokeThickness="2" Margin="414.5,-0.5,0,0" />
<Path Data="M725.50328,386.81528 L725.50328,330.91436" Stroke="#FF2D3E33" StrokeThickness="2" Margin="463.5,-0.8,0,0" />
<Path Data="M1016.0158,386.81528 L725.54498,387.52324 725.50328,170.91436 " Fill="Transparent" HorizontalAlignment="Left" Height="2" Margin="1189,384,0,0" Stroke="#FF2D3E33" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="300" RenderTransformOrigin="0.5,0.5"/>
<Path Data="M794.17358,168.8504 L795.74395,387.54981 689.48232,387.29818 689.48232,165.11694" Fill="Transparent" HorizontalAlignment="Left" Height="223" Margin="682,164,0,0" Stroke="#FF2D3E33" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="104"/>
<Path Data="M632.68285,173.84703 L633.02686,385.98646 527.43527,386.74398 526.83156,171.85808" Fill="Transparent" HorizontalAlignment="Left" Height="215" Margin="523,172,0,0" Stroke="#FF2D3E33" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="104"/>
<Path Data="M470.73348,171.25096 L470.73348,386.67023 364.24292,386.67023 364.24292,169.22349" Fill="Transparent" HorizontalAlignment="Left" Height="216" Margin="364,171,0,0" Stroke="#FF2D3E33" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="105"/>
<Path Data="M494,380.61719 L494,173.42969" Fill="Transparent" HorizontalAlignment="Left" Height="206" StrokeDashArray="5 5" Margin="494,174,0,0" Stroke="#FF627569" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="2"/>
<Path Data="M651.5,387.34183 L651.5,164.69054" Fill="Transparent" HorizontalAlignment="Left" Height="223" StrokeDashArray="5 5" Margin="652,164,0,0" Stroke="#FF627569" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="2" />
<Path Data="M812,390.42647 L812,175.98529" Fill="Transparent" HorizontalAlignment="Left" Height="213" StrokeDashArray="5 5" Margin="812,175,0,0" Stroke="#FF627569" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="2"/>
<Path Data="M812,390.42647 L812,200.98529" Fill="Transparent" HorizontalAlignment="Left" Height="56" StrokeDashArray="5 5" Margin="1163,332,0,0" Stroke="#FF627569" StrokeThickness="2" Stretch="Fill" VerticalAlignment="Top" Width="2"/>
<Path Data="M311.25,9.5 L311.25,224" Fill="Transparent" HorizontalAlignment="Left" Height="216" Margin="309,172,0,0" Stroke="#FF2D3E33" Stretch="Fill" VerticalAlignment="Top" StrokeThickness="2" Width="4"/>

</Grid>
@@ -1610,9 +1706,66 @@
<TextBox Style="{StaticResource 停车位}" Margin="0,26,0,0" Text="{Binding ParkingPileModel_3.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Style="{StaticResource 停车位}" Margin="0,25,0,0" Text="{Binding ParkingPileModel_4.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Style="{StaticResource 停车位}" Margin="0,25,0,0" Text="{Binding ParkingPileModel_5.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
<TextBox Style="{StaticResource 停车位}" Margin="0,25,0,0" Text="{Binding ParkingPileModel_6.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<TextBox Style="{StaticResource 停车位}" Margin="0,25,0,0" Text="{Binding ParkingPileModel_5.Text ,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
<!--#endregion-->
<!--新增-->
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="600,230,0,0" Width="420" Height="180">
<Viewbox>
<Canvas Width="420" Height="180">
<Path Margin="-75,0,0,0">
<Path.Fill>
<LinearGradientBrush >
<GradientStop Offset="0" Color="Gray"/>
<GradientStop Offset="0.5" Color="White"/>
<GradientStop Offset="1" Color="Gray"/>
<LinearGradientBrush.RelativeTransform>
<RotateTransform Angle="-5"/>
</LinearGradientBrush.RelativeTransform>
</LinearGradientBrush>
</Path.Fill>
<Path.Data>
<PathGeometry Figures="M 186.6,67.5 Q 279.9,33.75 373.2,67.5 L391.86,33.075 Q298.56,1.125 205.26,33.075 L183.801,67.275"/>
</Path.Data>
</Path>
<Path Margin="-75,0,0,0">
<Path.Fill>
<LinearGradientBrush>
<GradientStop Offset="0.3" Color="Gray"/>
<GradientStop Offset="0.7" Color="White"/>
</LinearGradientBrush>
</Path.Fill>
<Path.Data>
<PathGeometry Figures="M374.133,90 L374.133,66.825 391.86,33.075 391.86,56.25 374.133,89.775"/>
</Path.Data>
</Path>
<Path Margin="-75,0,0,0">
<Path.Fill>
<LinearGradientBrush>
<GradientStop Offset="0.6" Color="AntiqueWhite"/>
<GradientStop Offset="0" Color="SlateGray"/>
<LinearGradientBrush.RelativeTransform>
<RotateTransform Angle="35"/>
</LinearGradientBrush.RelativeTransform>
</LinearGradientBrush>
</Path.Fill>
<Path.Data>
<PathGeometry Figures="M185.667,90 L242.58,67.5 Q279.9,51.75 317.22,67.5 L373.2,90 373.2,66.825 Q279.9,33.75 186.6,67.5 L186.6,66.825 186.6,90"/>
</Path.Data>
</Path>
<TextBlock Text="当前桶数:" Style="{DynamicResource 80号字体样式}" Canvas.Left="94" Canvas.Top="115" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<TextBlock Text="{Binding DataContext.RollerNum, RelativeSource={RelativeSource AncestorType=Canvas, Mode=FindAncestor}}" FontSize="24" Style="{DynamicResource 80号字体样式}" Canvas.Left="195" Canvas.Top="111" HorizontalAlignment="Center" VerticalAlignment="Top" />
<!--<TextBox1 Style="{StaticResource 传送带空}" IsEnabled="False" Text="{Binding RollerLines_4.Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Tag="{Binding RollerLines_4.DishesNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Canvas.Left="176" Canvas.Top="73" HorizontalAlignment="Center" VerticalAlignment="Top">
<TextBox.RenderTransform>
<ScaleTransform ScaleY="0.48"/>
</TextBox.RenderTransform>
</TextBox>-->
</Canvas>
</Viewbox>

</StackPanel>
<TextBlock Style="{DynamicResource 80号字体样式}" VerticalAlignment="Top" Margin="950,250,0,0" FontSize="16" Width="16" >空桶清洗台</TextBlock>
</Grid>

</UserControl>

+ 3
- 1
FryPot_DosingSystem/View/AgvView.xaml.cs Visa fil

@@ -187,7 +187,9 @@ namespace FryPot_DosingSystem.View
}
AgvViewModel.GetInstance().Set启动或停止炒锅(id, IsRun.Stop);
break;

case "清洗桶数":
AgvViewModel.GetInstance().SetCleanRollerNum(2);
break;
}
}
}


+ 7
- 0
FryPot_DosingSystem/ViewModel/AgvViewModel.cs Visa fil

@@ -19,6 +19,9 @@ namespace FryPot_DosingSystem.ViewModel
#region 单例模式
private volatile static AgvViewModel _Instance;
public static AgvViewModel GetInstance() => _Instance ?? (_Instance = new AgvViewModel());

public int RollerNum { get { return _rollerNum; } set { _rollerNum = value;OnPropertyChanged(); } }
private int _rollerNum;
public AgvViewModel()
{
Init();
@@ -67,6 +70,10 @@ namespace FryPot_DosingSystem.ViewModel
new WorkflowModel {id=1,Name="取番茄",isBool= IsBool.Yes},
new WorkflowModel {id=2,Name="取蛋" } };
}
public void SetCleanRollerNum(int num)
{
RollerNum = num;
}
/// <summary>
/// 设置停车桩或充电桩
/// </summary>


Laddar…
Avbryt
Spara