/// <summary>
 /// 任务更新 2017年2月25日 wenj 新版本接口
 /// </summary>
 private void uploadTask()
 {
     this.LabelInfo.Content       = "信息:正在更新任务";
     this.btnTaskUpdate.Content   = "正在更新···";
     this.btnTaskUpdate.IsEnabled = false;
     _isShowBox = true;
     this.btnTaskUpdate.FontSize = 16;
     try
     {
         _msgThread = new MsgThread(this);
         _msgThread.Start();
         Message msg = new Message()
         {
             what = MsgCode.MSG_DownTask,
             str1 = Global.samplenameadapter[0].url,
             str2 = Global.samplenameadapter[0].user,
             str3 = Global.samplenameadapter[0].pwd
         };
         msg.args.Enqueue(Global.samplenameadapter[0].pointNum);
         msg.args.Enqueue(Global.samplenameadapter[0].pointName);
         msg.args.Enqueue(Global.samplenameadapter[0].pointType);
         msg.args.Enqueue(Global.samplenameadapter[0].orgName);
         Global.workThread.SendMessage(msg, _msgThread);
     }
     catch (Exception ex)
     {
         MessageBox.Show("出现异常!\n" + ex.Message);
     }
 }
        public void DownTaskMain()
        {
            msgThread = new MsgThread(this);
            msgThread.Start();
            Message msg = new Message()
            {
                what = MsgCode.MSG_DownTask,
                obj1 = Global.samplenameadapter[0]
            };

            Global.workThread.SendMessage(msg, msgThread);
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (null == _item)
            {
                return;
            }

            _listDetectResult = new List <string>();
            _listStrRecord    = new List <string>();
            //listJudmentValue = new List<string>();
            int sampleNum = _item.SampleNum;

            // 添加布局
            for (int i = 0; i < Global.deviceHole.SxtCount; ++i)
            {
                UIElement element = GenerateResultLayout(i, String.Format("{0:D5}", sampleNum), _item.Hole[i].SampleName);
                WrapPanelChannel.Children.Add(element);
                if (_item.Hole[i].Use)
                {
                    sampleNum++;
                    _CheckValue = new string[_HoleNumber, 24];
                    _HoleNumber++;
                }
                else
                {
                    element.Visibility = System.Windows.Visibility.Collapsed;
                }
            }

            // 显示结果的时候,把字符串生成
            ShowResult();

            if (_DataTimer == null)
            {
                _DataTimer = new DispatcherTimer()
                {
                    Interval = TimeSpan.FromSeconds(1.5)
                };
                _DataTimer.Tick += new EventHandler(SaveAndUpload);
                _DataTimer.Start();
            }

            _msgThread = new MsgThread(this);
            _msgThread.Start();
        }
Ejemplo n.º 4
0
 public GszReportWindow()
 {
     InitializeComponent();
     _msgThread = new MsgThread(this);
     _msgThread.Start();
 }
Ejemplo n.º 5
0
 public HmMeasureWindow()
 {
     InitializeComponent();
     _msgThread = new MsgThread(this);
     _msgThread.Start();
 }