From d27e7a25863955284c234d32ddf5ebde9c649d11 Mon Sep 17 00:00:00 2001 From: wugang <425674808@qq.com> Date: Sat, 30 Jun 2018 09:05:09 +0800 Subject: [PATCH] . --- CowOutputClient/AutoCloseWindow.xaml.cs | 4 ++- CowOutputClient/OperateWindow.xaml | 21 +++++++++++---- CowOutputClient/OperateWindow.xaml.cs | 35 ++++++++++++++++++------- CowOutputClient/app.config | 2 ++ WeighBusiness/BL/WeightInfoBL.cs | 30 ++++++++++++++++++--- 5 files changed, 73 insertions(+), 19 deletions(-) diff --git a/CowOutputClient/AutoCloseWindow.xaml.cs b/CowOutputClient/AutoCloseWindow.xaml.cs index 11fec7e..fe1acd4 100644 --- a/CowOutputClient/AutoCloseWindow.xaml.cs +++ b/CowOutputClient/AutoCloseWindow.xaml.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Configuration; using System.Linq; using System.Text; using System.Windows; @@ -30,10 +31,11 @@ namespace CowOutputClient private void Window_Loaded(object sender, RoutedEventArgs e) { + var seconds = ConfigurationManager.AppSettings["ShowSeconds"]; lblInfo.Content = mInfo; mShowTimer = new DispatcherTimer(); mShowTimer.Tick += new EventHandler(CloseWindow); - mShowTimer.Interval = new TimeSpan(0, 0, 0, 2, 0); + mShowTimer.Interval = new TimeSpan(0, 0, 0, int.Parse(seconds), 0); mShowTimer.Start(); } diff --git a/CowOutputClient/OperateWindow.xaml b/CowOutputClient/OperateWindow.xaml index 8f87506..e6c781f 100644 --- a/CowOutputClient/OperateWindow.xaml +++ b/CowOutputClient/OperateWindow.xaml @@ -46,7 +46,7 @@