|
|
@ -1,6 +1,7 @@ |
|
|
|
using DyeingComputer.ViewModel; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
@ -22,6 +23,7 @@ namespace DyeingComputer.View |
|
|
|
/// </summary>
|
|
|
|
public partial class EngineerSetView : UserControl |
|
|
|
{ |
|
|
|
int _S=0; |
|
|
|
public EngineerSetView() |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
@ -70,12 +72,28 @@ namespace DyeingComputer.View |
|
|
|
RX.Text = MainWindowViewModel.RX.ToString(); |
|
|
|
TX.Text = MainWindowViewModel.TX.ToString(); |
|
|
|
|
|
|
|
var displayData = MainWindowViewModel.Hardware.Select(kvp => new AdvancedDictionaryEntry |
|
|
|
_S++; |
|
|
|
if (_S > 60) |
|
|
|
{ |
|
|
|
Key = kvp.Key, |
|
|
|
Value = kvp.Value |
|
|
|
}).ToList(); |
|
|
|
_set.ItemsSource = displayData; |
|
|
|
_S = 0; |
|
|
|
var displayData = MainWindowViewModel.Hardware.Select(kvp => new AdvancedDictionaryEntry |
|
|
|
{ |
|
|
|
Key = kvp.Key, |
|
|
|
Value = kvp.Value |
|
|
|
}).ToList(); |
|
|
|
_set.ItemsSource = displayData; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void Quit_Click(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show(Properties.Resources.Quit, "800", MessageBoxButton.YesNo); |
|
|
|
if (messageBoxResult == MessageBoxResult.No) return; |
|
|
|
if (messageBoxResult == MessageBoxResult.Yes) |
|
|
|
{ |
|
|
|
// Application.Current.Shutdown();
|
|
|
|
System.Environment.Exit(0);//退出
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void Shutdown_Click(object sender, RoutedEventArgs e) |
|
|
@ -85,7 +103,8 @@ namespace DyeingComputer.View |
|
|
|
if (messageBoxResult == MessageBoxResult.Yes) |
|
|
|
{ |
|
|
|
// Application.Current.Shutdown();
|
|
|
|
System.Environment.Exit(0);//退出
|
|
|
|
//System.Environment.Exit(0);//退出
|
|
|
|
Process.Start("shutdown", "/s /t 10"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|