|
|
|
|
|
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 XGLFinishPro.Views
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// FinishedProduction.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class FinishedProduction : Window
|
|
|
|
|
|
{
|
|
|
|
|
|
public FinishedProduction()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
LoadData();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void LoadData()
|
|
|
|
|
|
{
|
|
|
|
|
|
MakeHearData();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void MakeHearData()
|
|
|
|
|
|
{
|
|
|
|
|
|
for (var i = 0; i <= 14; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (i == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.MainGrid.ColumnDefinitions.Add(new ColumnDefinition()
|
|
|
|
|
|
{
|
|
|
|
|
|
Width = new GridLength(0.5, GridUnitType.Star)
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (i == 2)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.MainGrid.ColumnDefinitions.Add(new ColumnDefinition()
|
|
|
|
|
|
{
|
|
|
|
|
|
Width = new GridLength(3.0, GridUnitType.Star)
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
this.MainGrid.ColumnDefinitions.Add(new ColumnDefinition()
|
|
|
|
|
|
{
|
|
|
|
|
|
Width = new GridLength(1.0, GridUnitType.Star)
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i <= 3; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (i != 2)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.MainGrid.RowDefinitions.Add(new RowDefinition()
|
|
|
|
|
|
{
|
|
|
|
|
|
Height = new GridLength(1.0, GridUnitType.Star)
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i <= 15; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
var line = new Line()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = $"YLine{i}",
|
|
|
|
|
|
Y1 = 1.0,
|
|
|
|
|
|
HorizontalAlignment = i == 15 ? HorizontalAlignment.Right : HorizontalAlignment.Left,
|
|
|
|
|
|
Stroke = Brushes.Black,
|
|
|
|
|
|
StrokeThickness = 1.0,
|
|
|
|
|
|
Stretch = Stretch.Fill,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetColumn(line, i);
|
|
|
|
|
|
Grid.SetRowSpan(line, 99);
|
|
|
|
|
|
|
|
|
|
|
|
if (i >= 3)
|
|
|
|
|
|
{
|
|
|
|
|
|
var line2 = new Line()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = $"HalfYLine{i}",
|
|
|
|
|
|
Y1 = 1.0,
|
|
|
|
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
|
|
|
|
Stroke = Brushes.Black,
|
|
|
|
|
|
StrokeThickness = 1.0,
|
|
|
|
|
|
Stretch = Stretch.Fill,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetColumn(line2, i);
|
|
|
|
|
|
Grid.SetRowSpan(line2, 1);
|
|
|
|
|
|
this.MainGrid.Children.Add(line2);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.MainGrid.Children.Add(line);
|
|
|
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i <= 2; i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
var line = new Line()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = $"XLine{i}",
|
|
|
|
|
|
X1 = 1.0,
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Top,
|
|
|
|
|
|
Stroke = Brushes.Black,
|
|
|
|
|
|
StrokeThickness = 1.0,
|
|
|
|
|
|
Stretch = Stretch.Fill,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetRow(line, i);
|
|
|
|
|
|
Grid.SetColumnSpan(line, 99);
|
|
|
|
|
|
if (i == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
Grid.SetColumn(line, 2);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (i == 2)
|
|
|
|
|
|
{
|
|
|
|
|
|
var line2 = new Line()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = $"XLine{i}",
|
|
|
|
|
|
X1 = 1.0,
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Bottom,
|
|
|
|
|
|
Stroke = Brushes.Black,
|
|
|
|
|
|
StrokeThickness = 1.0,
|
|
|
|
|
|
Stretch = Stretch.Fill,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetRow(line2, i);
|
|
|
|
|
|
Grid.SetColumnSpan(line2, 99);
|
|
|
|
|
|
this.MainGrid.Children.Add(line2);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.MainGrid.Children.Add(line);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TextBlock WorkOrder = new TextBlock()
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = "车间",
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
|
|
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
|
|
|
|
FontSize = 16,
|
|
|
|
|
|
FontWeight = FontWeights.Bold,
|
|
|
|
|
|
Foreground = Brushes.Black,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetRow(WorkOrder, 0);
|
|
|
|
|
|
Grid.SetColumn(WorkOrder, 0);
|
|
|
|
|
|
this.MainGrid.Children.Add(WorkOrder);
|
|
|
|
|
|
|
|
|
|
|
|
TextBlock WorkOrder1 = new TextBlock()
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = "黑蚊香",
|
|
|
|
|
|
Name="WorkOrder",
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
|
|
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
|
|
|
|
FontSize = 16,
|
|
|
|
|
|
FontWeight = FontWeights.Bold,
|
|
|
|
|
|
Foreground = Brushes.Black,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetRow(WorkOrder1, 0);
|
|
|
|
|
|
Grid.SetColumn(WorkOrder1, 1);
|
|
|
|
|
|
this.MainGrid.Children.Add(WorkOrder1);
|
|
|
|
|
|
|
|
|
|
|
|
TextBlock WorkOrder2 = new TextBlock()
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = "序号",
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
|
|
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
|
|
|
|
FontSize = 16,
|
|
|
|
|
|
FontWeight = FontWeights.Bold,
|
|
|
|
|
|
Foreground = Brushes.Black,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetRow(WorkOrder2, 1);
|
|
|
|
|
|
Grid.SetColumn(WorkOrder2, 0);
|
|
|
|
|
|
this.MainGrid.Children.Add(WorkOrder2);
|
|
|
|
|
|
|
|
|
|
|
|
TextBlock WorkOrder3 = new TextBlock()
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = "点检项目",
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
|
|
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
|
|
|
|
FontSize = 16,
|
|
|
|
|
|
FontWeight = FontWeights.Bold,
|
|
|
|
|
|
Foreground = Brushes.Black,
|
|
|
|
|
|
};
|
|
|
|
|
|
Grid.SetRow(WorkOrder3, 1);
|
|
|
|
|
|
Grid.SetColumn(WorkOrder3, 1);
|
|
|
|
|
|
this.MainGrid.Children.Add(WorkOrder3);
|
|
|
|
|
|
|
|
|
|
|
|
StackPanel WorkLine = new StackPanel()
|
|
|
|
|
|
{
|
|
|
|
|
|
Orientation = Orientation.Horizontal,
|
|
|
|
|
|
};
|
|
|
|
|
|
TextBlock WorkLine1 = new TextBlock()
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = "产线",
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
|
|
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
|
|
|
|
FontSize = 16,
|
|
|
|
|
|
FontWeight = FontWeights.Bold,
|
|
|
|
|
|
Foreground = Brushes.Black,
|
|
|
|
|
|
};
|
|
|
|
|
|
WorkLine.Children.Add(WorkLine1);
|
|
|
|
|
|
TextBlock WorkLine2 = new TextBlock()
|
|
|
|
|
|
{
|
|
|
|
|
|
Text = "1",
|
|
|
|
|
|
Name = "WorkLine",
|
|
|
|
|
|
VerticalAlignment = VerticalAlignment.Center,
|
|
|
|
|
|
HorizontalAlignment = HorizontalAlignment.Center,
|
|
|
|
|
|
FontSize = 16,
|
|
|
|
|
|
FontWeight = FontWeights.Bold,
|
|
|
|
|
|
Foreground = Brushes.Black,
|
|
|
|
|
|
};
|
|
|
|
|
|
WorkLine.Children.Add(WorkLine2);
|
|
|
|
|
|
Grid.SetRow(WorkLine, 1);
|
|
|
|
|
|
Grid.SetColumn(WorkLine, 1);
|
|
|
|
|
|
this.MainGrid.Children.Add(WorkLine);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|