|
|
|
|
|
using CommonFunc;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
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;
|
|
|
|
|
|
using System.Windows.Threading;
|
|
|
|
|
|
using System.Timers;
|
|
|
|
|
|
using XGL.Data;
|
|
|
|
|
|
using XGL.Thrift;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using static CarInfo;
|
|
|
|
|
|
using Thrift.Transport;
|
|
|
|
|
|
using Thrift.Protocol;
|
|
|
|
|
|
using System.Net.NetworkInformation;
|
|
|
|
|
|
using Thrift.Server;
|
|
|
|
|
|
using Helper;
|
|
|
|
|
|
using CentralControl.BaseData;
|
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
using CentralControl.App_Code;
|
|
|
|
|
|
using XGL.Models;
|
|
|
|
|
|
using CentralControl.DBDAO;
|
|
|
|
|
|
|
|
|
|
|
|
namespace XGL.FormItem
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// FormBoard.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class FormBoard : Window
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 时间刷新计时器
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private DispatcherTimer dispatcherTimer = new DispatcherTimer();
|
|
|
|
|
|
|
|
|
|
|
|
private DispatcherTimer TimerReal;
|
|
|
|
|
|
|
|
|
|
|
|
private int LoopIndex = 1;
|
|
|
|
|
|
public static string id = "";
|
|
|
|
|
|
public static string order_code = "";
|
|
|
|
|
|
public static string line_code = "";
|
|
|
|
|
|
public static string prod_code = "";
|
|
|
|
|
|
public static string materiel_box_no = "";
|
|
|
|
|
|
|
|
|
|
|
|
private int IsHouseMenuVisible = 0;
|
|
|
|
|
|
|
|
|
|
|
|
private DispatcherTimer ShowTimer;//刷新时间
|
|
|
|
|
|
private DispatcherTimer PlcTime;//跟plc交互
|
|
|
|
|
|
|
|
|
|
|
|
private DispatcherTimer PlcTime101102;//跟plc交互
|
|
|
|
|
|
|
|
|
|
|
|
private DispatcherTimer PingThriftTimer;//ping thrift ip地址
|
|
|
|
|
|
|
|
|
|
|
|
private DispatcherTimer ThriftServerTimer;//启动thrift监听
|
|
|
|
|
|
|
|
|
|
|
|
public static int isdaowei = 0;
|
|
|
|
|
|
|
|
|
|
|
|
FormShowSelect formSelect;
|
|
|
|
|
|
public static int WeekNo = CommonHelper.WeekOfYear(DateTime.Now, new System.Globalization.CultureInfo("zh-CN"));
|
|
|
|
|
|
|
|
|
|
|
|
private void FormBoard_Loaded(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
ShowTimer = new System.Windows.Threading.DispatcherTimer();
|
|
|
|
|
|
ShowTimer.Tick += new EventHandler(ShowCurTimer);//起个Timer一直获取当前时间
|
|
|
|
|
|
ShowTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);
|
|
|
|
|
|
|
|
|
|
|
|
ShowTimer.Start();
|
|
|
|
|
|
}
|
|
|
|
|
|
private void Close(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
System.Environment.Exit(System.Environment.ExitCode);
|
|
|
|
|
|
}
|
|
|
|
|
|
public void ShowCurTimer(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
LabDate.Content = DateTime.Now.ToString("yyyy年MM月dd日");
|
|
|
|
|
|
LabTime.Content = DateTime.Now.ToString("HH:mm:ss");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|