change - 监控界面开发

master
wenjy 3 months ago
parent 9b3c1cd057
commit 583d40b8f5

@ -22,10 +22,10 @@
<Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="0" Background="#0050BF">
<TextBlock Text="轨道巡检控制系统" FontSize="30" Foreground="White" FontWeight="Bold" Margin="50,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,25,2,2">
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="0,20">
<ContentControl Content="{Binding UserContent}"/>
</Border>
<Border Grid.Row="2" BorderBrush="#1254AB" BorderThickness="0" CornerRadius="5" Background="#FFFFFF" Margin="6,2,6,7">
<Border Grid.Row="2" BorderBrush="#1254AB" BorderThickness="0" CornerRadius="0" Background="#FFFFFF">
<Grid>
<Grid.ColumnDefinitions>

@ -0,0 +1,521 @@
<UserControl x:Class="SlnMesnac.WPF.Page.IndexControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="5*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<!--左上监控画面布局-->
<Border Grid.Row="0" Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#FFFFFF" CornerRadius="5" Margin="0,0,10,0"></Border>
<Border Grid.Column="1" Background="#FFFFFF" CornerRadius="5" Margin="10,0,0,0"></Border>
</Grid>
</Border>
<!--右上机器人控制界面-->
<Border Grid.Row="0" Grid.Column="1" Background="#FFFFFF" CornerRadius="5" Margin="20,0,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="4*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#F4F5FA" BorderThickness="0,0,0,2">
<Border BorderBrush="#0050BF" BorderThickness="3,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0">
<TextBlock Text="机器人控制" Foreground="Black" FontSize="18" Margin="10,0,0,0"/>
</Border>
</Border>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid>
<!-- 外部的圆环 -->
<Ellipse Width="160" Height="160" Stroke="#F4F5FA" StrokeThickness="60" Fill="Transparent" />
<!-- 内部的圆环,用于创建空心效果 -->
<Ellipse Width="80" Height="80" Stroke="White" StrokeThickness="60" Fill="Transparent" />
<!--向上-->
<Border Width="120" Height="40" Background="Transparent" CornerRadius="70,70,0,0" Margin="0,0,0,120" >
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="15,5">
<LineSegment Point="5,15"/>
<LineSegment Point="25,15"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--向下-->
<Border Width="120" Height="40" Background="Transparent" CornerRadius="0,0,70,70" Margin="0,120,0,0">
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="15,25">
<LineSegment Point="5,15"/>
<LineSegment Point="25,15"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--向左-->
<Border Width="40" Height="80" Background="Transparent" CornerRadius="35,0,0,35" Margin="0,0,120,0">
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="5,15">
<LineSegment Point="15,5"/>
<LineSegment Point="15,25"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--向右-->
<Border Width="40" Height="80" Background="Transparent" CornerRadius="0,35,35,0" Margin="120,0,0,0">
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="25,15">
<LineSegment Point="15,5"/>
<LineSegment Point="15,25"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--停止-->
<Border Width="80" Height="80" Background="Transparent" CornerRadius="60">
<TextBlock Text="停止" FontSize="20" Foreground="Red" FontWeight="Black" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
<Button Content="回 零" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" FontWeight="Black" FontSize="16" Width="100" Height="30" Foreground="#0050BF" Background="#E5EDF8" BorderBrush="#0050BF" Margin="50,0,0,0"/>
</StackPanel>
</Grid>
</Border>
<!--左下轨道、参数监控界面-->
<Border Grid.Row="1" Grid.Column="0" Margin="0,20,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="#FFFFFF" CornerRadius="5" Margin="0,0,0,10">
<Canvas x:Name="canvasTrack" >
<!-- 轨道 -->
<Rectangle Width="880" Height="100" Fill="Transparent" Stroke="Black" StrokeThickness="2" RadiusX="50" RadiusY="50"
Canvas.Left="70" Canvas.Top="50"/>
<!-- 站点 -->
<Rectangle x:Name="station1" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="105" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="1"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station2" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="175" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="2"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station3" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="245" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="3"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station4" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="315" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="4"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station5" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="385" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="5"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station6" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="455" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="6"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station7" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="525" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="7"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station8" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="595" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="8"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station9" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="665" Canvas.Top="25" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="9"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station10" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="105" Canvas.Top="155" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="10"/>
</Rectangle.ToolTip>
</Rectangle>
<Rectangle x:Name="station11" Width="50" Height="20" Fill="Gray" RadiusX="5" RadiusY="5"
Canvas.Left="175" Canvas.Top="155" Stroke="Transparent" StrokeThickness="1">
<Rectangle.ToolTip>
<TextBlock Text="11"/>
</Rectangle.ToolTip>
</Rectangle>
</Canvas>
</Border>
<Border Grid.Row="1" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#FFFFFF" CornerRadius="5" Margin="0,0,10,0">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="#F4F5FA" CornerRadius="5">
<Image Source="/Templates/image/machine.png" Margin="10"/>
</Border>
<Border Grid.Row="1">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0">
<Image Source="/Templates/image/device.png" Margin="10"/>
</Border>
<Border Grid.Row="0" Grid.Column="1">
<TextBlock Text="设备状态" Foreground="Gray" FontSize="16" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="2">
<TextBlock Text="停止" FontSize="16" Foreground="Red" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<Image Source="/Templates/image/speed.png" Margin="10"/>
</Border>
<Border Grid.Row="1" Grid.Column="1">
<TextBlock Text="运行速度" Foreground="Gray" FontSize="16" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal">
<TextBlock Text="0" FontSize="16" Foreground="Gray" FontWeight="Black" VerticalAlignment="Center"/>
<TextBlock Text="m/s" FontSize="16" Foreground="Gray" FontWeight="Black" Margin="20,0,0,0" VerticalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Column="1" Background="#FFFFFF" CornerRadius="5" Margin="10,0,0,0">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0" Background="#F4F5FA" CornerRadius="5" Margin="0,0,10,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#F7E4D3" CornerRadius="5" Margin="10" >
<Image Source="/Templates/image/addr.png" Margin="10"/>
</Border>
<Border Grid.Column="1" Margin="0,10,0,10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" >
<TextBlock Text="实时位置" Foreground="Gray" FontSize="16" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" >
<TextBlock Text="A05-1" Foreground="Black" FontSize="24" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Row="0" Grid.Column="1" Background="#F4F5FA" CornerRadius="5" Margin="10,0,10,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#D2E5CD" CornerRadius="5" Margin="10" >
<Image Source="/Templates/image/avg_t.png" Margin="10"/>
</Border>
<Border Grid.Column="1" Margin="0,10,0,10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" >
<TextBlock Text="平均温度 ℃" Foreground="Gray" FontSize="16" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" >
<TextBlock Text="28" Foreground="Black" FontSize="24" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Row="0" Grid.Column="2" Background="#F4F5FA" CornerRadius="5" Margin="10,0,0,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#F3D2D6" CornerRadius="5" Margin="10" >
<Image Source="/Templates/image/max_t.png" Margin="10"/>
</Border>
<Border Grid.Column="1" Margin="0,10,0,10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" >
<TextBlock Text="最高温度 ℃" Foreground="Gray" FontSize="16" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" >
<TextBlock Text="39" Foreground="#ED4F31" FontSize="24" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Row="1" Grid.Column="0" Background="#F4F5FA" CornerRadius="5" Margin="0,10,10,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#CEDCF9" CornerRadius="5" Margin="10" >
<Image Source="/Templates/image/min_t.png" Margin="10"/>
</Border>
<Border Grid.Column="1" Margin="0,10,0,10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" >
<TextBlock Text="最低温度 ℃" Foreground="Gray" FontSize="16" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" >
<TextBlock Text="28" Foreground="Black" FontSize="24" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<Border Grid.Row="1" Grid.Column="1" Background="#F4F5FA" CornerRadius="5" Margin="10,10,10,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#F7E4D3" CornerRadius="5" Margin="10" >
<Image Source="/Templates/image/status.png" Margin="10"/>
</Border>
<Border Grid.Column="1" Margin="0,10,0,10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="0" >
<TextBlock Text="升降机状态" Foreground="Gray" FontSize="16" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
<Border Grid.Row="1" >
<TextBlock Text="正常" Foreground="Black" FontSize="24" FontWeight="Black" VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</Border>
<!--右下云台控制界面-->
<Border Grid.Row="1" Grid.Column="1" Margin="20,20,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="#FFFFFF" CornerRadius="5" Margin="0,0,10,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#F4F5FA" BorderThickness="0,0,0,2">
<Border BorderBrush="#0050BF" BorderThickness="3,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0">
<TextBlock Text="云台控制" Foreground="Black" FontSize="18" Margin="10,0,0,0"/>
</Border>
</Border>
<StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid>
<!-- 外部的圆环 -->
<Ellipse Width="160" Height="160" Stroke="#F4F5FA" StrokeThickness="60" Fill="Transparent" />
<!-- 内部的圆环,用于创建空心效果 -->
<Ellipse Width="80" Height="80" Stroke="White" StrokeThickness="60" Fill="Transparent" />
<!--向上-->
<Border Width="120" Height="40" Background="Transparent" CornerRadius="70,70,0,0" Margin="0,0,0,120" >
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="15,5">
<LineSegment Point="5,15"/>
<LineSegment Point="25,15"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--向下-->
<Border Width="120" Height="40" Background="Transparent" CornerRadius="0,0,70,70" Margin="0,120,0,0">
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="15,25">
<LineSegment Point="5,15"/>
<LineSegment Point="25,15"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--向左-->
<Border Width="40" Height="80" Background="Transparent" CornerRadius="35,0,0,35" Margin="0,0,120,0">
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="5,15">
<LineSegment Point="15,5"/>
<LineSegment Point="15,25"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--向右-->
<Border Width="40" Height="80" Background="Transparent" CornerRadius="0,35,35,0" Margin="120,0,0,0">
<Path Stroke="#0050BF" StrokeThickness="1" Fill="#0050BF" VerticalAlignment="Center" HorizontalAlignment="Center">
<Path.Data>
<PathGeometry>
<PathFigure IsClosed="True" StartPoint="25,15">
<LineSegment Point="15,5"/>
<LineSegment Point="15,25"/>
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Border>
<!--停止-->
<Border Width="80" Height="80" Background="Transparent" CornerRadius="60">
<TextBlock Text="停止" FontSize="20" Foreground="Red" FontWeight="Black" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</Grid>
<Button Content="回 零" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" FontWeight="Black" FontSize="16" Width="100" Height="30" Foreground="#0050BF" Background="#E5EDF8" BorderBrush="#0050BF" Margin="0,50,0,0"/>
</StackPanel>
</Grid>
</Border>
<Border Grid.Column="1" Background="#FFFFFF" CornerRadius="5" Margin="10,0,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#F4F5FA" BorderThickness="0,0,0,2">
<Border BorderBrush="#0050BF" BorderThickness="3,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0">
<TextBlock Text="工作模式" Foreground="Black" FontSize="18" Margin="10,0,0,0"/>
</Border>
</Border>
<Border Grid.Row="1" BorderBrush="Green" BorderThickness="0">
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="4*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="Red" BorderThickness="2" Margin="0,10"/>
<Border Grid.Row="1" BorderBrush="Red" BorderThickness="2" Margin="0,10"/>
<Border Grid.Row="2" BorderBrush="Red" BorderThickness="2"/>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</Border>
</Grid>
</UserControl>

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

@ -9,7 +9,15 @@
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="Templates\image\addr.png" />
<None Remove="Templates\image\avg_t.png" />
<None Remove="Templates\image\background.jpg" />
<None Remove="Templates\image\device.png" />
<None Remove="Templates\image\machine.png" />
<None Remove="Templates\image\max_t.png" />
<None Remove="Templates\image\min_t.png" />
<None Remove="Templates\image\speed.png" />
<None Remove="Templates\image\status.png" />
</ItemGroup>
<ItemGroup>
@ -43,7 +51,15 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Templates\image\addr.png" />
<Resource Include="Templates\image\avg_t.png" />
<Resource Include="Templates\image\background.jpg" />
<Resource Include="Templates\image\device.png" />
<Resource Include="Templates\image\machine.png" />
<Resource Include="Templates\image\max_t.png" />
<Resource Include="Templates\image\min_t.png" />
<Resource Include="Templates\image\speed.png" />
<Resource Include="Templates\image\status.png" />
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -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 参数定义
/// <summary>
/// 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)
{

Loading…
Cancel
Save