20211010_CZPM_upperpc/垂直剖面动态观测系统/View/test.xaml.cs
2023-07-27 11:01:29 +08:00

71 lines
4.0 KiB
C#

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;
using .ViewModel;
using MaterialDesignThemes.Wpf;
using System.Collections.ObjectModel;
namespace .View
{
/// <summary>
/// test.xaml 的交互逻辑
/// </summary>
public partial class test : UserControl
{
static ListPageViewModel model = new ListPageViewModel();
public test()
{
InitializeComponent();
this.DataContext = model;
var menuRegister = new List<SubItem>();
menuRegister.Add(new SubItem("环境参数", new List<string> { "温度", "湿度", "24V输入电压", "24V输入电流", "48V输出电压", "95V输出电压" }));
menuRegister.Add(new SubItem("甲烷传感器", new List<string> { "压力", "浓度" }));
menuRegister.Add(new SubItem("二氧化碳传感器", new List<string> { "压力", "浓度" }));
menuRegister.Add(new SubItem("走行甲烷传感器", new List<string> { "ch4_dry", "C2H6", "H2O" }));
menuRegister.Add(new SubItem("气象传感器", new List<string> { "气温", "湿度", "大气压", "风向", "风速", "最大风速", "辐照度", "雨量" }));
menuRegister.Add(new SubItem("ADCP-WSH300传感器", new List<string> { "压力", "压缩比", "流速", "流向" }));
menuRegister.Add(new SubItem("姿态传感器", new List<string> { "姿态" }));
var item6 = new ListPageViewModel("浮标", menuRegister, PackIconKind.Register);
var menuSchedule = new List<SubItem>();
menuSchedule.Add(new SubItem("环境参数", new List<string> { "温度1", "温度2", "湿度", "漏水" }));
menuSchedule.Add(new SubItem("二氧化碳传感器", new List<string> { "压力", "浓度" }));
menuSchedule.Add(new SubItem("METS甲烷传感器", new List<string> { "压力", "浓度" }));
menuSchedule.Add(new SubItem("CTD传感器", new List<string> { "温度", "压力", "浊度", "电导率", "叶绿素", "溶解氧" }));
menuSchedule.Add(new SubItem("姿态传感器", new List<string> { "X轴", "Y轴", "Z轴" }));
menuSchedule.Add(new SubItem("ADCP-WSH300传感器", new List<string> { "压力", "压缩比", "流速", "流向" }));
var item1 = new ListPageViewModel("潜标", menuSchedule, PackIconKind.Schedule);
var menuReports = new List<SubItem>();
menuReports.Add(new SubItem("环境参数", new List<string> { "温度1", "温度2", "湿度", "漏水", "24V输入电压", "24V输入电流" }));
menuReports.Add(new SubItem("CTD传感器", new List<string> { "温度", "压力", "浊度", "电导率", "叶绿素", "溶解氧" }));
menuReports.Add(new SubItem("姿态传感器", new List<string> { "X轴", "Y轴", "Z轴" }));
menuReports.Add(new SubItem("甲烷传感器", new List<string> { "压力", "浓度" }));
menuReports.Add(new SubItem("二氧化碳传感器", new List<string> { "压力", "浓度" }));
menuReports.Add(new SubItem("METS甲烷传感器", new List<string> { "Methane", "温度" }));
menuReports.Add(new SubItem("ADCP-WSH300传感器", new List<string> { "压力", "压缩比", "流速", "流向" }));
var item2 = new ListPageViewModel("接驳盒", menuReports, PackIconKind.FileReport);
Menu.Children.Add(new UserControlMenuItem(item6));
Menu.Children.Add(new UserControlMenuItem(item1));
Menu.Children.Add(new UserControlMenuItem(item2));
}
public static void Change_Page(string page_Name)
{
model.DoNavChanged((object)page_Name);
}
}
}