Browse Source

morkt

样式分支
NXX 2 years ago
parent
commit
a532aa47bc
19 changed files with 93 additions and 80 deletions
  1. +9
    -0
      BPASmartClient.Lebai/LebaiRobot.cs
  2. +6
    -0
      BPASmartClient.Model/乐白机器人/LebaiRobotEvent.cs
  3. +5
    -3
      BPASmartClient.MorkT/Control_MorkT.cs
  4. +7
    -7
      BPASmartClient.MorkT/View/DebugView.xaml
  5. +9
    -5
      BPASmartClient.MorkT_HQ/Control_MorkT_HQ.cs
  6. +2
    -2
      BPASmartClient.MorkT_HQ/GLV_MorkT_HQ.cs
  7. +1
    -1
      BPASmartClient.MorkT_HQ/OrderLocInfo.cs
  8. +2
    -1
      BPASmartClient.MorkT_HQ/PolymerBatching.cs
  9. +5
    -46
      BPASmartClient.MorkT_HQ/View/DebugView.xaml
  10. +1
    -1
      BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs
  11. +3
    -3
      BPASmartClient.MorkT_HQ/View/Monitor.xaml
  12. +1
    -1
      BPASmartClient.MorkT_HQ/View/Monitor.xaml.cs
  13. +2
    -2
      BPASmartClient.MorkT_HQ/View/ParSer.xaml
  14. +1
    -1
      BPASmartClient.MorkT_HQ/View/ParSer.xaml.cs
  15. +1
    -1
      BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs
  16. +1
    -1
      BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs
  17. +1
    -0
      BPASmartClient/MainWindow.xaml
  18. +9
    -1
      BPASmartClient/MainWindow.xaml.cs
  19. +27
    -4
      SmartClient.sln

+ 9
- 0
BPASmartClient.Lebai/LebaiRobot.cs View File

@@ -133,6 +133,15 @@ namespace BPASmartClient.Lebai
}
});

EventBus.EventBus.GetInstance().Subscribe<LebaiRobot_SetOutPutEvent>(DeviceId, delegate (IEvent @event, EventCallBackHandle callBack)
{
if (@event == null) return;
if (@event is LebaiRobot_LebaiSenceEvent lebaiSenceEvent)
{
}
});

InitStatus();
Start();
MessageLog.GetInstance.Show("乐白机器人初始化完成");


+ 6
- 0
BPASmartClient.Model/乐白机器人/LebaiRobotEvent.cs View File

@@ -45,4 +45,10 @@ namespace BPASmartClient.Model.乐白机器人
public int LebaiSence { get; set; }

}

public class LebaiRobot_SetOutPutEvent : BaseEvent
{
public int RobotSetOut { get; set; }
}
}


+ 5
- 3
BPASmartClient.MorkT/Control_MorkT.cs View File

@@ -660,9 +660,11 @@ namespace BPASmartClient.MorkT
bool doItResult = true;

//出料
EventBus.EventBus.GetInstance().Publish(new SCChip_RotorSwitchEvent { DeviceId = DeviceId, TurnOn = true });
Thread.Sleep(500);
EventBus.EventBus.GetInstance().Publish(new SCChip_RotorSwitchEvent { DeviceId = DeviceId, TurnOn = false });
//EventBus.EventBus.GetInstance().Publish(new SCChip_RotorSwitchEvent { DeviceId = DeviceId, TurnOn = true });
//Thread.Sleep(500);
//EventBus.EventBus.GetInstance().Publish(new SCChip_RotorSwitchEvent { DeviceId = DeviceId, TurnOn = false });
//EventBus.EventBus.GetInstance().Publish(new LebaiRobot_LebaiSenceEvent { DeviceId=DeviceId,})

Thread.Sleep(500);
EventBus.EventBus.GetInstance().Publish(new SCChip_MakeIceCreamEvent { DeviceId = DeviceId, SteeringEngine = IC_SE.SE_2 });//冰淇淋出料
DeviceProcessLogShow("开始等待6s");


+ 7
- 7
BPASmartClient.MorkT/View/DebugView.xaml View File

@@ -25,7 +25,7 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="14*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="20*"/>
</Grid.RowDefinitions>

