diff --git a/CowOutputClient/AutoCloseWindow.xaml b/CowOutputClient/AutoCloseWindow.xaml new file mode 100644 index 0000000..af56e09 --- /dev/null +++ b/CowOutputClient/AutoCloseWindow.xaml @@ -0,0 +1,18 @@ + + + + + + + + + diff --git a/CowOutputClient/AutoCloseWindow.xaml.cs b/CowOutputClient/AutoCloseWindow.xaml.cs new file mode 100644 index 0000000..11fec7e --- /dev/null +++ b/CowOutputClient/AutoCloseWindow.xaml.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +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; + +namespace CowOutputClient +{ + /// + /// Interaction logic for AutoCloseWindow.xaml + /// + public partial class AutoCloseWindow : Window + { + private DispatcherTimer mShowTimer; + private string mInfo; + + public AutoCloseWindow(string info) + { + InitializeComponent(); + mInfo = info; + } + + private void Window_Loaded(object sender, RoutedEventArgs e) + { + lblInfo.Content = mInfo; + mShowTimer = new DispatcherTimer(); + mShowTimer.Tick += new EventHandler(CloseWindow); + mShowTimer.Interval = new TimeSpan(0, 0, 0, 2, 0); + mShowTimer.Start(); + } + + public void CloseWindow(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/CowOutputClient/CowOutputClient.csproj b/CowOutputClient/CowOutputClient.csproj index ae42df2..5e9f37f 100644 --- a/CowOutputClient/CowOutputClient.csproj +++ b/CowOutputClient/CowOutputClient.csproj @@ -61,6 +61,9 @@ MSBuild:Compile Designer + + AutoCloseWindow.xaml + CalendarSelecterWindow.xaml @@ -74,6 +77,10 @@ SelectedProductWindow.xaml + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/CowOutputClient/OperateWindow.xaml b/CowOutputClient/OperateWindow.xaml index 85cb7c8..e9c9253 100644 --- a/CowOutputClient/OperateWindow.xaml +++ b/CowOutputClient/OperateWindow.xaml @@ -129,14 +129,14 @@ Property="HorizontalContentAlignment" Value="Center"> - - - - - - - - + + + + + + + +