@@ -87,6 +87,7 @@ | |||
<None Remove="Image\上箭头.png" /> | |||
<None Remove="Image\不规则矩形.png" /> | |||
<None Remove="Image\个人信息.png" /> | |||
<None Remove="Image\中间.png" /> | |||
<None Remove="Image\临时模板.png" /> | |||
<None Remove="Image\产品制作.png" /> | |||
<None Remove="Image\光柱.png" /> | |||
@@ -113,6 +114,8 @@ | |||
<None Remove="Image\圆角矩形 30 拷贝.png" /> | |||
<None Remove="Image\圆角矩形 4.png" /> | |||
<None Remove="Image\圆角矩形.png" /> | |||
<None Remove="Image\外边框1.png" /> | |||
<None Remove="Image\容器边框2.png" /> | |||
<None Remove="Image\工艺流程.jpg" /> | |||
<None Remove="Image\工艺流程.png" /> | |||
<None Remove="Image\底部背景.png" /> | |||
@@ -122,6 +125,10 @@ | |||
<None Remove="Image\按钮\停用.png" /> | |||
<None Remove="Image\按钮\添加.png" /> | |||
<None Remove="Image\弹窗.png" /> | |||
<None Remove="Image\按钮\组 7.png" /> | |||
<None Remove="Image\按钮\组 8.png" /> | |||
<None Remove="Image\按钮背景蓝色.png" /> | |||
<None Remove="Image\按钮背景黄.png" /> | |||
<None Remove="Image\搜索按钮.png" /> | |||
<None Remove="Image\搜索框.png" /> | |||
<None Remove="Image\文字.png" /> | |||
@@ -131,6 +138,7 @@ | |||
<None Remove="Image\智慧城市科技风登录页面边框.png" /> | |||
<None Remove="Image\有告警.png" /> | |||
<None Remove="Image\权限背景.png" /> | |||
<None Remove="Image\标签.png" /> | |||
<None Remove="Image\标题背景.png" /> | |||
<None Remove="Image\浅色背景.jpeg" /> | |||
<None Remove="Image\环形切图\内圈\未选中.png" /> | |||
@@ -141,9 +149,12 @@ | |||
<None Remove="Image\界面2.png" /> | |||
<None Remove="Image\登录界面背景.jpg" /> | |||
<None Remove="Image\登录界面背景1.jpg" /> | |||
<None Remove="Image\直线.png" /> | |||
<None Remove="Image\矩形.png" /> | |||
<None Remove="Image\矩形1.png" /> | |||
<None Remove="Image\矩形2.png" /> | |||
<None Remove="Image\矩形样式.png" /> | |||
<None Remove="Image\矩形边框.png" /> | |||
<None Remove="Image\窗体样式\datagrid\data_标题栏背景.png" /> | |||
<None Remove="Image\窗体样式\datagrid\data_行背景.png" /> | |||
<None Remove="Image\窗体样式\From\内部背景.png" /> | |||
@@ -186,12 +197,14 @@ | |||
<None Remove="Image\背景2.png" /> | |||
<None Remove="Image\背景3.jpg" /> | |||
<None Remove="Image\背景图片.png" /> | |||
<None Remove="Image\背景框.png" /> | |||
<None Remove="Image\背景矢量\内部.png" /> | |||
<None Remove="Image\背景矢量\右上.png" /> | |||
<None Remove="Image\背景矢量\右下.png" /> | |||
<None Remove="Image\背景矢量\左上.png" /> | |||
<None Remove="Image\背景矢量\左下.png" /> | |||
<None Remove="Image\背景矢量\矢量智能对象.png" /> | |||
<None Remove="Image\背景边框4.png" /> | |||
<None Remove="Image\营销额.png" /> | |||
<None Remove="Image\蓝色背景.png" /> | |||
<None Remove="Image\蓝边框.png" /> | |||
@@ -212,6 +225,12 @@ | |||
<None Remove="Image\退出.png" /> | |||
<None Remove="Image\退出按钮.png" /> | |||
<None Remove="Image\透明背景.png" /> | |||
<None Remove="Image\配方背景\圆角矩形.png" /> | |||
<None Remove="Image\配方背景\竖背景框.png" /> | |||
<None Remove="Image\配方背景\组 5.png" /> | |||
<None Remove="Image\配方背景\蓝色背景.png" /> | |||
<None Remove="Image\配方背景\蓝色背景2.png" /> | |||
<None Remove="Image\配方背景\黄色背景.png" /> | |||
<None Remove="Image\阴影边框.png" /> | |||
<None Remove="Image\顶部.png" /> | |||
<None Remove="Image\顶部切图\Button_No.png" /> | |||
@@ -278,6 +297,7 @@ | |||
<Resource Include="Image\textBox.png" /> | |||
<Resource Include="Image\WindowImages.png" /> | |||
<Resource Include="Image\上箭头.png" /> | |||
<Resource Include="Image\中间.png" /> | |||
<Resource Include="Image\临时模板.png" /> | |||
<Resource Include="Image\产品制作.png" /> | |||
<Resource Include="Image\光柱.png" /> | |||
@@ -288,6 +308,8 @@ | |||
<Resource Include="Image\告警\无告警.png" /> | |||
<Resource Include="Image\告警\无告警1.png" /> | |||
<Resource Include="Image\告警\轻微告警.png" /> | |||
<Resource Include="Image\外边框1.png" /> | |||
<Resource Include="Image\容器边框2.png" /> | |||
<Resource Include="Image\工艺流程.jpg" /> | |||
<Resource Include="Image\工艺流程.png" /> | |||
<Resource Include="Image\弹窗2.png" /> | |||
@@ -296,9 +318,14 @@ | |||
<Resource Include="Image\按钮\停用.png" /> | |||
<Resource Include="Image\按钮\添加.png" /> | |||
<Resource Include="Image\弹窗.png" /> | |||
<Resource Include="Image\按钮\组 7.png" /> | |||
<Resource Include="Image\按钮\组 8.png" /> | |||
<Resource Include="Image\按钮背景蓝色.png" /> | |||
<Resource Include="Image\按钮背景黄.png" /> | |||
<Resource Include="Image\智慧城市科技风登录页面.png" /> | |||
<Resource Include="Image\智慧城市科技风登录页面边框.png" /> | |||
<Resource Include="Image\权限背景.png" /> | |||
<Resource Include="Image\标签.png" /> | |||
<Resource Include="Image\浅色背景.jpeg" /> | |||
<Resource Include="Image\界面2.png"> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
@@ -306,6 +333,9 @@ | |||
<Resource Include="Image\圆角矩形 30 拷贝.png" /> | |||
<Resource Include="Image\登录界面背景.jpg" /> | |||
<Resource Include="Image\登录界面背景1.jpg" /> | |||
<Resource Include="Image\直线.png" /> | |||
<Resource Include="Image\矩形2.png" /> | |||
<Resource Include="Image\矩形边框.png" /> | |||
<Resource Include="Image\系统名称.png" /> | |||
<Resource Include="Image\红色圆角矩形背景.png" /> | |||
<Resource Include="Image\纹理背景.jpeg" /> | |||
@@ -314,6 +344,8 @@ | |||
<Resource Include="Image\组合边框1.png" /> | |||
<Resource Include="Image\背景2.png" /> | |||
<Resource Include="Image\背景3.jpg" /> | |||
<Resource Include="Image\背景框.png" /> | |||
<Resource Include="Image\背景边框4.png" /> | |||
<Resource Include="Image\蓝色背景.png" /> | |||
<Resource Include="Image\蓝边框.png" /> | |||
<Resource Include="Image\调味品.jpeg" /> | |||
@@ -326,6 +358,12 @@ | |||
<Resource Include="Image\告警\Wifi_NO.ico" /> | |||
<Resource Include="Image\告警\Wifi_OK.ico" /> | |||
<Resource Include="Image\透明背景.png" /> | |||
<Resource Include="Image\配方背景\圆角矩形.png" /> | |||
<Resource Include="Image\配方背景\竖背景框.png" /> | |||
<Resource Include="Image\配方背景\组 5.png" /> | |||
<Resource Include="Image\配方背景\蓝色背景.png" /> | |||
<Resource Include="Image\配方背景\蓝色背景2.png" /> | |||
<Resource Include="Image\配方背景\黄色背景.png" /> | |||
<Resource Include="Image\阴影边框.png" /> | |||
<Resource Include="Image\顶部切图\Button_No.png" /> | |||
<Resource Include="Image\顶部切图\Button_Select.png" /> | |||
@@ -42,7 +42,7 @@ namespace BPASmartClient.CustomResource.Pages.Model | |||
} | |||
} | |||
Thread.Sleep(100); | |||
}), $"{typeof(AlarmT)},报警通用模块监听"); | |||
}), $"{typeof(AlarmT).Name},报警通用模块监听"); | |||
} | |||
@@ -291,21 +291,21 @@ | |||
StrokeThickness="4" /> | |||
<ToggleButton | |||
IsEnabled="False" | |||
Name="LeftTog" | |||
Width="30" | |||
Height="30" | |||
Margin="120,35,0,0" | |||
HorizontalAlignment="Left" | |||
IsEnabled="False" | |||
Style="{StaticResource toggleButtonStyle}" /> | |||
<ToggleButton | |||
IsEnabled="False" | |||
Name="RightTog" | |||
Width="30" | |||
Height="30" | |||
Margin="325,35,0,0" | |||
HorizontalAlignment="Left" | |||
IsEnabled="False" | |||
Style="{StaticResource toggleButtonStyle}" /> | |||
<!--<Ellipse | |||
@@ -0,0 +1,96 @@ | |||
<UserControl | |||
x:Class="BPASmartClient.CustomResource.UserControls.ImageBorder" | |||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||
xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls" | |||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||
d:DesignHeight="450" | |||
d:DesignWidth="800" | |||
mc:Ignorable="d"> | |||
<UserControl.Resources> | |||
<SolidColorBrush x:Key="borderColor" Color="#552AB2E7" /> | |||
</UserControl.Resources> | |||
<Grid Name="gr"> | |||
<Viewbox Width="auto" Height="auto"> | |||
<Canvas Width="{Binding ElementName=gr, Path=ActualWidth}" Height="{Binding ElementName=gr, Path=ActualHeight}"> | |||
<Canvas.Background> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/矩形2.png" Stretch="Fill" /> | |||
</Canvas.Background> | |||
<Grid> | |||
<Border | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
BorderBrush="{StaticResource borderColor}" | |||
BorderThickness="0.5" /> | |||
<Border | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
VerticalAlignment="Bottom" | |||
BorderBrush="{StaticResource borderColor}" | |||
BorderThickness="0.5" /> | |||
<Border | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
BorderBrush="{StaticResource borderColor}" | |||
BorderThickness="0.5" /> | |||
<Border | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
HorizontalAlignment="Right" | |||
BorderBrush="{StaticResource borderColor}" | |||
BorderThickness="0.5" /> | |||
<!--<Image | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
VerticalAlignment="Top" | |||
Source="/BPASmartClient.CustomResource;component/Image/直线.png" | |||
Stretch="Fill" /> | |||
<Image | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
VerticalAlignment="Bottom" | |||
Source="/BPASmartClient.CustomResource;component/Image/直线.png" /> | |||
<Image | |||
Width="{Binding ElementName=gr, Path=ActualHeight}" | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
RenderTransformOrigin="0,0.1" | |||
Source="/BPASmartClient.CustomResource;component/Image/直线.png"> | |||
<Image.RenderTransform> | |||
<TransformGroup> | |||
<ScaleTransform /> | |||
<SkewTransform /> | |||
<RotateTransform Angle="90" /> | |||
<TranslateTransform /> | |||
</TransformGroup> | |||
</Image.RenderTransform> | |||
</Image> | |||
<Image | |||
Width="{Binding ElementName=gr, Path=ActualHeight}" | |||
HorizontalAlignment="Right" | |||
VerticalAlignment="Bottom" | |||
RenderTransformOrigin="1,0" | |||
Source="/BPASmartClient.CustomResource;component/Image/直线.png"> | |||
<Image.RenderTransform> | |||
<TransformGroup> | |||
<ScaleTransform /> | |||
<SkewTransform /> | |||
<RotateTransform Angle="90" /> | |||
<TranslateTransform /> | |||
</TransformGroup> | |||
</Image.RenderTransform> | |||
</Image>--> | |||
<Path Name="leftTop" Stroke="Aqua" /> | |||
<Path Name="rightTop" Stroke="Aqua" /> | |||
<Path Name="leftBottom" Stroke="Aqua" /> | |||
<Path Name="rightBottom" Stroke="Aqua" /> | |||
</Grid> | |||
</Canvas> | |||
</Viewbox> | |||
</Grid> | |||
</UserControl> |
@@ -0,0 +1,67 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
using System.Windows.Controls; | |||
using System.Windows.Data; | |||
using System.Windows.Documents; | |||
using System.Windows.Input; | |||
using System.Windows.Media; | |||
using System.Windows.Media.Imaging; | |||
using System.Windows.Navigation; | |||
using System.Windows.Shapes; | |||
namespace BPASmartClient.CustomResource.UserControls | |||
{ | |||
/// <summary> | |||
/// ImageBorder.xaml 的交互逻辑 | |||
/// </summary> | |||
public partial class ImageBorder : UserControl | |||
{ | |||
public ImageBorder() | |||
{ | |||
InitializeComponent(); | |||
this.SizeChanged += ImageBorder_SizeChanged; | |||
} | |||
private void ImageBorder_SizeChanged(object sender, SizeChangedEventArgs e) | |||
{ | |||
double min = Math.Min(this.Width, this.Height); | |||
PathGeometry geometry = new PathGeometry(); | |||
PathFigure pathFigure = new PathFigure(); | |||
pathFigure.StartPoint = new Point(15, 0); | |||
pathFigure.Segments.Add(new LineSegment(new Point(0, 0), true)); | |||
pathFigure.Segments.Add(new LineSegment(new Point(0, 15), true)); | |||
geometry.Figures.Add(pathFigure); | |||
this.leftTop.Data = geometry; | |||
geometry = new PathGeometry(); | |||
pathFigure = new PathFigure(); | |||
pathFigure.StartPoint = new Point(this.Width - 15, 0); | |||
pathFigure.Segments.Add(new LineSegment(new Point(this.Width, 0), true)); | |||
pathFigure.Segments.Add(new LineSegment(new Point(this.Width, 15), true)); | |||
geometry.Figures.Add(pathFigure); | |||
this.rightTop.Data = geometry; | |||
geometry = new PathGeometry(); | |||
pathFigure = new PathFigure(); | |||
pathFigure.StartPoint = new Point(0, this.Height - 15); | |||
pathFigure.Segments.Add(new LineSegment(new Point(0, this.Height), true)); | |||
pathFigure.Segments.Add(new LineSegment(new Point(15, this.Height), true)); | |||
geometry.Figures.Add(pathFigure); | |||
this.leftBottom.Data = geometry; | |||
geometry = new PathGeometry(); | |||
pathFigure = new PathFigure(); | |||
pathFigure.StartPoint = new Point(this.Width - 15, this.Height); | |||
pathFigure.Segments.Add(new LineSegment(new Point(this.Width, this.Height), true)); | |||
pathFigure.Segments.Add(new LineSegment(new Point(this.Width, this.Height - 15), true)); | |||
geometry.Figures.Add(pathFigure); | |||
this.rightBottom.Data = geometry; | |||
} | |||
} | |||
} |
@@ -0,0 +1,17 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Microsoft.Toolkit.Mvvm.ComponentModel; | |||
namespace BPASmartClient.DosingSystem.Model | |||
{ | |||
public class ConveyorServer | |||
{ | |||
public ConveyorServer() | |||
{ | |||
} | |||
} | |||
} |
@@ -0,0 +1,27 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Microsoft.Toolkit.Mvvm.ComponentModel; | |||
namespace BPASmartClient.DosingSystem.Model | |||
{ | |||
public class CylinderStatusModel : ObservableObject | |||
{ | |||
/// <summary> | |||
/// 气缸原点信号 | |||
/// </summary> | |||
public bool HomeStatus { get { return _mHomeStatus; } set { _mHomeStatus = value; OnPropertyChanged(); } } | |||
private bool _mHomeStatus; | |||
/// <summary> | |||
/// 气缸到位信号 | |||
/// </summary> | |||
public bool InPlace { get { return _mInPlace; } set { _mInPlace = value; OnPropertyChanged(); } } | |||
private bool _mInPlace; | |||
} | |||
} |
@@ -54,10 +54,10 @@ namespace BPASmartClient.DosingSystem.Model | |||
BottomDeviceCurrentStatuses.ElementAt(BottomIndex).DeviceNum = DeviceLists.ElementAt(i).Value.deviceStatus.DeviceNum; | |||
} | |||
int deviceIndex = Array.FindIndex(devices.ToArray(), p => p.IpAddress == DeviceLists.ElementAt(i).Key); | |||
int deviceIndex = Array.FindIndex(devices.ToArray(), p => p.IpAddress == DeviceLists.ElementAt(i).Key && p.DeviceName != DeviceLists.ElementAt(i).Value.DeviceName); | |||
if (deviceIndex >= 0 && deviceIndex < devices.Count) | |||
{ | |||
devices.ElementAt(i).DeviceName = DeviceLists.ElementAt(i).Value.DeviceName; | |||
devices.ElementAt(deviceIndex).DeviceName = DeviceLists.ElementAt(i).Value.DeviceName; | |||
} | |||
} | |||
Thread.Sleep(200); | |||
@@ -66,7 +66,6 @@ namespace BPASmartClient.DosingSystem.Model | |||
public void Init() | |||
{ | |||
devices.Add(new Devices() { DeviceName = "测试", IpAddress = "192.168.0.1" }); | |||
IpAddressLines(); | |||
DeviceDataInit(); | |||
ThreadManage.GetInstance().StartLong(new Action(() => | |||
@@ -60,7 +60,7 @@ | |||
<UniformGrid | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
Columns="4" /> | |||
Columns="8" /> | |||
</ItemsPanelTemplate> | |||
</ListView.ItemsPanel> | |||
@@ -68,7 +68,9 @@ | |||
<DataTemplate> | |||
<Border | |||
Name="ShadowElement" | |||
Width="200" | |||
Height="150" | |||
Margin="10" | |||
VerticalAlignment="Top" | |||
BorderBrush="#00BEFA" | |||
BorderThickness="0" | |||
@@ -125,8 +127,8 @@ | |||
Grid.Row="2" | |||
Width="130" | |||
Height="30" | |||
VerticalAlignment="Top" | |||
Margin="0,0,0,0" | |||
VerticalAlignment="Top" | |||
Command="{Binding DataContext.ChangeNameCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding IpAddress}" | |||
Content="修改原料名称" | |||
@@ -17,7 +17,8 @@ | |||
<UserControl.Resources> | |||
<SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" /> | |||
<SolidColorBrush x:Key="bordColor" Color="#33ffffff" /> | |||
<!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />--> | |||
<SolidColorBrush x:Key="bordColor" Color="#332AB2E7" /> | |||
<con:DataTableRedundantConverter x:Key="tabConvert" /> | |||
<Style x:Key="RowRadioButtonStyle" TargetType="{x:Type RadioButton}"> | |||
@@ -53,131 +53,324 @@ | |||
<vm:ManualControlViewModel /> | |||
</UserControl.DataContext> | |||
<Grid> | |||
<ListView | |||
Grid.Column="1" | |||
Margin="10" | |||
Background="Transparent" | |||
BorderBrush="#00BEFA" | |||
BorderThickness="0" | |||
ItemsSource="{Binding cylinderModels}" | |||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||
<ListView.ItemsPanel> | |||
<ItemsPanelTemplate> | |||
<UniformGrid | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
Columns="8" /> | |||
</ItemsPanelTemplate> | |||
</ListView.ItemsPanel> | |||
<ListView.ItemTemplate> | |||
<DataTemplate> | |||
<Grid | |||
Margin="0 0 0 15" | |||
Width="200" | |||
Height="100" | |||
Background="Transparent"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="30" /> | |||
<RowDefinition /> | |||
<RowDefinition Height="30" /> | |||
</Grid.RowDefinitions> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="0.5*" /> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock | |||
Grid.Column="1" | |||
Grid.ColumnSpan="2" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="Aqua" | |||
Text="{Binding Name}" /> | |||
<pry:Cylinder | |||
Grid.Row="1" | |||
Grid.ColumnSpan="3" | |||
<Grid Margin="8"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition /> | |||
<RowDefinition /> | |||
<RowDefinition /> | |||
</Grid.RowDefinitions> | |||
<!--#region 升降气缸--> | |||
<Grid | |||
Name="cy" | |||
Grid.Row="0" | |||
Margin="5"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="40" /> | |||
<RowDefinition /> | |||
</Grid.RowDefinitions> | |||
<pry:ImageBorder | |||
Grid.RowSpan="2" | |||
Width="{Binding ElementName=cy, Path=ActualWidth}" | |||
Height="{Binding ElementName=cy, Path=ActualHeight}" /> | |||
<Image | |||
Margin="2,3,0,0" | |||
HorizontalAlignment="Left" | |||
Source="/BPASmartClient.CustomResource;component/Image/标签.png" /> | |||
<TextBlock | |||
Margin="10,0,0,0" | |||
VerticalAlignment="Center" | |||
FontSize="16" | |||
Foreground="Aqua" | |||
Text="升降气缸控制" /> | |||
<ListView | |||
Grid.Row="1" | |||
Background="Transparent" | |||
BorderBrush="#00BEFA" | |||
BorderThickness="0" | |||
ItemsSource="{Binding cylinderModels}" | |||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||
<ListView.ItemsPanel> | |||
<ItemsPanelTemplate> | |||
<UniformGrid | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
Columns="8" /> | |||
</ItemsPanelTemplate> | |||
</ListView.ItemsPanel> | |||
<ListView.ItemTemplate> | |||
<DataTemplate> | |||
<Grid | |||
Width="200" | |||
Height="100" | |||
Margin="0,0,0,15" | |||
Background="Transparent"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="30" /> | |||
<RowDefinition /> | |||
<RowDefinition Height="30" /> | |||
</Grid.RowDefinitions> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="0.5*" /> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock | |||
Grid.Column="1" | |||
Grid.ColumnSpan="2" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="Aqua" | |||
Text="{Binding Name}" /> | |||
<pry:Cylinder | |||
Grid.Row="1" | |||
Grid.ColumnSpan="3" | |||
Width="200" | |||
Height="50" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
LeftTogIsChecked="{Binding LeftTog}" | |||
RightTogIsChecked="{Binding RightTog}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="1" | |||
Command="{Binding DataContext.Open, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding Name}" | |||
Content="伸出" | |||
Foreground="Aqua" | |||
IsChecked="True" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="2" | |||
Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding Name}" | |||
Content="缩回" | |||
Foreground="Aqua" | |||
IsChecked="False" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
</Grid> | |||
</DataTemplate> | |||
</ListView.ItemTemplate> | |||
</ListView> | |||
</Grid> | |||
<!--#endregion--> | |||
<!--#region 阻挡气缸--> | |||
<Grid | |||
Name="zd" | |||
Grid.Row="1" | |||
Margin="5"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="40" /> | |||
<RowDefinition /> | |||
</Grid.RowDefinitions> | |||
<pry:ImageBorder | |||
Grid.RowSpan="2" | |||
Width="{Binding ElementName=zd, Path=ActualWidth}" | |||
Height="{Binding ElementName=zd, Path=ActualHeight}" /> | |||
<Image | |||
Margin="2,3,0,0" | |||
HorizontalAlignment="Left" | |||
Source="/BPASmartClient.CustomResource;component/Image/标签.png" /> | |||
<TextBlock | |||
Margin="10,0,0,0" | |||
VerticalAlignment="Center" | |||
FontSize="16" | |||
Foreground="Aqua" | |||
Text="阻挡气缸控制" /> | |||
<ListView | |||
Grid.Row="1" | |||
Margin="10" | |||
Background="Transparent" | |||
BorderBrush="#00BEFA" | |||
BorderThickness="0" | |||
ItemsSource="{Binding BlockCylinders}" | |||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||
<ListView.ItemsPanel> | |||
<ItemsPanelTemplate> | |||
<UniformGrid | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
Columns="8" /> | |||
</ItemsPanelTemplate> | |||
</ListView.ItemsPanel> | |||
<ListView.ItemTemplate> | |||
<DataTemplate> | |||
<Grid | |||
Width="200" | |||
Height="100" | |||
Margin="0,0,0,15" | |||
Background="Transparent"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="30" /> | |||
<RowDefinition /> | |||
<RowDefinition Height="30" /> | |||
</Grid.RowDefinitions> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="0.5*" /> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock | |||
Grid.Column="1" | |||
Grid.ColumnSpan="2" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="Aqua" | |||
Text="{Binding Name}" /> | |||
<pry:Cylinder | |||
Grid.Row="1" | |||
Grid.ColumnSpan="3" | |||
Width="200" | |||
Height="50" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
LeftTogIsChecked="{Binding LeftTog}" | |||
RightTogIsChecked="{Binding RightTog}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="1" | |||
Command="{Binding DataContext.Open, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding Name}" | |||
Content="伸出" | |||
Foreground="Aqua" | |||
IsChecked="True" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="2" | |||
Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding Name}" | |||
Content="缩回" | |||
Foreground="Aqua" | |||
IsChecked="False" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
</Grid> | |||
</DataTemplate> | |||
</ListView.ItemTemplate> | |||
</ListView> | |||
</Grid> | |||
<!--#endregion--> | |||
<!--#region 托盘气缸--> | |||
<Grid | |||
Name="tp" | |||
Grid.Row="2" | |||
Margin="5"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="40" /> | |||
<RowDefinition /> | |||
</Grid.RowDefinitions> | |||
<pry:ImageBorder | |||
Grid.RowSpan="2" | |||
Width="{Binding ElementName=tp, Path=ActualWidth}" | |||
Height="{Binding ElementName=tp, Path=ActualHeight}" /> | |||
<Image | |||
Margin="2,3,0,0" | |||
HorizontalAlignment="Left" | |||
Source="/BPASmartClient.CustomResource;component/Image/标签.png" /> | |||
<TextBlock | |||
Margin="10,0,0,0" | |||
VerticalAlignment="Center" | |||
FontSize="16" | |||
Foreground="Aqua" | |||
Text="托盘气缸控制" /> | |||
<ListView | |||
Grid.Row="2" | |||
Margin="10" | |||
Background="Transparent" | |||
BorderBrush="#00BEFA" | |||
BorderThickness="0" | |||
ItemsSource="{Binding PalletCylinders}" | |||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||
<ListView.ItemsPanel> | |||
<ItemsPanelTemplate> | |||
<UniformGrid | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
Columns="8" /> | |||
</ItemsPanelTemplate> | |||
</ListView.ItemsPanel> | |||
<ListView.ItemTemplate> | |||
<DataTemplate> | |||
<Grid | |||
Width="200" | |||
Height="50" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
LeftTogIsChecked="{Binding LeftTog}" | |||
RightTogIsChecked="{Binding RightTog}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="1" | |||
Content="打开" | |||
Foreground="Aqua" | |||
IsChecked="True" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="2" | |||
Content="关闭" | |||
Foreground="Aqua" | |||
IsChecked="False" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
</Grid> | |||
</DataTemplate> | |||
</ListView.ItemTemplate> | |||
</ListView> | |||
<!--<UniformGrid Columns="7" Rows="5"> | |||
<Grid | |||
Width="200" | |||
Height="100" | |||
Background="Transparent"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="30" /> | |||
<RowDefinition /> | |||
<RowDefinition Height="30" /> | |||
</Grid.RowDefinitions> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="0.5*" /> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock | |||
Grid.Column="1" | |||
Grid.ColumnSpan="2" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="Aqua" | |||
Text="设备1" /> | |||
<pry:Cylinder | |||
Grid.Row="1" | |||
Grid.ColumnSpan="3" | |||
Width="200" | |||
Height="50" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="1" | |||
Content="打开" | |||
Foreground="Aqua" | |||
IsChecked="True" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="2" | |||
Content="关闭" | |||
Foreground="Aqua" | |||
IsChecked="False" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
</Grid> | |||
</UniformGrid>--> | |||
Height="100" | |||
Margin="0,0,0,15" | |||
Background="Transparent"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="30" /> | |||
<RowDefinition /> | |||
<RowDefinition Height="30" /> | |||
</Grid.RowDefinitions> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="0.5*" /> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock | |||
Grid.Column="1" | |||
Grid.ColumnSpan="2" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="Aqua" | |||
Text="{Binding Name}" /> | |||
<pry:Cylinder | |||
Grid.Row="1" | |||
Grid.ColumnSpan="3" | |||
Width="200" | |||
Height="50" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
LeftTogIsChecked="{Binding LeftTog}" | |||
RightTogIsChecked="{Binding RightTog}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="1" | |||
Command="{Binding DataContext.Open, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding Name}" | |||
Content="伸出" | |||
Foreground="Aqua" | |||
IsChecked="True" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
<RadioButton | |||
Grid.Row="2" | |||
Grid.Column="2" | |||
Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding Name}" | |||
Content="缩回" | |||
Foreground="Aqua" | |||
IsChecked="False" | |||
Style="{StaticResource radioButtonStyle}" /> | |||
</Grid> | |||
</DataTemplate> | |||
</ListView.ItemTemplate> | |||
</ListView> | |||
</Grid> | |||
<!--#endregion--> | |||
@@ -24,7 +24,6 @@ | |||
<Setter Property="FontFamily" Value="楷体" /> | |||
<Setter Property="FontSize" Value="20" /> | |||
<Setter Property="Background" Value="Transparent" /> | |||
<!--<Setter Property="Foreground" Value="{StaticResource FontColor}" />--> | |||
<Setter Property="VerticalAlignment" Value="Center" /> | |||
<Setter Property="HorizontalAlignment" Value="Center" /> | |||
</Style> | |||
@@ -37,6 +36,8 @@ | |||
<Setter Property="BorderThickness" Value="0" /> | |||
</Style> | |||
<Style x:Key="ListViewStyle" TargetType="ListView" /> | |||
</UserControl.Resources> | |||
<UserControl.DataContext> | |||
@@ -90,253 +91,199 @@ | |||
</StackPanel> | |||
<!--#endregion--> | |||
<ScrollViewer Grid.Row="2"> | |||
<ListView | |||
Margin="5" | |||
VerticalAlignment="Top" | |||
Background="Transparent" | |||
BorderThickness="0" | |||
ItemsSource="{Binding Recipes}" | |||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||
<ListView.ItemsPanel> | |||
<ItemsPanelTemplate> | |||
<UniformGrid | |||
HorizontalAlignment="Left" | |||
<ListBox | |||
Grid.Row="2" | |||
Margin="5" | |||
VerticalAlignment="Top" | |||
Background="Transparent" | |||
BorderThickness="0" | |||
ItemsSource="{Binding Recipes}" | |||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"> | |||
<ListBox.ItemsPanel> | |||
<ItemsPanelTemplate> | |||
<UniformGrid | |||
HorizontalAlignment="Left" | |||
VerticalAlignment="Top" | |||
Columns="8" /> | |||
</ItemsPanelTemplate> | |||
</ListBox.ItemsPanel> | |||
<ListBox.ItemTemplate> | |||
<DataTemplate> | |||
<Grid | |||
Name="tt" | |||
Height="220" | |||
Margin="5"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="30" /> | |||
<RowDefinition Height="20" /> | |||
<RowDefinition Height="128" /> | |||
<RowDefinition Height="2" /> | |||
<RowDefinition Height="40" /> | |||
</Grid.RowDefinitions> | |||
<Image | |||
Grid.RowSpan="5" | |||
Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png" | |||
Stretch="Fill" /> | |||
<TextBlock | |||
Grid.Row="0" | |||
Margin="2,5,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Top" | |||
Columns="8" /> | |||
</ItemsPanelTemplate> | |||
</ListView.ItemsPanel> | |||
FontSize="18" | |||
Foreground="#FF2AB2E7" | |||
Text="{Binding RecipeName}" /> | |||
<ListView.ItemTemplate> | |||
<DataTemplate> | |||
<Border Margin="5" Background="LightSkyBlue"> | |||
<TextBlock | |||
Grid.Row="1" | |||
Margin="5,0,0,0" | |||
VerticalAlignment="Top" | |||
Foreground="#FF2AB2E7" | |||
Text="配方信息:" /> | |||
<ScrollViewer | |||
Grid.Row="2" | |||
VerticalAlignment="Top" | |||
Background="Transparent" | |||
HorizontalScrollBarVisibility="Hidden" | |||
VerticalScrollBarVisibility="Hidden"> | |||
<Grid> | |||
<Grid.RowDefinitions> | |||
<RowDefinition /> | |||
<RowDefinition Height="0.25*" /> | |||
<RowDefinition Height="0.2*" /> | |||
</Grid.RowDefinitions> | |||
<Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" /> | |||
<TextBlock | |||
Grid.Row="1" | |||
Margin="2,0,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="#dd000000" | |||
Text="{Binding RecipeName}" /> | |||
<Grid | |||
Name="gr" | |||
Grid.Row="2" | |||
Height="30"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<pry:IcoButton | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
BorderThickness="0" | |||
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding RecipCode}" | |||
Content="删除" | |||
EnterBackground="Red" | |||
FontStyle="Normal" | |||
Foreground="#dd000000" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
<pry:IcoButton | |||
Grid.Column="1" | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
BorderThickness="0" | |||
Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}" | |||
CommandParameter="{Binding RecipCode}" | |||
Content="编辑" | |||
EnterBackground="#FF2AB2E7" | |||
Foreground="#dd000000" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
</Grid> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="auto" /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<ItemsControl ItemsSource="{Binding RawMaterials}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
<Grid> | |||
<TextBlock | |||
Grid.Row="1" | |||
Margin="5,0,0,0" | |||
HorizontalAlignment="Right" | |||
VerticalAlignment="Center" | |||
Foreground="#aa2AB2E7" | |||
Text="{Binding RawMaterialName}" /> | |||
</Grid> | |||
</DataTemplate> | |||
</ItemsControl.ItemTemplate> | |||
</ItemsControl> | |||
<ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
<StackPanel Orientation="Horizontal"> | |||
<TextBlock | |||
Margin="5,0,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="#aa2AB2E7" | |||
Text=":" /> | |||
<TextBlock | |||
Margin="5,0,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="#aa2AB2E7" | |||
Text="{Binding RawMaterialWeight}" /> | |||
<TextBlock | |||
Margin="5,0,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="#aa2AB2E7" | |||
Text="g" /> | |||
</StackPanel> | |||
</DataTemplate> | |||
</ItemsControl.ItemTemplate> | |||
</ItemsControl> | |||
</Grid> | |||
</Border> | |||
</DataTemplate> | |||
</ListView.ItemTemplate> | |||
</ListView> | |||
</ScrollViewer> | |||
<!--<UniformGrid | |||
Grid.Row="2" | |||
Height="200" | |||
VerticalAlignment="Top" | |||
Columns="10"> | |||
<Border | |||
Margin="10" | |||
Background="LightSkyBlue" | |||
BorderThickness="1"> | |||
<Grid> | |||
<Grid.RowDefinitions> | |||
<RowDefinition /> | |||
<RowDefinition Height="0.25*" /> | |||
<RowDefinition Height="0.2*" /> | |||
</Grid.RowDefinitions> | |||
<Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" /> | |||
<TextBlock | |||
Grid.Row="1" | |||
Margin="2,0,0,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Foreground="#dd000000" | |||
Text="配方名称" /> | |||
<Grid Name="gr" Grid.Row="2"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<pry:IcoButton | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
BorderThickness="0" | |||
Content="删除" | |||
EnterBackground="Red" | |||
FontStyle="Normal" | |||
Foreground="#dd000000" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
<pry:IcoButton | |||
Grid.Column="1" | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
BorderThickness="0" | |||
Content="编辑" | |||
EnterBackground="#FF2AB2E7" | |||
Foreground="#dd000000" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
</ScrollViewer> | |||
<!--<Grid | |||
Grid.Row="3" | |||
Height="2" | |||
VerticalAlignment="Bottom"> | |||
<Grid.Background> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/直线.png" Stretch="Fill" /> | |||
</Grid.Background> | |||
</Grid>--> | |||
<Image | |||
Grid.Row="3" | |||
Width="{Binding ElementName=tt, Path=ActualWidth}" | |||
Height="2" | |||
VerticalAlignment="Bottom" | |||
Source="/BPASmartClient.CustomResource;component/Image/直线.png" | |||
Stretch="Fill" /> | |||
<Grid | |||
Name="gr" | |||
Grid.Row="4" | |||
Height="30" | |||
Margin="0,0,0,10" | |||
VerticalAlignment="Bottom" | |||
Background="Transparent"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition /> | |||
<ColumnDefinition /> | |||
</Grid.ColumnDefinitions> | |||
<!--<Image | |||
Height="2" | |||
Grid.ColumnSpan="2" | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
VerticalAlignment="Top" | |||
Source="/BPASmartClient.CustomResource;component/Image/直线.png" />--> | |||
<pry:IcoButton | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
Margin="4,4,3,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Background="#11F53F62" | |||
BorderThickness="0" | |||
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | |||
CommandParameter="{Binding RecipCode}" | |||
Content="删除" | |||
EnterBackground="#22F53F62" | |||
FontStyle="Normal" | |||
Foreground="#FFF53F62" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
<pry:IcoButton | |||
Grid.Column="1" | |||
Width="{Binding ElementName=gr, Path=ActualWidth}" | |||
Height="{Binding ElementName=gr, Path=ActualHeight}" | |||
Margin="3,4,4,0" | |||
HorizontalAlignment="Center" | |||
VerticalAlignment="Center" | |||
Background="#112AB2E7" | |||
BorderThickness="0" | |||
Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}" | |||
CommandParameter="{Binding RecipCode}" | |||
Content="编辑" | |||
EnterBackground="#222AB2E7" | |||
Foreground="#FF2AB2E7" | |||
IcoText="" | |||
Style="{StaticResource IcoButtonStyle}" /> | |||
</Grid> | |||
<!--</StackPanel>--> | |||
</Grid> | |||
</Grid> | |||
</Border> | |||
</UniformGrid>--> | |||
</DataTemplate> | |||
</ListBox.ItemTemplate> | |||
</ListBox> | |||
<!--#region 表格数据显示--> | |||
<!--<ScrollViewer | |||
Grid.Row="2" | |||
Visibility="Collapsed" | |||
HorizontalScrollBarVisibility="Hidden" | |||
VerticalScrollBarVisibility="Hidden"> | |||
<ItemsControl ItemsSource="{Binding Recipes}"> | |||
<ItemsControl.ItemTemplate> | |||
<DataTemplate> | |||
<RadioButton Background="Transparent" GroupName="all"> | |||
<RadioButton.Template> | |||
<ControlTemplate TargetType="RadioButton"> | |||
<Grid Name="gr" Height="30"> | |||
<Grid.ColumnDefinitions> | |||
<ColumnDefinition Width="0.3*" /> | |||
<ColumnDefinition /> | |||
<ColumnDefinition Width="0.7*" /> | |||
<ColumnDefinition Width="0.7*" /> | |||
<ColumnDefinition Width="0" /> | |||
<ColumnDefinition Width="0.7*" /> | |||
<ColumnDefinition Width="0.5*" /> | |||
</Grid.ColumnDefinitions> | |||
<TextBlock | |||
Grid.Column="0" | |||
Foreground="#ff00ccff" | |||
Style="{StaticResource TextBlockStyle}" | |||
Text="{Binding SerialNum}" /> | |||
<Grid Grid.Column="1"> | |||
<TextBlock | |||
Margin="5,0,0,0" | |||
HorizontalAlignment="Left" | |||
Foreground="#ff00ccff" | |||
Style="{StaticResource TextBlockStyle}" | |||
Text="{Binding RecipeName}" /> | |||
</Grid> | |||
<TextBlock | |||
Grid.Column="2" | |||
Foreground="#ff00ccff" | |||
Style="{StaticResource TextBlockStyle}" | |||
Text="{Binding RecipCode}" /> | |||
--> | |||
<!--<Grid Grid.Column="3"> | |||
<Button | |||
Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" | |||
CommandParameter="{Binding RecipCode}" | |||
Content="编辑" | |||
Style="{StaticResource buttonStyle}" /> | |||
</Grid>--> | |||
<!-- | |||
<Grid Grid.Column="5"> | |||
<Button | |||
Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" | |||
CommandParameter="{Binding RecipCode}" | |||
Content="详情" | |||
Style="{StaticResource buttonStyle}" /> | |||
</Grid> | |||
<Grid Grid.Column="6"> | |||
<Button | |||
Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}" | |||
CommandParameter="{Binding RecipCode}" | |||
Content="删除" | |||
Style="{StaticResource buttonStyle}" /> | |||
</Grid> | |||
</Grid> | |||
<ControlTemplate.Triggers> | |||
<Trigger Property="IsChecked" Value="True"> | |||
<Setter TargetName="gr" Property="Background" Value="#3300ccff" /> | |||
</Trigger> | |||
<Trigger Property="IsMouseOver" Value="true"> | |||
<Setter TargetName="gr" Property="Background" Value="#3300ccff" /> | |||
</Trigger> | |||
</ControlTemplate.Triggers> | |||
</ControlTemplate> | |||
</RadioButton.Template> | |||
</RadioButton> | |||
</DataTemplate> | |||
</ItemsControl.ItemTemplate> | |||
</ItemsControl> | |||
</ScrollViewer>--> | |||
<!--#endregion--> | |||
</Grid> | |||
</UserControl> |
@@ -28,25 +28,28 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
ErrorInfo = "设备名称不能为空"; | |||
return; | |||
} | |||
int index = Array.FindIndex(DeviceListViewModel.devices.ToArray(), p => p.IpAddress == IpAddress); | |||
if (index >= 0 && index < DeviceListViewModel.devices.Count) | |||
int index = Array.FindIndex(DeviceInquire.GetInstance.devices.ToArray(), p => p.IpAddress == IpAddress); | |||
if (index >= 0 && index < DeviceInquire.GetInstance.devices.Count) | |||
{ | |||
if (DeviceListViewModel.devices.FirstOrDefault(p => p.DeviceName == DeviceName) != null) | |||
if (DeviceInquire.GetInstance.devices.FirstOrDefault(p => p.DeviceName == DeviceName) != null) | |||
ErrorInfo = "设备名称已存在"; | |||
else | |||
{ | |||
var res = Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == DeviceListViewModel.devices.ElementAt(index).DeviceName); | |||
res.RawMaterialName = DeviceName; | |||
DeviceListViewModel.devices.ElementAt(index).DeviceName = DeviceName; | |||
DeviceInquire.GetInstance.GetDevice(IpAddress).SetDeviceName(DeviceName);//设置PLC名称 | |||
for (int i = 0; i < Json<LocaPar>.Data.Recipes.Count; i++) | |||
var res = Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == DeviceInquire.GetInstance.devices.ElementAt(index).DeviceName); | |||
if (res != null) | |||
{ | |||
for (int m = 0; m < Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.Count; m++) | |||
res.RawMaterialName = DeviceName; | |||
DeviceInquire.GetInstance.devices.ElementAt(index).DeviceName = DeviceName; | |||
DeviceInquire.GetInstance.GetDevice(IpAddress).SetDeviceName(DeviceName);//设置PLC名称 | |||
for (int i = 0; i < Json<LocaPar>.Data.Recipes.Count; i++) | |||
{ | |||
Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.ElementAt(m).RawMaterialName = DeviceName; | |||
for (int m = 0; m < Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.Count; m++) | |||
{ | |||
Json<LocaPar>.Data.Recipes.ElementAt(i).RawMaterials.ElementAt(m).RawMaterialName = DeviceName; | |||
} | |||
} | |||
ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); | |||
} | |||
ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); | |||
} | |||
} | |||
@@ -33,7 +33,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
public RelayCommand<object> ChangeNameCommand { get; set; } | |||
//public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>(); | |||
public static ObservableCollection<Devices> devices { get; set; } | |||
public ObservableCollection<Devices> devices { get; set; } | |||
} | |||
public class Devices : ObservableObject | |||
@@ -5,6 +5,7 @@ using System.Text; | |||
using System.Threading.Tasks; | |||
using Microsoft.Toolkit.Mvvm.ComponentModel; | |||
using System.Collections.ObjectModel; | |||
using Microsoft.Toolkit.Mvvm.Input; | |||
namespace BPASmartClient.DosingSystem.ViewModel | |||
{ | |||
@@ -12,19 +13,64 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
{ | |||
public ManualControlViewModel() | |||
{ | |||
for (int i = 0; i < 40; i++) | |||
for (int i = 0; i < 15; i++) | |||
{ | |||
cylinderModels.Add(new CylinderModel() | |||
{ | |||
Name = $"设备 {i.ToString()}", | |||
Name = $"升降气缸 {i + 1}", | |||
LeftTog = false, | |||
RightTog = false, | |||
}); | |||
BlockCylinders.Add(new CylinderModel() | |||
{ | |||
Name = $"阻挡气缸 {i + 1}", | |||
LeftTog = false, | |||
RightTog = false, | |||
}); | |||
} | |||
for (int i = 0; i < 4; i++) | |||
{ | |||
PalletCylinders.Add(new CylinderModel() | |||
{ | |||
Name = $"托盘气缸 {i + 1}", | |||
LeftTog = false, | |||
RightTog = false, | |||
}); | |||
} | |||
Open = new RelayCommand<object>((o) => | |||
{ | |||
}); | |||
Close = new RelayCommand<object>((o) => | |||
{ | |||
}); | |||
} | |||
/// <summary> | |||
/// 升降气缸 | |||
/// </summary> | |||
public ObservableCollection<CylinderModel> cylinderModels { get; set; } = new ObservableCollection<CylinderModel>(); | |||
/// <summary> | |||
/// 阻挡气缸 | |||
/// </summary> | |||
public ObservableCollection<CylinderModel> BlockCylinders { get; set; } = new ObservableCollection<CylinderModel>(); | |||
/// <summary> | |||
/// 托盘气缸 | |||
/// </summary> | |||
public ObservableCollection<CylinderModel> PalletCylinders { get; set; } = new ObservableCollection<CylinderModel>(); | |||
public RelayCommand<object> Open { get; set; } | |||
public RelayCommand<object> Close { get; set; } | |||
} | |||
public class CylinderModel : ObservableObject | |||
@@ -59,14 +59,14 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
if (RecipeName == String.Empty) { ErrorInfo = "配方名称未填写"; return; } | |||
for (int i = 0; i < RawMaterials.Count; i++) | |||
{ | |||
var res = DeviceListViewModel.devices.FirstOrDefault(p => p.DeviceName == RawMaterials.ElementAt(i).RawMaterialName); | |||
var res = DeviceInquire.GetInstance.devices.FirstOrDefault(p => p.DeviceName == RawMaterials.ElementAt(i).RawMaterialName); | |||
if (res != null) | |||
{ | |||
RawMaterials.ElementAt(i).DeviceIp = res.IpAddress;//根据设备名称和原料名称的唯一匹配关系,给原料配置IP | |||
RawMaterials.ElementAt(i).RawMaterialSource = 1; | |||
} | |||
var su = Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == RawMaterials.ElementAt(i).RawMaterialName); | |||
if(su != null) | |||
if (su != null) | |||
{ | |||
RawMaterials.ElementAt(i).RawMaterialSource = su.RawMaterialSource; | |||
} | |||
@@ -179,7 +179,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
public RelayCommand SaveCommand { get; set; } | |||
public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel> (); | |||
public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel>(); | |||
public ObservableCollection<string> RawMaterialNames { get; set; } = new ObservableCollection<string>(); | |||
@@ -1,9 +1,8 @@ | |||
<Application x:Class="WPFDemo.App" | |||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:local="clr-namespace:WPFDemo" | |||
StartupUri="MainWindow.xaml"> | |||
<Application.Resources> | |||
</Application.Resources> | |||
<Application | |||
x:Class="WPFDemo.App" | |||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:local="clr-namespace:WPFDemo" | |||
StartupUri="MainWindow.xaml"> | |||
<Application.Resources /> | |||
</Application> |
@@ -0,0 +1,18 @@ | |||
<Window | |||
x:Class="WPFDemo.VlcTestDemo" | |||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||
xmlns:local="clr-namespace:WPFDemo" | |||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||
xmlns:vlc="clr-namespace:Vlc.DotNet.Wpf;assembly=Vlc.DotNet.Wpf" | |||
Title="VlcTestDemo" | |||
Width="800" | |||
Height="450" | |||
AllowsTransparency="True" | |||
Background="{x:Null}" | |||
mc:Ignorable="d"> | |||
<Grid> | |||
<vlc:VlcControl Name="vlcPlayer" /> | |||
</Grid> | |||
</Window> |
@@ -0,0 +1,27 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
using System.Windows.Controls; | |||
using System.Windows.Data; | |||
using System.Windows.Documents; | |||
using System.Windows.Input; | |||
using System.Windows.Media; | |||
using System.Windows.Media.Imaging; | |||
using System.Windows.Shapes; | |||
namespace WPFDemo | |||
{ | |||
/// <summary> | |||
/// VlcTestDemo.xaml 的交互逻辑 | |||
/// </summary> | |||
public partial class VlcTestDemo : Window | |||
{ | |||
public VlcTestDemo() | |||
{ | |||
InitializeComponent(); | |||
} | |||
} | |||
} |
@@ -13,6 +13,9 @@ | |||
<ItemGroup> | |||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | |||
<PackageReference Include="Vlc.DotNet.Core" Version="3.1.0" /> | |||
<PackageReference Include="Vlc.DotNet.Core.Interops" Version="3.1.0" /> | |||
<PackageReference Include="Vlc.DotNet.Wpf" Version="3.1.0" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||