You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AUCMA_SCADA/Aucma.Core.Palletiz/Views/HandPalletizView.xaml.cs

453 lines
19 KiB
C#

using Admin.Core.Model;
12 months ago
using Aucma.Core.Palletiz.ViewModels;
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 Aucma.Core.Palletiz.Views
{
/// <summary>
/// DirectionItemWindow.xaml 的交互逻辑
/// </summary>
12 months ago
public partial class HandPalletizView : Window
{
private string store = "A";
private int space = 1;
/// <summary>
/// 转向 1正向 2:反向 3:不变
/// </summary>
private int spaceDirection = 1;
/// <summary>
/// 转向角度 1 90
/// </summary>
private int range = 1;
12 months ago
public HandPalletizView()
{
InitializeComponent();
12 months ago
this.DataContext = new HandPalletizViewModel();
}
12 months ago
#region 所属仓库选择
private void btn_A_Click(object sender, RoutedEventArgs e)
{
this.btn_A.Background = Brushes.Lime;
this.btn_B.Background = Brushes.DarkCyan;
store = "A";
}
private void btn_B_Click(object sender, RoutedEventArgs e)
{
this.btn_A.Background = Brushes.DarkCyan;
this.btn_B.Background = Brushes.Lime;
store = "B";
}
#endregion
#region 目的货道选择
private void btn_space1_Click(object sender, RoutedEventArgs e)
{
10 months ago
btn_space1.Background = Brushes.Lime;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "001";
}
private void btn_space2_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.Lime;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "002";
}
private void btn_space3_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.Lime;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "003";
}
private void btn_space4_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.Lime;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "004";
}
private void btn_space5_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.Lime;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "005";
}
private void btn_space6_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.Lime;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "006";
}
private void btn_space7_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.Lime;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "007";
}
private void btn_space8_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.Lime;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "008";
}
private void btn_space9_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.Lime;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "009";
}
private void btn_space10_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.Lime;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "010";
}
private void btn_space11_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.Lime;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "011";
}
private void btn_space12_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.Lime;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "012";
}
private void btn_space13_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.Lime;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "013";
}
private void btn_space14_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.Lime;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "014";
}
private void btn_space15_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.Lime;
//btn_space16.Background = Brushes.DarkCyan;
this.btn_spaceTemp.Text = "015";
}
private void btn_space16_Click(object sender, RoutedEventArgs e)
{
btn_space1.Background = Brushes.DarkCyan;
btn_space2.Background = Brushes.DarkCyan;
btn_space3.Background = Brushes.DarkCyan;
btn_space4.Background = Brushes.DarkCyan;
btn_space5.Background = Brushes.DarkCyan;
btn_space6.Background = Brushes.DarkCyan;
btn_space7.Background = Brushes.DarkCyan;
btn_space8.Background = Brushes.DarkCyan;
btn_space9.Background = Brushes.DarkCyan;
btn_space10.Background = Brushes.DarkCyan;
btn_space11.Background = Brushes.DarkCyan;
btn_space12.Background = Brushes.DarkCyan;
btn_space13.Background = Brushes.DarkCyan;
btn_space14.Background = Brushes.DarkCyan;
10 months ago
//btn_space15.Background = Brushes.DarkCyan;
//btn_space16.Background = Brushes.Lime;
this.btn_spaceTemp.Text = "016";
}
#endregion
#region 转向
private void btn_left_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.Lime;
Reverse.Background = Brushes.DarkCyan;
Unchanged.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "1";
}
private void btn_right_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.Lime;
Unchanged.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "2";
}
private void btn_right180_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.DarkCyan;
Reverse180.Background = Brushes.Lime;
Unchanged.Background = Brushes.DarkCyan;
this.btn_RangeTemp.Text = "4";
}
private void btn_unchanged_Click(object sender, RoutedEventArgs e)
{
Forward.Background = Brushes.DarkCyan;
Reverse.Background = Brushes.DarkCyan;
Unchanged.Background = Brushes.Lime;
this.btn_RangeTemp.Text = "3";
}
#endregion
#region 转向角度设置Brushes.DarkCyan
private void btn_range90_Click(object sender, RoutedEventArgs e)
{
btn_range90.Background = Brushes.Lime;
btn_range0.Background = Brushes.DarkCyan;
//btn_range270.Background = Brushes.DarkCyan;
range = 90;
}
private void btn_range0_Click(object sender, RoutedEventArgs e)
{
btn_range90.Background = Brushes.DarkCyan;
btn_range0.Background = Brushes.Lime;
// btn_range270.Background = Brushes.DarkCyan;
range = 0;
}
#endregion
12 months ago
private void Button_Click_1(object sender, RoutedEventArgs e)
{
this.window.Close();
}
}
}