提交了仪表的模型

This commit is contained in:
2024-07-28 22:59:11 +08:00
parent c9f4e88e04
commit a76546ebe6
59 changed files with 3273 additions and 586 deletions

View File

@@ -53,7 +53,9 @@ namespace CapMachine.Wpf
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
////注册日志服务
//containerRegistry.RegisterSingleton<ILogService, LogService>();
containerRegistry.RegisterSingleton<ILogService, LogService>();
containerRegistry.RegisterSingleton<SysService>();
containerRegistry.RegisterSingleton<ConfigService>();
////注册设备服务
//containerRegistry.RegisterSingleton<MachineDataService>();
@@ -79,9 +81,12 @@ namespace CapMachine.Wpf
containerRegistry.RegisterForNavigation<MonitorView, MonitorViewModel>();
containerRegistry.RegisterForNavigation<ProConfigView, ProConfigViewModel>();
containerRegistry.RegisterForNavigation<RealTimeChartView, RealTimeChartViewModel>();
//containerRegistry.RegisterForNavigation<ProChartView, ProChartViewModel>();
//containerRegistry.RegisterForNavigation<ProConfigView, ProConfigViewModel>();
containerRegistry.RegisterForNavigation<UserManageView, UserManageViewModel>();
containerRegistry.RegisterForNavigation<ActionLogView, ActionLogViewModel>();
containerRegistry.RegisterForNavigation<FooterView, FooterViewModel>();
containerRegistry.RegisterForNavigation<ProStepConfigPsView, ProStepConfigPsViewModel>();
containerRegistry.RegisterForNavigation<ProStepConfigMainView, ProStepConfigMainViewModel>();
//注册Dialog视图时绑定VM
containerRegistry.RegisterDialog<DialogCreateProView, DialogCreateProViewModel>();
containerRegistry.RegisterDialog<DialogEditProView, DialogEditProViewModel>();
@@ -120,6 +125,7 @@ namespace CapMachine.Wpf
//从容器中获取MainView的实例对象
var container = ContainerLocator.Container;
var shell = container.Resolve<object>("MainView");
if (shell is Window view)
{
//更新Prism注册区域信息
@@ -127,6 +133,10 @@ namespace CapMachine.Wpf
RegionManager.SetRegionManager(view, regionManager);
RegionManager.UpdateRegions();
//给MainView的MainViewFooterContentRegion区域设置FooterView具体的信息
regionManager.RequestNavigate("MainViewFooterContentRegion", nameof(FooterView));
//调用首页的INavigationAware 接口做一个初始化操作
if (view.DataContext is INavigationAware navigationAware)
{
@@ -134,6 +144,7 @@ namespace CapMachine.Wpf
//呈现首页
App.Current.MainWindow = view;
}
}
//先加载服务防止在ViewModel中使用时速度慢
@@ -141,8 +152,11 @@ namespace CapMachine.Wpf
//var appVersionService1 = ContainerLocator.Container.Resolve<MachineDataService>();
//var appVersionService2 = ContainerLocator.Container.Resolve<ILogService>();
var appVersionService3 = ContainerLocator.Container.Resolve<MachineRtDataService>();
var appVersionService4 = ContainerLocator.Container.Resolve<ProStepConfigPsView>();
base.OnInitialized();
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -9,6 +9,7 @@
</PropertyGroup>
<ItemGroup>
<None Remove="Assets\Images\favicon.ico" />
<None Remove="Assets\Images\参考工艺图.png" />
</ItemGroup>
@@ -28,15 +29,15 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="NPOI" Version="2.7.1" />
<PackageReference Include="Prism.DryIoc" Version="8.1.97" />
<PackageReference Include="Syncfusion.Licensing" Version="24.2.7" />
<PackageReference Include="Syncfusion.SfGrid.WPF" Version="24.2.7" />
<PackageReference Include="Syncfusion.Shared.WPF" Version="24.2.7" />
<PackageReference Include="Syncfusion.Tools.WPF" Version="24.2.7" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Dtos\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CapMachine.Core\CapMachine.Core.csproj" />
<ProjectReference Include="..\CapMachine.Model\CapMachine.Model.csproj" />
@@ -56,5 +57,13 @@
<HintPath>C:\Program Files (x86)\Arction\LightningChart .NET SDK v.10\LibNET4\Arction.Wpf.Charting.LightningChart.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="ReportFile\" />
</ItemGroup>
<ItemGroup>
<Resource Include="Assets\Images\favicon.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,35 @@
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Dtos
{
/// <summary>
///
/// </summary>
public class ActionLogDto : BindableBase
{
/// <summary>
/// 等级
/// </summary>
public int Level { get; set; }
/// <summary>
/// 分类
/// </summary>
public string? Category { get; set; }
/// <summary>
/// 内容
/// </summary>
public string? Content { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using AutoMapper;
using CapMachine.Model;
using CapMachine.Wpf.Dtos;
using CapMachine.Wpf.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.MapperProfile
{
public class ActionLogProfile:Profile
{
public ActionLogProfile()
{
CreateMap<ActionLog, ActionLogDto>().ReverseMap();
}
}
}

View File

@@ -0,0 +1,33 @@
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Models
{
public class ComboBoxModel:BindableBase
{
private string key;
/// <summary>
/// Key值
/// </summary>
public string Key
{
get { return key; }
set { key = value; RaisePropertyChanged(); }
}
private string text;
/// <summary>
/// Text值
/// </summary>
public string Text
{
get { return text; }
set { text = value; RaisePropertyChanged(); }
}
}
}

View File

@@ -0,0 +1,14 @@
using Prism.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.PrismEvent
{
public class ProStepDrawerEvent : PubSubEvent<string>
{
}
}

View File

@@ -0,0 +1,20 @@
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Services
{
/// <summary>
/// 配置服务中心
/// </summary>
public class ConfigService:BindableBase
{
public ConfigService()
{
}
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Services
{
/// <summary>
/// NLog服务
/// </summary>
public interface ILogService
{
void Debug(string msg);
void Error(string msg);
void Fatal(string msg);
void Info(string msg);
void Warn(string msg);
}
}

View File

@@ -0,0 +1,83 @@
using NLog;
using Prism.Services.Dialogs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Services
{
/// <summary>
/// NLog 服务
/// </summary>
public class LogService : ILogService
{
private static Logger logger = LogManager.GetCurrentClassLogger(); //初始化日志类
/// <summary>
/// 调试日志
/// </summary>
/// <param name="msg">日志内容</param>
public void Debug(string msg)
{
logger.Debug(msg);
}
/// <summary>
/// 信息日志
/// </summary>
/// <param name="msg">日志内容</param>
/// <remarks>
/// 适用大部分场景
/// 1.记录日志文件
/// </remarks>
public void Info(string msg)
{
logger.Info(msg);
}
/// <summary>
/// 错误日志
/// </summary>
/// <param name="msg">日志内容</param>
/// <remarks>
/// 适用异常,错误日志记录
/// 1.记录日志文件
/// </remarks>
public void Error(string msg)
{
logger.Error(msg);
}
/// <summary>
/// 严重致命错误日志
/// </summary>
/// <param name="msg">日志内容</param>
/// <remarks>
/// 1.记录日志文件
/// 2.控制台输出
/// </remarks>
public void Fatal(string msg)
{
logger.Fatal(msg);
}
/// <summary>
/// 警告日志
/// </summary>
/// <param name="msg">日志内容</param>
/// <remarks>
/// 1.记录日志文件
/// 2.发送日志邮件
/// </remarks>
public void Warn(string msg)
{
try
{
logger.Warn(msg);
}
catch { }
}
}
}

View File

@@ -26,38 +26,36 @@ namespace CapMachine.Wpf.Services
public void Initialize()
{
MenuItems.Clear();
MenuItems.Add(new NavigationItem("", "全部", "", new ObservableCollection<NavigationItem>()
MenuItems.Add(new NavigationItem("", "系统", "", new ObservableCollection<NavigationItem>()
{
new NavigationItem("","模板匹配","",new ObservableCollection<NavigationItem>()
new NavigationItem("","系统配置","",new ObservableCollection<NavigationItem>()
{
new NavigationItem("ShapeCirclePlus","轮廓匹配",""),
new NavigationItem("ShapeOutline","形状匹配",""),
new NavigationItem("Clouds", "相似性匹配",""),
new NavigationItem("ShapeOvalPlus","形变匹配",""),
new NavigationItem("ShapeCirclePlus","日志文件",""),
new NavigationItem("ShapeOutline","工况预设",""),
new NavigationItem("Clouds", "高速记录",""),
new NavigationItem("ShapeOvalPlus","系统配置",""),
}),
new NavigationItem("", "比较测量","",new ObservableCollection<NavigationItem>()
new NavigationItem("", "计算信息","",new ObservableCollection<NavigationItem>()
{
new NavigationItem("Circle","卡尺找圆",""),
new NavigationItem("Palette","颜色检测",""),
new NavigationItem("Ruler", "几何测量",""),
new NavigationItem("Circle","过热度",""),
new NavigationItem("Palette","过冷度",""),
}),
new NavigationItem("","字符识别","",new ObservableCollection<NavigationItem>()
new NavigationItem("", "PID设置","",new ObservableCollection<NavigationItem>()
{
new NavigationItem("FormatColorText", "字符识别",""),
new NavigationItem("Barcode", "一维码识别",""),
new NavigationItem("Qrcode", "二维码识别",""),
new NavigationItem("Circle","转速PID",""),
}),
new NavigationItem("","缺陷检测","",new ObservableCollection<NavigationItem>()
new NavigationItem("","版本信息","",new ObservableCollection<NavigationItem>()
{
new NavigationItem("Crop", "差分模型",""),
new NavigationItem("CropRotate", "形变模型",""),
})
new NavigationItem("FormatColorText", "操作手册",""),
new NavigationItem("Barcode", "版本更新信息",""),
}),
}));
MenuItems.Add(new NavigationItem("", "工艺过程", "MonitorView"));
MenuItems.Add(new NavigationItem("", "工艺参数", "ProConfigView"));
MenuItems.Add(new NavigationItem("", "工艺曲线", "RealTimeChartView"));
MenuItems.Add(new NavigationItem("", "动作日志", "ActionLogView"));
MenuItems.Add(new NavigationItem("", "用户管理", "UserView"));
MenuItems.Add(new NavigationItem("", "用户管理", "UserManageView"));
}
}
}

View File

@@ -0,0 +1,49 @@
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.Services
{
/// <summary>
/// 系统资源
/// </summary>
public class SysService : BindableBase
{
public SysService()
{
// 创建一个定时器设置间隔时间为2000毫秒即2秒
CurTimer = new System.Timers.Timer(5000);
CurTimer.AutoReset = true;
// 设置Elapsed事件处理程序
CurTimer.Elapsed += CurTimer_Elapsed;
// 启动定时器
CurTimer.Start();
}
private void CurTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
{
CurDateTime=DateTime.Now;
}
/// <summary>
/// 定时器
/// </summary>
private System.Timers.Timer CurTimer { get; set; }
private DateTime _CurDateTime;
/// <summary>
/// 当前时间信息
/// </summary>
public DateTime CurDateTime
{
get { return _CurDateTime; }
set { _CurDateTime = value; RaisePropertyChanged(); }
}
}
}

View File

@@ -0,0 +1,387 @@
using AutoMapper;
using CapMachine.Core;
using CapMachine.Model;
using CapMachine.Wpf.Dtos;
using CapMachine.Wpf.Models;
using CapMachine.Wpf.Services;
using Microsoft.Extensions.Logging;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using Prism.Events;
using Prism.Services.Dialogs;
using Syncfusion.Windows.Shared;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace CapMachine.Wpf.ViewModels
{
public class ActionLogViewModel : NavigationViewModel
{
/// <summary>
/// 实例化
/// </summary>
/// <param name="dialogService"></param>
/// <param name="freeSql"></param>
/// <param name="eventAggregator"></param>
public ActionLogViewModel(IDialogService dialogService, IFreeSql freeSql, IEventAggregator eventAggregator, IMapper mapper, ILogService logger)
{
DialogService = dialogService;
FreeSql = freeSql;
EventAggregator = eventAggregator;
Mapper = mapper;
Logger = logger;
CategoryComboBoxList = new List<ComboBoxModel>()
{
new ComboBoxModel(){Key="0",Text="系统" },
new ComboBoxModel(){Key="1",Text="程序步骤" },
new ComboBoxModel(){Key="2",Text="报警" },
};
}
private string CurrentName = "埋塞敲入螺旋钉安装";
private string CurrentTemplate = "BurPlugInstallTemplate.xlsx";
public IDialogService DialogService { get; }
public IFreeSql FreeSql { get; }
public IEventAggregator EventAggregator { get; }
public IMapper Mapper { get; }
public ILogService Logger { get; }
//ActionLog
private List<ComboBoxModel> _CategoryComboBoxList;
/// <summary>
/// 分类下拉框列表
/// </summary>
public List<ComboBoxModel> CategoryComboBoxList
{
get { return _CategoryComboBoxList; }
set { _CategoryComboBoxList = value; RaisePropertyChanged(); }
}
private string _SearchCategory;
/// <summary>
/// 搜索条件-分类
/// </summary>
public string SearchCategory
{
get
{
return _SearchCategory;
}
set
{
_SearchCategory = value;
RaisePropertyChanged();
}
}
/// <summary>
/// 列表集合
/// </summary>
private ObservableCollection<ActionLogDto> _ListModelDto=new ObservableCollection<ActionLogDto>();
/// <summary>
/// 列表集合
/// </summary>
public ObservableCollection<ActionLogDto> ListModelDto
{
get { return _ListModelDto; }
set { _ListModelDto = value; }
}
#region
/// <summary>
/// 分类
/// </summary>
private string _Category;
public string Category
{
get
{
return _Category;
}
set
{
_Category = value;
RaisePropertyChanged();
}
}
///// <summary>
///// 搜索条件-筒体编号
///// </summary>
//private string searchCylinderNo;
//public string SearchCylinderNo
//{
// get
// {
// return searchCylinderNo;
// }
// set
// {
// searchCylinderNo = value;
// RaisePropertyChanged();
// }
//}
/// <summary>
/// 搜索条件-开始时间
/// </summary>
private string _SearchStartDate;
public string SearchStartDate
{
get
{
return _SearchStartDate;
}
set
{
_SearchStartDate = value;
RaisePropertyChanged();
}
}
/// <summary>
/// 搜索条件-结束时间
/// </summary>
private string _SearchEndDate;
public string SearchEndDate
{
get
{
return _SearchEndDate;
}
set
{
_SearchEndDate = value;
RaisePropertyChanged();
}
}
#endregion
#region
/// <summary>
/// 搜索命令
/// </summary>
private DelegateCommand _SearchCmd;
public DelegateCommand SearchCmd
{
get
{
if (_SearchCmd == null) return new DelegateCommand((a) => Search());
return _SearchCmd;
}
set
{
_SearchCmd = value;
}
}
private void Search()
{
try
{
var MulConQueryable = FreeSql.Select<ActionLog>();
//多条件查询
if (!string.IsNullOrEmpty(SearchCategory))
{
MulConQueryable = MulConQueryable.Where(t => t.Category == SearchCategory);
}
//多条件查询
if (!string.IsNullOrEmpty(SearchStartDate))
{
MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date >= Convert.ToDateTime(SearchStartDate));
}
//多条件查询
if (!string.IsNullOrEmpty(SearchEndDate))
{
MulConQueryable = MulConQueryable.Where(t => t.CreateTime.Date < Convert.ToDateTime(SearchEndDate).AddDays(1));
}
var ListDpI = MulConQueryable.OrderByDescending(a => a.CreateTime).ToList();//.Where(a => a.CreateTime >= DateTime.Now);
ListModelDto.Clear();
foreach (var item in ListDpI)
{
ListModelDto.Add(Mapper.Map<ActionLogDto>(item));
}
}
catch (Exception ex)
{
Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
}
}
#endregion
#region "导出数据"
/// <summary>
/// 搜索命令
/// </summary>
private DelegateCommand _OutputDataCmd;
public DelegateCommand OutputDataCmd
{
set
{
_OutputDataCmd = value;
}
get
{
if (_OutputDataCmd == null)
{
_OutputDataCmd = new DelegateCommand(a => OutputDataAction());
}
return _OutputDataCmd;
}
}
private void OutputDataAction()
{
return;
try
{
if (ListModelDto != null && ListModelDto.Count > 0)
{
string FilePath = string.Empty;
//FolderBrowserDialog dialog = new FolderBrowserDialog();
//dialog.Description = "请选择文件夹";
//dialog.ShowNewFolderButton = true; // 显示 新建文件夹 按钮
// //dialog.SelectedPath = Environment.CurrentDirectory; // 设置 选择的路径 为 当前项目路径
//if (dialog.ShowDialog() == DialogResult.OK)
//{
// // 判空
// if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show("文件夹路径不能为空", "温馨提示", MessageBoxButton.OK, MessageBoxImage.Information); return; }
// FilePath = dialog.SelectedPath; // 获取 选择的 文件夹 路径
//}
var ListData = ListModelDto.ToList();
/***********************
1.读取excel到workbook中
***********************/
string TemplateFilePath = System.Environment.CurrentDirectory;
string tPath = TemplateFilePath + @"\ReportFile\" + CurrentTemplate;
//string tPath = @"D:\ReportTemplate\注油Template.xlsx";
XSSFWorkbook wk = null;
using (FileStream fs = File.Open(tPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
wk = new XSSFWorkbook(fs);
fs.Close(); //把excel里的内容保存到workbook中之后就可以关闭了
}
NPOI.SS.UserModel.ISheet sheet = wk.GetSheetAt(0); //获得wk中第一个sheet,保存到sheet中
/***********************
2.操作数据
***********************/
//2行 5行
IDataFormat dataformat = wk.CreateDataFormat();
ICellStyle style0 = wk.CreateCellStyle();
ICellStyle styleBag = wk.CreateCellStyle();
styleBag.FillForegroundColor = HSSFColor.Red.Index;
styleBag.FillPattern = FillPattern.SolidForeground;
for (int i = 0; i < ListData.Count; i++)// (int i = 2; i < 6; i += 3)
{
IRow row;
row = sheet.CreateRow(i + 1);
//row.CreateCell(0).SetCellValue(ListData[i].StaticDiskNo.ToString());
//row.CreateCell(1).SetCellValue(ListData[i].OpNo.ToString());
//row.CreateCell(2).SetCellValue(ListData[i].CreateTime.ToString("yyyy-MM-dd HH:mm"));
//row.GetCell(10).CellStyle = style0;
style0.DataFormat = dataformat.GetFormat("yyyy-MM-dd HH:mm:ss");
row.GetCell(2).CellStyle = style0;
//row.GetCell(26).CellStyle = style0;
//if (ListDat[i].UpperGroupStandDiffResult == "NG")
//{
// row.GetCell(4).CellStyle = styleBag;
//}
//if (ListDat[i].LowerGroupStandDiffResult == "NG")
//{
// row.GetCell(6).CellStyle = styleBag;
//}
//if (ListDat[i].GroupStandDiffResult == "NG")
//{
// row.GetCell(8).CellStyle = styleBag;
//}
//if (ListDat[i].FillReal >= ListDat[i].BeforLow && ListDat[i].FillReal <= ListDat[i].BeforUp)
//{
//}
//else
//{
// row.GetCell(7).CellStyle = styleBag;
//}
}
//DayDailyParameterInfo = null;
//NightDailyParameterInfo = null;
/***********************
3.修改完成,写入到客户端
***********************/
using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
{
//tPath = @"D:\日立报表\";
//判断文件夹是否存在,不存在就创建
if (!Directory.Exists(FilePath))
{
Directory.CreateDirectory(FilePath);
}
FilePath = FilePath + @"\" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + Convert.ToDateTime(SearchStartDate).ToString("yyyy-MM-dd") + "-" + CurrentName + ".xlsx";
wk.Write(ms);
using (FileStream fs = new FileStream(FilePath, FileMode.Create, FileAccess.Write))
{
byte[] data = ms.ToArray();
fs.Write(data, 0, data.Length);
fs.Flush();
}
wk = null;
}
System.Windows.MessageBox.Show("生成成功");
}
else
{
MessageBox.Show("请先搜索数据后再导出", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
catch (Exception ex)
{
Logger.Error(String.Format("ErrSource : {0} ErrMsg : {1}", ex.StackTrace.ToString(), ex.Message.ToString()));
}
}
#endregion
}
}

View File

@@ -0,0 +1,17 @@
using CapMachine.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.ViewModels
{
public class FooterViewModel : NavigationViewModel
{
public FooterViewModel()
{
var dd = 1;
}
}
}

View File

@@ -1,6 +1,7 @@
using CapMachine.Core;
using CapMachine.Core.IService;
using CapMachine.Wpf.Models;
using CapMachine.Wpf.Services;
using Prism.Commands;
using Prism.Regions;
@@ -8,15 +9,16 @@ namespace CapMachine.Wpf.ViewModels
{
public class MainViewModel : NavigationViewModel
{
public MainViewModel(IRegionManager region, INavigationMenuService menuService)
public MainViewModel(IRegionManager region, INavigationMenuService menuService, SysService sysService)
{
this.region = region;
MenuService = menuService;
SysService = sysService;
NavigateCommand = new DelegateCommand<NavigationItem>(Navigate);
}
public INavigationMenuService MenuService { get; }
public SysService SysService { get; }
public DelegateCommand<NavigationItem> NavigateCommand { get; private set; }
private int selectedIndex = -1;
@@ -46,7 +48,7 @@ namespace CapMachine.Wpf.ViewModels
{
if (item == null) return;
if (item.Name.Equals("全部"))
if (item.Name.Equals("系统"))
{
IsTopDrawerOpen = true;
return;

View File

@@ -1,6 +1,11 @@
using CapMachine.Core;
using CapMachine.Model;
using CapMachine.Wpf.PrismEvent;
using CapMachine.Wpf.Views;
using MaterialDesignThemes.Wpf;
using Prism.Commands;
using Prism.Events;
using Prism.Regions;
using Prism.Services.Dialogs;
using System.Collections.ObjectModel;
using System.Text;
@@ -10,10 +15,13 @@ namespace CapMachine.Wpf.ViewModels
{
public class ProConfigViewModel : NavigationViewModel
{
public ProConfigViewModel(IDialogService dialogService, IFreeSql freeSql)
public ProConfigViewModel(IDialogService dialogService, IFreeSql freeSql,IEventAggregator eventAggregator, IRegionManager regionManager)
{
//LogService = logService;
FreeSql = freeSql;
EventAggregator = eventAggregator;
RegionManager = regionManager;
//MachineDataService = machineDataService;
DialogService = dialogService;
@@ -29,12 +37,16 @@ namespace CapMachine.Wpf.ViewModels
//各个单独仪表的初始化
SelectedMeterSpeed = new MeterSpeed();
SelectedPs = new MeterPs();
}
/// <summary>
/// FreeSQL 实例函数
/// </summary>
public IFreeSql FreeSql { get; }
public IEventAggregator EventAggregator { get; }
public IRegionManager RegionManager { get; }
/// <summary>
/// 弹窗服务
@@ -276,6 +288,37 @@ namespace CapMachine.Wpf.ViewModels
#endregion
private DelegateCommand _ProStepPsCmd;
/// <summary>
/// 新增PS命令
/// </summary>
public DelegateCommand ProStepPsCmd
{
set
{
_ProStepPsCmd = value;
}
get
{
if (_ProStepPsCmd == null)
{
_ProStepPsCmd = new DelegateCommand(() => ProStepPsCmdCmdMethod());
}
return _ProStepPsCmd;
}
}
private void ProStepPsCmdCmdMethod()
{
//var openDrawerCommand = MaterialDesignThemes.Wpf.DrawerHost.OpenDrawerCommand;
RegionManager.RequestNavigate("ProStepDrawerContentRegion", nameof(ProStepConfigPsView));
//EventAggregator.GetEvent<ProStepDrawerEvent>().Publish("Right");
}
#region Ps表
private ObservableCollection<MeterPs> _ListMeterPsItems;

View File

@@ -0,0 +1,19 @@
using CapMachine.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.ViewModels
{
public class ProStepConfigMainViewModel : NavigationViewModel
{
public ProStepConfigMainViewModel()
{
}
}
}

View File

@@ -0,0 +1,14 @@
using CapMachine.Core;
namespace CapMachine.Wpf.ViewModels
{
public class ProStepConfigPsViewModel : NavigationViewModel
{
public ProStepConfigPsViewModel()
{
}
}
}

View File

@@ -0,0 +1,20 @@
using CapMachine.Core;
using Prism.Events;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CapMachine.Wpf.ViewModels
{
public class UserManageViewModel : NavigationViewModel
{
public UserManageViewModel(IEventAggregator eventAggregator)
{
//事件服务
_EventAggregator = eventAggregator;
}
private IEventAggregator _EventAggregator { get; set; }
}
}

View File

@@ -0,0 +1,153 @@
<UserControl
x:Class="CapMachine.Wpf.Views.ActionLogView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
Width="1920"
Height="980"
prism:ViewModelLocator.AutoWireViewModel="True">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="220" />
<RowDefinition />
</Grid.RowDefinitions>
<GroupBox Margin="5,10,5,10" Header="日志查询条件">
<StackPanel Margin="0,0,0,0" Orientation="Vertical">
<StackPanel.Resources>
<Style TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="Margin" Value="0,0,0,4" />
</Style>
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="Label">
<Setter Property="Width" Value="120" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style BasedOn="{StaticResource {x:Type CheckBox}}" TargetType="CheckBox">
<Setter Property="Padding" Value="0,3" />
</Style>
<Style BasedOn="{StaticResource {x:Type RadioButton}}" TargetType="RadioButton">
<Setter Property="Padding" Value="0,3" />
</Style>
</StackPanel.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="9*" />
<RowDefinition Height="3*" />
</Grid.RowDefinitions>
<StackPanel
Grid.Column="0"
Margin="0,0,0,20"
HorizontalAlignment="Center"
Orientation="Horizontal">
<StackPanel
Margin="20"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Label
HorizontalAlignment="Center"
HorizontalContentAlignment="Center"
Content="分类:" />
<DockPanel x:Name="Combbox1">
<StackPanel>
<!--<ComboBox Width="200" HorizontalAlignment="Left" ItemsSource="{Binding CombboxList}" SelectedItem="{Binding CombboxItem}" DisplayMemberPath="Text" SelectedValuePath="Key" ></ComboBox>-->
<ComboBox
Width="120"
materialDesign:HintAssist.Hint="分类"
DisplayMemberPath="Text"
ItemsSource="{Binding CategoryComboBoxList}"
SelectedValue="{Binding SearchCategory}"
SelectedValuePath="Text" />
</StackPanel>
</DockPanel>
</StackPanel>
<StackPanel Margin="20">
<Label HorizontalContentAlignment="Center" Content="创建时间:" />
<DatePicker
Width="120"
Margin="0,0,10,0"
materialDesign:HintAssist.Hint="开始时间"
SelectedDate="{Binding SearchStartDate, Mode=TwoWay}"
Style="{StaticResource MaterialDesignFloatingHintDatePicker}" />
<DatePicker
Width="120"
Margin="10,0,10,0"
materialDesign:HintAssist.Hint="结束时间"
SelectedDate="{Binding SearchEndDate, Mode=TwoWay}"
Style="{StaticResource MaterialDesignFloatingHintDatePicker}" />
</StackPanel>
</StackPanel>
<StackPanel
Grid.Row="1"
Background=" AliceBlue"
Orientation="Horizontal">
<Button
Width="120"
Height="30"
Margin="10,10,10,10"
HorizontalAlignment="Center"
Background="Green"
Command="{Binding SearchCmd}"
Content="搜索"
Foreground="White" />
<Button
Width="120"
Height="30"
Margin="10,10,10,10"
HorizontalAlignment="Center"
Background="Orange"
Command="{Binding OutputDataCmd}"
Content="导出数据"
Foreground="White" />
</StackPanel>
</Grid>
</StackPanel>
</GroupBox>
<Grid Grid.Row="1" Margin="8">
<DataGrid
x:Name="dg1"
Grid.ColumnSpan="2"
AutoGenerateColumns="False"
IsReadOnly="True"
ItemsSource="{Binding ListModelDto}"
SelectionMode="Single"
SelectionUnit="Cell">
<!--<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding SelectedItemsCmd}" CommandParameter="{Binding ElementName=dg1}" />
</i:EventTrigger>
</i:Interaction.Triggers>-->
<DataGrid.Columns>
<DataGridTextColumn
Width="100"
Binding="{Binding Level}"
Header="等级" />
<DataGridTextColumn
Width="200"
Binding="{Binding Category}"
Header="分类" />
<DataGridTextColumn
Width="1200"
Binding="{Binding Content}"
Header="内容" />
<DataGridTextColumn
Width="180"
Binding="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"
Header="创建时间" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
</UserControl>

View File

@@ -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 CapMachine.Wpf.Views
{
/// <summary>
/// ActionLogView.xaml 的交互逻辑
/// </summary>
public partial class ActionLogView : UserControl
{
public ActionLogView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,86 @@
<UserControl
x:Class="CapMachine.Wpf.Views.FooterView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
Width="1920"
Height="30"
prism:ViewModelLocator.AutoWireViewModel="True"
mc:Ignorable="d">
<Grid Margin="2,0,2,2">
<Grid.Resources>
<Style x:Key="BoardStyle" TargetType="Border">
<Setter Property="Background" Value="AliceBlue" />
<Setter Property="Margin" Value="3,0" />
<Setter Property="CornerRadius" Value="3" />
</Style>
<Style x:Key="StackPanelStyle" TargetType="StackPanel">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Orientation" Value="Horizontal" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="PLC通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="1" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="仪表通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="2" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="服务器通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="3" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="用户登录:" />
<TextBlock FontSize="20" Text="Admin" />
</StackPanel>
</Border>
<Border Grid.Column="4" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="记录仪通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="5" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="高速记录:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="6" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="数据记录:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="7" Style="{StaticResource BoardStyle}">
<StackPanel Style="{StaticResource StackPanelStyle}">
<TextBlock FontSize="20" Text="系统状态:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
</Grid>
</UserControl>

View File

@@ -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 CapMachine.Wpf.Views
{
/// <summary>
/// FooterView.xaml 的交互逻辑
/// </summary>
public partial class FooterView : UserControl
{
public FooterView()
{
InitializeComponent();
}
}
}

View File

@@ -8,16 +8,19 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:prism="http://prismlibrary.com/"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Title="压缩机耐久测试平台"
Width="1920"
Height="1080"
prism:ViewModelLocator.AutoWireViewModel="True"
Icon="/Assets/Images/favicon.ico"
WindowStyle="SingleBorderWindow"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition />
<RowDefinition Height="32" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<md:ColorZone md:ElevationAssist.Elevation="Dp2" Mode="PrimaryDark">
@@ -98,6 +101,13 @@
</i:EventTrigger>
</i:Interaction.Triggers>
</ListBox>
<StackPanel
Grid.Column="2"
Margin="20,0"
VerticalAlignment="Center">
<TextBlock FontSize="18" Text="{Binding SysService.CurDateTime, StringFormat={}{0:yyyy-MM-dd HH:mm}}" />
</StackPanel>
</Grid>
</md:ColorZone>
@@ -123,9 +133,9 @@
<TextBlock
Margin="5,0"
VerticalAlignment="Center"
FontSize="14"
FontSize="24"
FontWeight="Bold"
Foreground="White"
Foreground="BlueViolet"
Text="{Binding Name}" />
</StackPanel>
@@ -162,73 +172,10 @@
prism:RegionManager.RegionName="MainViewContentRegion"
Visibility="Collapsed" />
<Grid Grid.Row="2" Margin="4">
<Grid.Resources>
<Style x:Key="BoardStyle" TargetType="Border">
<Setter Property="Background" Value="AliceBlue" />
<Setter Property="Margin" Value="3,0" />
<Setter Property="CornerRadius" Value="3" />
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Border Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="PLC通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="1" Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="仪表通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="2" Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="服务器通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="3" Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="用户登录:" />
<TextBlock FontSize="20" Text="Admin" />
</StackPanel>
</Border>
<Border Grid.Column="4" Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="记录仪通信:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="5" Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="高速记录:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="6" Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="数据记录:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
</Border>
<Border Grid.Column="7" Style="{StaticResource BoardStyle}">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock FontSize="20" Text="系统状态:" />
<TextBlock FontSize="20" Text="正常" />
</StackPanel>
<ContentControl
x:Name="MainViewFooterContentControl"
Grid.Row="2"
prism:RegionManager.RegionName="MainViewFooterContentRegion" />
</Border>
</Grid>
</Grid>
</Window>

View File

@@ -7,7 +7,7 @@
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="1000"
d:DesignHeight="980"
d:DesignWidth="1920"
mc:Ignorable="d">
<materialDesign:DrawerHost

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,7 @@
using System.Windows;
using CapMachine.Wpf.PrismEvent;
using MaterialDesignThemes.Wpf;
using Prism.Events;
using System.Windows;
using System.Windows.Controls;
namespace CapMachine.Wpf.Views
@@ -8,34 +11,45 @@ namespace CapMachine.Wpf.Views
/// </summary>
public partial class ProConfigView : UserControl
{
public ProConfigView()
public ProConfigView(IEventAggregator eventAggregator)
{
InitializeComponent();
EventAggregator = eventAggregator;
EventAggregator.GetEvent<ProStepDrawerEvent>().Subscribe(DrawerCmd);
}
private void DrawerCmd(string obj)
{
ProDrawerHost.IsRightDrawerOpen = true;
//ProDrawerHost.IsLeftDrawerOpen = true;
}
public int TabSelectedIndex { get; set; }
public IEventAggregator EventAggregator { get; }
private void ProStepOtherTapLeft(object sender, RoutedEventArgs e)
{
if (TabSelectedIndex > 0)
{
TabSelectedIndex--;
OtherTabControl.SelectedIndex = TabSelectedIndex;
// 将选定的 TabItem 滚动到可视范围内
TabItem selectedItem = OtherTabControl.SelectedItem as TabItem;
selectedItem?.BringIntoView();
}
//if (TabSelectedIndex > 0)
//{
// TabSelectedIndex--;
// OtherTabControl.SelectedIndex = TabSelectedIndex;
// // 将选定的 TabItem 滚动到可视范围内
// TabItem selectedItem = OtherTabControl.SelectedItem as TabItem;
// selectedItem?.BringIntoView();
//}
}
private void ProStepOtherTapRight(object sender, RoutedEventArgs e)
{
if (TabSelectedIndex < 12)
{
TabSelectedIndex++;
OtherTabControl.SelectedIndex = TabSelectedIndex;
// 将选定的 TabItem 滚动到可视范围内
TabItem selectedItem = OtherTabControl.SelectedItem as TabItem;
selectedItem?.BringIntoView();
}
//if (TabSelectedIndex < 12)
//{
// TabSelectedIndex++;
// OtherTabControl.SelectedIndex = TabSelectedIndex;
// // 将选定的 TabItem 滚动到可视范围内
// TabItem selectedItem = OtherTabControl.SelectedItem as TabItem;
// selectedItem?.BringIntoView();
//}
}
}

View File

@@ -0,0 +1,22 @@
<UserControl
x:Class="CapMachine.Wpf.Views.ProStepConfigMainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="400"
d:DesignWidth="400"
mc:Ignorable="d">
<Grid>
<UniformGrid>
<Button
Margin="5"
Command="{Binding ProStepPsCmd}"
Content="WPF中文网1" />
<Button Margin="5" Content="WPF中文网2" />
<Button Margin="5" Content="WPF中文网3" />
<Button Margin="5" Content="WPF中文网4" />
</UniformGrid>
</Grid>
</UserControl>

View File

@@ -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 CapMachine.Wpf.Views
{
/// <summary>
/// ProStepConfigMainView.xaml 的交互逻辑
/// </summary>
public partial class ProStepConfigMainView : UserControl
{
public ProStepConfigMainView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,18 @@
<UserControl
x:Class="CapMachine.Wpf.Views.ProStepConfigPsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="200"
d:DesignWidth="200"
mc:Ignorable="d">
<Grid>
<TextBlock
Background="Black"
FontSize="36"
Foreground="White"
Text="信息文档" />
</Grid>
</UserControl>

View File

@@ -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 CapMachine.Wpf.Views
{
/// <summary>
/// ProStepConfigPsView.xaml 的交互逻辑
/// </summary>
public partial class ProStepConfigPsView : UserControl
{
public ProStepConfigPsView()
{
InitializeComponent();
}
}
}

View File

@@ -9,7 +9,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
Width="1920"
Height="1000"
Height="980"
mc:Ignorable="d">
<UserControl.Resources>
<Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
@@ -27,7 +27,7 @@
<ColumnDefinition Width="240" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="40" />
<RowDefinition />
</Grid.RowDefinitions>
@@ -42,11 +42,9 @@
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Button Background="Red" />
</Grid>
@@ -61,7 +59,10 @@
Foreground="White" />
</Grid>
<LightChat:LightningChart x:Name="lightningChart1" Grid.Row="1" />
<LightChat:LightningChart
x:Name="lightningChart1"
Grid.Row="1"
Margin="1,0,0,2" />
<Border
Grid.Row="1"

View File

@@ -0,0 +1,14 @@
<UserControl
x:Class="CapMachine.Wpf.Views.UserManageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:CapMachine.Wpf.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="1920"
Height="980"
mc:Ignorable="d">
<Grid>
<TextBlock Text="用户管理" />
</Grid>
</UserControl>

View File

@@ -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 CapMachine.Wpf.Views
{
/// <summary>
/// UserManageView.xaml 的交互逻辑
/// </summary>
public partial class UserManageView : UserControl
{
public UserManageView()
{
InitializeComponent();
}
}
}