@@ -62,20 +62,20 @@
</ControlTemplate>
</ListBox.Template>
<Button Content="机器人启动"
Margin="20,5" Width="150" Height="40"
Margin="20,5" Width="150" Height="60"
Command="{Binding Button_RobotControlCommand}"
CommandParameter="机器人启动">
CommandParameter="机器人启动" Cursor="Hand">
</Button>
<Button Content="启动示教"
Margin="20,5" Width="150" Height="40"
Margin="20,5" Width="150" Height="60"
Command="{Binding Button_RobotControlCommand}"
CommandParameter="启动示教"/>
<Button Content="停止示教"
Margin="20,5" Width="150" Height="40"
Margin="20,5" Width="150" Height="60"
Command="{Binding Button_RobotControlCommand}"
CommandParameter="停止示教"/>
<Button Content="机器人急停"
Margin="20,5" Width="110" Height="40"
Margin="20,5" Width="110" Height="60"
Command="{Binding Button_RobotControlCommand}"
CommandParameter="机器人急停"/>

@@ -197,7 +197,7 @@
<Button Content="咖啡杯落杯" Height="40" Width="120"
Command="{Binding Button_CupControlCommand}"
CommandParameter="CUP_COFFEE"
Margin="10,10,50,10"/>
Margin="10,10,50,10" Cursor="Hand"/>
<Button Content="冰淇淋杯落杯" Height="40" Width="120"
Command="{Binding Button_CupControlCommand}"
CommandParameter="CUP_ICECREAM" Margin="10,10,50,10"


BPASmartClient.MorkT_HQ/Control_MorkT.cs → BPASmartClient.MorkT_HQ/Control_MorkT_HQ.cs View File

@@ -22,13 +22,13 @@ using System.Threading;
using System.Threading.Tasks;
using static BPASmartClient.EventBus.EventBus;

namespace BPASmartClient.MorkT
namespace BPASmartClient.MorkT_HQ
{
public class Control_MorkT : BaseDevice
public class Control_MorkT_HQ : BaseDevice
{
public override global::BPA.Message.Enum.DeviceClientType DeviceType { get { return BPA.Message.Enum.DeviceClientType.MORKT; } }

GLV_MorkT morkT = new GLV_MorkT();
GLV_MorkT_HQ morkT = new GLV_MorkT_HQ();


public override void DoMain()
@@ -55,7 +55,7 @@ namespace BPASmartClient.MorkT
public override void ResetProgram()
{
morkT = null;
morkT = new GLV_MorkT();
morkT = new GLV_MorkT_HQ();
}


@@ -341,7 +341,6 @@ namespace BPASmartClient.MorkT
}
}

}
});
}
@@ -758,5 +757,10 @@ namespace BPASmartClient.MorkT
Thread.Sleep(5000);

}

public override void SimOrder()
{
throw new NotImplementedException();
}
}
}

BPASmartClient.MorkT_HQ/GLV_MorkT.cs → BPASmartClient.MorkT_HQ/GLV_MorkT_HQ.cs View File

