diff --git a/SlnMesnac.WPF/MainWindow.xaml b/SlnMesnac.WPF/MainWindow.xaml
index babdec9..a105291 100644
--- a/SlnMesnac.WPF/MainWindow.xaml
+++ b/SlnMesnac.WPF/MainWindow.xaml
@@ -22,10 +22,10 @@
-
+
-
+
diff --git a/SlnMesnac.WPF/Page/IndexControl.xaml b/SlnMesnac.WPF/Page/IndexControl.xaml
new file mode 100644
index 0000000..8bd15b0
--- /dev/null
+++ b/SlnMesnac.WPF/Page/IndexControl.xaml
@@ -0,0 +1,521 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SlnMesnac.WPF/Page/IndexControl.xaml.cs b/SlnMesnac.WPF/Page/IndexControl.xaml.cs
new file mode 100644
index 0000000..3b25cac
--- /dev/null
+++ b/SlnMesnac.WPF/Page/IndexControl.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+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.Navigation;
+using System.Windows.Shapes;
+
+namespace SlnMesnac.WPF.Page
+{
+ ///
+ /// IndexControl.xaml 的交互逻辑
+ ///
+ public partial class IndexControl : UserControl
+ {
+ public IndexControl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/SlnMesnac.WPF/SlnMesnac.WPF.csproj b/SlnMesnac.WPF/SlnMesnac.WPF.csproj
index dd5a109..b703bf6 100644
--- a/SlnMesnac.WPF/SlnMesnac.WPF.csproj
+++ b/SlnMesnac.WPF/SlnMesnac.WPF.csproj
@@ -9,7 +9,15 @@
+
+
+
+
+
+
+
+
@@ -43,7 +51,15 @@
+
+
+
+
+
+
+
+
diff --git a/SlnMesnac.WPF/Templates/image/addr.png b/SlnMesnac.WPF/Templates/image/addr.png
new file mode 100644
index 0000000..4020281
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/addr.png differ
diff --git a/SlnMesnac.WPF/Templates/image/avg_t.png b/SlnMesnac.WPF/Templates/image/avg_t.png
new file mode 100644
index 0000000..c4897bc
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/avg_t.png differ
diff --git a/SlnMesnac.WPF/Templates/image/device.png b/SlnMesnac.WPF/Templates/image/device.png
new file mode 100644
index 0000000..16df960
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/device.png differ
diff --git a/SlnMesnac.WPF/Templates/image/machine.png b/SlnMesnac.WPF/Templates/image/machine.png
new file mode 100644
index 0000000..2d6c507
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/machine.png differ
diff --git a/SlnMesnac.WPF/Templates/image/max_t.png b/SlnMesnac.WPF/Templates/image/max_t.png
new file mode 100644
index 0000000..e728eac
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/max_t.png differ
diff --git a/SlnMesnac.WPF/Templates/image/min_t.png b/SlnMesnac.WPF/Templates/image/min_t.png
new file mode 100644
index 0000000..089ac60
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/min_t.png differ
diff --git a/SlnMesnac.WPF/Templates/image/speed.png b/SlnMesnac.WPF/Templates/image/speed.png
new file mode 100644
index 0000000..1742cec
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/speed.png differ
diff --git a/SlnMesnac.WPF/Templates/image/status.png b/SlnMesnac.WPF/Templates/image/status.png
new file mode 100644
index 0000000..19878df
Binary files /dev/null and b/SlnMesnac.WPF/Templates/image/status.png differ
diff --git a/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs b/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs
index 104526c..0ced147 100644
--- a/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs
@@ -2,6 +2,7 @@
using GalaSoft.MvvmLight.Command;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
+using SlnMesnac.WPF.Page;
using SlnMesnac.WPF.Page.Generate;
using System;
using System.Windows;
@@ -15,6 +16,8 @@ namespace SlnMesnac.WPF.ViewModel
//代码生成
private readonly GenerateControl generateControl = new GenerateControl();
+ private readonly IndexControl indexControl = new IndexControl();
+
#region 参数定义
///
/// PLC设备状态
@@ -141,7 +144,22 @@ namespace SlnMesnac.WPF.ViewModel
try
{
string info = obj as string;
- //UserContent = inStoreInfoControl;
+ switch (info)
+ {
+ case "Index":
+ UserContent = indexControl; break;
+ //case "History":
+ // UserContent = historyControl; break;
+ //case "LogInfo":
+ // UserContent = logInfoControl; break;
+ //case "Version":
+ // VersionInfoWindow versionInfoWindow = new VersionInfoWindow();
+ // versionInfoWindow.Topmost = true; // 设置为最顶层
+ // versionInfoWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; // 设置为居中
+ // versionInfoWindow.ShowDialog();
+ // break;
+ default: break;
+ }
}
catch (Exception ex)
{