@@ -11,9 +11,9 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkT
namespace BPASmartClient.MorkT_HQ
{
public class GLV_MorkT:IStatus
public class GLV_MorkT_HQ:IStatus
{
/// <summary>
/// 咖啡订单队列

+ 1
- 1
BPASmartClient.MorkT_HQ/OrderLocInfo.cs View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkT
namespace BPASmartClient.MorkT_HQ
{
public class OrderLocInfo
{


+ 2
- 1
BPASmartClient.MorkT_HQ/PolymerBatching.cs View File

@@ -8,13 +8,14 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.MorkT
namespace BPASmartClient.MorkT_HQ
{
public enum GOODS_TYPE
{
NEITHER,
COFFEE,
ICECREAM,
JUICE
}

public enum BATCHING_CLASS


+ 5
- 46
BPASmartClient.MorkT_HQ/View/DebugView.xaml View File

@@ -1,14 +1,14 @@
<UserControl x:Class="BPASmartClient.MorkT.View.DebugView"
<UserControl x:Class="BPASmartClient.MorkT_HQ.View.DebugView"
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:vm ="clr-namespace:BPASmartClient.MorkT.ViewModel"
xmlns:vm ="clr-namespace:BPASmartClient.MorkT_HQ.ViewModel"
mc:Ignorable="d"
Name="调试界面"
d:DesignHeight="500" d:DesignWidth="1000" Unloaded="Dubug_Unloaded">
<UserControl.DataContext>
<vm:DebugViewModel/>
<vm:DebugViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<ResourceDictionary>
@@ -82,7 +82,7 @@
</ListBox>
</Grid>
</GroupBox>
<!--<GroupBox Grid.Row="2"
<GroupBox Grid.Row="2"
FontFamily="楷体"
FontSize="20"
Header=" 冰淇淋机器 ">
@@ -172,49 +172,8 @@
</StackPanel>
</StackPanel>
</Grid>
</GroupBox>-->
<GroupBox Grid.Row="2" Grid.Column="0"
FontSize="20" FontFamily="楷体"
Header="单片机冰淇淋" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="5*"/>
</Grid.RowDefinitions>
<TextBlock Text="连接状态" />
<TextBlock Text="{Binding SCChipIsConnect}"
Margin="120,0,0,0"/>
<TextBlock Grid.Row="1" Text="单片机控制" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<ListBox Grid.Row="2" Background="Transparent">
<ListBox.Template>
<ControlTemplate TargetType="{x:Type ListBox}">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<WrapPanel Orientation="Horizontal" IsItemsHost="True" ScrollViewer.CanContentScroll="True"/>
</ScrollViewer>
</ControlTemplate>
</ListBox.Template>
<Button Content="咖啡杯落杯" Height="40" Width="120"
Command="{Binding Button_CupControlCommand}"
CommandParameter="CUP_COFFEE"
Margin="10,10,50,10"/>
<Button Content="冰淇淋杯落杯" Height="40" Width="120"
Command="{Binding Button_CupControlCommand}"
CommandParameter="CUP_ICECREAM" Margin="10,10,50,10"
/>
<Button Content="单片机冰淇淋制冷" Height="40" Width="120"
Command="{Binding Button_SCChipRefrigerationCommand}" Cursor="Hand"
Margin="10,10,50,10"
/>
<Button Content="单片机冰淇淋打料" Height="40" Width="120" Margin="10,10,50,10"
Command="{Binding Button_SCChipDischargeCommand}" Cursor="Hand" />
<Button Content="单片机冰淇淋模拟" Height="40" Width="120"
Command="{Binding Button_SCChipTestCommand}" Cursor="Hand"
Margin="10,10,50,10"/>

</ListBox>
</Grid>
</GroupBox>
<GroupBox Grid.Row="2" Grid.Column="1"
FontFamily="楷体"


+ 1
- 1
BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs View File

@@ -14,7 +14,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.MorkT.View
namespace BPASmartClient.MorkT_HQ.View
{
/// <summary>
/// MorkT_DebugView.xaml 的交互逻辑


+ 3
- 3
BPASmartClient.MorkT_HQ/View/Monitor.xaml View File

@@ -1,10 +1,10 @@
<UserControl x:Class="BPASmartClient.MorkT.View.Monitor"
<UserControl x:Class="BPASmartClient.MorkT_HQ.View.Monitor"
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:BPASmartClient.MorkT.View"
xmlns:vm="clr-namespace:BPASmartClient.MorkT.ViewModel"
xmlns:local="clr-namespace:BPASmartClient.MorkT_HQ.View"
xmlns:vm="clr-namespace:BPASmartClient.MorkT_HQ.ViewModel"
mc:Ignorable="d"
Name="监控画面"
d:DesignHeight="450" d:DesignWidth="800" Unloaded="Monitor_Unloaded">


+ 1
- 1
BPASmartClient.MorkT_HQ/View/Monitor.xaml.cs View File

@@ -14,7 +14,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.MorkT.View
namespace BPASmartClient.MorkT_HQ.View
{
/// <summary>
/// Monitor.xaml 的交互逻辑


+ 2
- 2
BPASmartClient.MorkT_HQ/View/ParSer.xaml View File

@@ -1,9 +1,9 @@
<UserControl x:Class="BPASmartClient.MorkT.View.ParSer"
<UserControl x:Class="BPASmartClient.MorkT_HQ.View.ParSer"
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:BPASmartClient.MorkT.View"
xmlns:local="clr-namespace:BPASmartClient.MorkT_HQ.View"
mc:Ignorable="d"
Name="参数设置界面"
d:DesignHeight="450" d:DesignWidth="800">


+ 1
- 1
BPASmartClient.MorkT_HQ/View/ParSer.xaml.cs View File

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.MorkT.View
namespace BPASmartClient.MorkT_HQ.View
{
/// <summary>
/// ParSer.xaml 的交互逻辑


+ 1
- 1
BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs View File

@@ -20,7 +20,7 @@ using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;

namespace BPASmartClient.MorkT.ViewModel
namespace BPASmartClient.MorkT_HQ.ViewModel
{
public class DebugViewModel : ObservableObject
{


+ 1
- 1
BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs View File

@@ -12,7 +12,7 @@ using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;

namespace BPASmartClient.MorkT.ViewModel
namespace BPASmartClient.MorkT_HQ.ViewModel
{

public class MonitorViewModel: ObservableObject


+ 1
- 0
BPASmartClient/MainWindow.xaml View File

@@ -16,6 +16,7 @@
Topmost="False"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
WindowState="Maximized"
mc:Ignorable="d">
<Window.Resources>
<ResourceDictionary>


+ 9
- 1
BPASmartClient/MainWindow.xaml.cs View File

@@ -60,7 +60,15 @@ namespace BPASmartClient
/// </summary>
private void Initialize()
{
this.ButClose.Click += (o, e) => { this.Close(); };
this.ButClose.Click += (o, e) =>
{
MessageBoxResult res = MessageBox.Show("确定关闭上位机软件?", "警告", MessageBoxButton.OKCancel);
if(res == MessageBoxResult.OK)
{
this.Close();
}
};
this.br.MouseLeftButtonDown += (o, e) =>
{
if (e.ClickCount > 1)


+ 27
- 4
SmartClient.sln View File

@@ -84,13 +84,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkTLebaiJC
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkTJAKAJC", "BPASmartClient.Morkt.JAKA.JC\BPASmartClient.MorkTJAKAJC.csproj", "{6B0FD858-A60D-41B9-A923-358B0CE2A254}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.MCU", "BPASmartClient.MCU\BPASmartClient.MCU.csproj", "{1C7E17B3-40E0-44ED-B8E0-C52D824604DB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MCU", "BPASmartClient.MCU\BPASmartClient.MCU.csproj", "{1C7E17B3-40E0-44ED-B8E0-C52D824604DB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.JakaRobot", "BPASmartClient.JakaRobot\BPASmartClient.JakaRobot.csproj", "{1055EA6E-6C10-4A0D-A053-85871AF8D7A9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.JakaRobot", "BPASmartClient.JakaRobot\BPASmartClient.JakaRobot.csproj", "{1055EA6E-6C10-4A0D-A053-85871AF8D7A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.JAKA", "BPASmartClient.JAKA\BPASmartClient.JAKA.csproj", "{C935435D-6182-4A01-8E59-B832B2FF0D72}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.JAKA", "BPASmartClient.JAKA\BPASmartClient.JAKA.csproj", "{C935435D-6182-4A01-8E59-B832B2FF0D72}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.Juicer", "BPASmartClient.Juicer\BPASmartClient.Juicer.csproj", "{C28A88B1-E449-484C-AC67-B5038FF2CA79}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.Juicer", "BPASmartClient.Juicer\BPASmartClient.Juicer.csproj", "{C28A88B1-E449-484C-AC67-B5038FF2CA79}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkT_HQ", "BPASmartClient.MorkT_HQ\BPASmartClient.MorkT_HQ.csproj", "{00C17D87-A323-4A97-BC21-7039E55614DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -826,6 +828,26 @@ Global
{C28A88B1-E449-484C-AC67-B5038FF2CA79}.Release|x64.Build.0 = Release|Any CPU
{C28A88B1-E449-484C-AC67-B5038FF2CA79}.Release|x86.ActiveCfg = Release|Any CPU
{C28A88B1-E449-484C-AC67-B5038FF2CA79}.Release|x86.Build.0 = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|ARM.ActiveCfg = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|ARM.Build.0 = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|ARM64.Build.0 = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|x64.ActiveCfg = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|x64.Build.0 = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|x86.ActiveCfg = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Debug|x86.Build.0 = Debug|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|Any CPU.Build.0 = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|ARM.ActiveCfg = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|ARM.Build.0 = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|ARM64.ActiveCfg = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|ARM64.Build.0 = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|x64.ActiveCfg = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|x64.Build.0 = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|x86.ActiveCfg = Release|Any CPU
{00C17D87-A323-4A97-BC21-7039E55614DE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -867,6 +889,7 @@ Global
{1055EA6E-6C10-4A0D-A053-85871AF8D7A9} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625}
{C935435D-6182-4A01-8E59-B832B2FF0D72} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD}
{C28A88B1-E449-484C-AC67-B5038FF2CA79} = {666CB1A9-562E-453A-A2C7-FD9D77CFDFDD}
{00C17D87-A323-4A97-BC21-7039E55614DE} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


Loading…
Cancel
Save