@@ -130,8 +130,10 @@ | |||
<None Remove="Image\表格\表格顶左.png" /> | |||
<None Remove="Image\表格标题背景2.png" /> | |||
<None Remove="Image\边框效果2.png" /> | |||
<None Remove="Image\边角.png" /> | |||
<None Remove="Image\退出.png" /> | |||
<None Remove="Image\退出按钮.png" /> | |||
<None Remove="Image\阴影边框.png" /> | |||
<None Remove="Image\顶部.png" /> | |||
<None Remove="Image\顶部切图\Button_No.png" /> | |||
<None Remove="Image\顶部切图\Button_Select.png" /> | |||
@@ -149,10 +151,15 @@ | |||
<None Remove="Image\黑菠萝科技.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Resource Include="Image\边角.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Resource Include="Image\HBL.png" /> | |||
<Resource Include="Image\告警\Wifi_NO.ico" /> | |||
<Resource Include="Image\告警\Wifi_OK.ico" /> | |||
<Resource Include="Image\阴影边框.png" /> | |||
<Resource Include="Image\顶部切图\Button_No.png" /> | |||
<Resource Include="Image\顶部切图\Button_Select.png" /> | |||
<Resource Include="Image\顶部切图\Top_L.png" /> | |||
@@ -1396,6 +1396,22 @@ | |||
</Setter> | |||
</Style> | |||
<Style x:Key="Separator1" TargetType="{x:Type Separator}"> | |||
<Setter Property="Height" Value="1"/> | |||
<Setter Property="Margin" Value="0,4,0,4"/> | |||
<Setter Property="Template"> | |||
<Setter.Value> | |||
<ControlTemplate TargetType="{x:Type Separator}"> | |||
<Border > | |||
<Border.Background> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" /> | |||
</Border.Background> | |||
</Border> | |||
</ControlTemplate> | |||
</Setter.Value> | |||
</Setter> | |||
</Style> | |||
<!-- TopLevelHeader --> | |||
<ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}"> | |||
<Border Name="Border" Cursor="Hand" > | |||
@@ -274,10 +274,30 @@ | |||
</Style.Setters> | |||
</Style> | |||
<Style x:Key="bordertop矩形" TargetType="Border"> | |||
<Style x:Key="border阴影边框" TargetType="Border"> | |||
<Style.Setters> | |||
<Setter Property="Height" Value="50"></Setter> | |||
<Setter Property="VerticalAlignment" Value="Top"></Setter> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/阴影边框.png"/> | |||
</Setter.Value> | |||
</Setter> | |||
</Style.Setters> | |||
</Style> | |||
<Style x:Key="border边角" TargetType="Border"> | |||
<Style.Setters> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/边角.png"/> | |||
</Setter.Value> | |||
</Setter> | |||
</Style.Setters> | |||
</Style> | |||
<Style x:Key="bordertop矩形" TargetType="Border"> | |||
<Style.Setters> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部切图/顶部矩形.png"/> | |||
@@ -285,7 +305,7 @@ | |||
</Setter> | |||
</Style.Setters> | |||
</Style> | |||
<Style x:Key="bordertopTitle" TargetType="Border"> | |||
<Style.Setters> | |||
<Setter Property="Height" Value="100"></Setter> | |||
@@ -297,6 +317,16 @@ | |||
</Style.Setters> | |||
</Style> | |||
<Style x:Key="borderFromTitle" TargetType="Border"> | |||
<Style.Setters> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/tittle.png"/> | |||
</Setter.Value> | |||
</Setter> | |||
</Style.Setters> | |||
</Style> | |||
<Style x:Key="border窗体背景1" TargetType="Border"> | |||
<Style.Setters> | |||
<Setter Property="Background"> | |||
@@ -542,11 +572,11 @@ | |||
<Style.Setters> | |||
<Setter Property="HorizontalAlignment" Value="Right"></Setter> | |||
<Setter Property="VerticalAlignment" Value="Bottom"></Setter> | |||
<Setter Property="Height" Value="20"></Setter> | |||
<Setter Property="Width" Value="20"></Setter> | |||
<Setter Property="Height" Value="23"></Setter> | |||
<Setter Property="Width" Value="22"></Setter> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格/表格底右.png" Stretch="None"/> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/右下.png" Stretch="None"/> | |||
</Setter.Value> | |||
</Setter> | |||
</Style.Setters> | |||
@@ -556,11 +586,11 @@ | |||
<Style.Setters> | |||
<Setter Property="HorizontalAlignment" Value="Left"></Setter> | |||
<Setter Property="VerticalAlignment" Value="Bottom"></Setter> | |||
<Setter Property="Height" Value="20"></Setter> | |||
<Setter Property="Width" Value="20"></Setter> | |||
<Setter Property="Height" Value="22"></Setter> | |||
<Setter Property="Width" Value="23"></Setter> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格/表格底左.png" Stretch="None"/> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/左下.png" Stretch="None"/> | |||
</Setter.Value> | |||
</Setter> | |||
</Style.Setters> | |||
@@ -570,11 +600,11 @@ | |||
<Style.Setters> | |||
<Setter Property="HorizontalAlignment" Value="Left"></Setter> | |||
<Setter Property="VerticalAlignment" Value="Top"></Setter> | |||
<Setter Property="Height" Value="90"></Setter> | |||
<Setter Property="Width" Value="20"></Setter> | |||
<Setter Property="Height" Value="22"></Setter> | |||
<Setter Property="Width" Value="23"></Setter> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格/表格顶左.png" Stretch="None"/> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/左边.png" Stretch="None"/> | |||
</Setter.Value> | |||
</Setter> | |||
</Style.Setters> | |||
@@ -584,11 +614,11 @@ | |||
<Style.Setters> | |||
<Setter Property="HorizontalAlignment" Value="Right"></Setter> | |||
<Setter Property="VerticalAlignment" Value="Top"></Setter> | |||
<Setter Property="Height" Value="20"></Setter> | |||
<Setter Property="Width" Value="20"></Setter> | |||
<Setter Property="Height" Value="23"></Setter> | |||
<Setter Property="Width" Value="22"></Setter> | |||
<Setter Property="Background"> | |||
<Setter.Value> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/表格/表格顶右.png" Stretch="None"/> | |||
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/窗体样式/From/右上.png" Stretch="None"/> | |||
</Setter.Value> | |||
</Setter> | |||
</Style.Setters> | |||
@@ -0,0 +1,20 @@ | |||
using Microsoft.Toolkit.Mvvm.ComponentModel; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPASmartClient.ViewModel | |||
{ | |||
/// <summary> | |||
/// 日志界面 | |||
/// </summary> | |||
public class LogViewModel :ObservableObject | |||
{ | |||
public LogViewModel() | |||
{ | |||
} | |||
} | |||
} |
@@ -0,0 +1,25 @@ | |||
using Microsoft.Toolkit.Mvvm.ComponentModel; | |||
using Microsoft.Toolkit.Mvvm.Input; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Reflection; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
using System.Windows.Input; | |||
namespace BPASmartClient.ViewModel | |||
{ | |||
/// <summary> | |||
/// 主界面 | |||
/// </summary> | |||
public class MainViewModel :ObservableObject | |||
{ | |||
public MainViewModel() | |||
{ | |||
} | |||
} | |||
} |
@@ -0,0 +1,126 @@ | |||
<UserControl x:Class="BPASmartClient.Control.LogView" | |||
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:vm="clr-namespace:BPASmartClient.ViewModel;assembly=BPASmartClient.ViewModel" | |||
xmlns:local="clr-namespace:BPASmartClient.Control" | |||
mc:Ignorable="d" | |||
d:DesignHeight="450" d:DesignWidth="800"> | |||
<UserControl.Resources> | |||
<ResourceDictionary> | |||
<ResourceDictionary.MergedDictionaries> | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml"/> | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml"/> | |||
</ResourceDictionary.MergedDictionaries> | |||
</ResourceDictionary> | |||
</UserControl.Resources> | |||
<UserControl.DataContext> | |||
<vm:LogViewModel></vm:LogViewModel> | |||
</UserControl.DataContext> | |||
<Grid> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="45"/> | |||
<RowDefinition/> | |||
</Grid.RowDefinitions> | |||
<!--顶部装饰--> | |||
<Border Grid.Row="0" Style="{DynamicResource border右下}" Grid.RowSpan="2" /> | |||
<Border Grid.Row="0" Style="{DynamicResource border左下}" Grid.RowSpan="2" /> | |||
<Border Grid.Row="0" Style="{DynamicResource border右上}" Grid.RowSpan="2" /> | |||
<Border Grid.Row="0" Style="{DynamicResource border左上}" Grid.RowSpan="2" /> | |||
<Grid Margin="10"> | |||
<Border Style="{DynamicResource borderFromTitle}" Width="600"></Border> | |||
<Button Grid.Row="0" Content="返回" Style="{DynamicResource CommonBtn_返回}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Button_Click"/> | |||
<TextBlock x:Name="Title" HorizontalAlignment="Center" FontSize="16" Foreground="#feffff">日志监控界面</TextBlock> | |||
</Grid> | |||
<!--底部窗体栏--> | |||
<Grid Grid.Row="1"> | |||
<Grid.RowDefinitions> | |||
<RowDefinition Height="45"/> | |||
<RowDefinition/> | |||
</Grid.RowDefinitions> | |||
<!--查询按钮栏--> | |||
<StackPanel Orientation="Horizontal" Margin="10,0,10,0"> | |||
<ComboBox SelectedIndex="0" Width="80"> | |||
<ComboBoxItem>一般日志</ComboBoxItem> | |||
<ComboBoxItem>错误日志</ComboBoxItem> | |||
<ComboBoxItem>告警信息</ComboBoxItem> | |||
</ComboBox> | |||
<Button Margin="10,0,0,0">查询</Button> | |||
<Button Margin="10,0,0,0">导出</Button> | |||
<CheckBox Margin="10,0,0,0" IsChecked="True">实时模式</CheckBox> | |||
<CheckBox Margin="10,0,0,0" IsChecked="True">定时清除</CheckBox> | |||
</StackPanel> | |||
<!--表格栏--> | |||
<Grid Grid.Row="1"> | |||
<DataGrid x:Name="datagrid" Margin="10" ItemsSource="{Binding EquiPment1, UpdateSourceTrigger=PropertyChanged}" Grid.Row="2"> | |||
<DataGrid.Columns> | |||
<DataGridTemplateColumn Header="紧急程度" Width="2*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<Ellipse Width="12" Height="12" ToolTip="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Fill="{Binding color, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
<DataGridTemplateColumn Header="报警时间或恢复时间" Width="4.4*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<TextBlock HorizontalAlignment="Center" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
<DataGridTemplateColumn Header="类型" Width="4.4*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<TextBlock HorizontalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
<DataGridTemplateColumn Header="状态" Width="4.4*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<TextBlock HorizontalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
<DataGridTemplateColumn Header="变量名" Width="4.4*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<TextBlock HorizontalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
<DataGridTemplateColumn Header="报警值或恢复值" Width="4.4*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<TextBlock HorizontalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
<DataGridTemplateColumn Header="参考值" Width="4.4*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<TextBlock HorizontalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
<DataGridTemplateColumn Header="操作" Width="2*"> | |||
<DataGridTemplateColumn.CellTemplate> | |||
<DataTemplate> | |||
<TextBlock HorizontalAlignment="Center" Text="{Binding Status, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Foreground="#00ccff"/> | |||
</DataTemplate> | |||
</DataGridTemplateColumn.CellTemplate> | |||
</DataGridTemplateColumn> | |||
</DataGrid.Columns> | |||
</DataGrid> | |||
</Grid> | |||
</Grid> | |||
</Grid> | |||
</UserControl> |
@@ -0,0 +1,33 @@ | |||
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 BPASmartClient.Control | |||
{ | |||
/// <summary> | |||
/// LogView.xaml 的交互逻辑 | |||
/// </summary> | |||
public partial class LogView :UserControl | |||
{ | |||
public LogView() | |||
{ | |||
InitializeComponent(); | |||
} | |||
private void Button_Click(object sender,RoutedEventArgs e) | |||
{ | |||
} | |||
} | |||
} |
@@ -4,6 +4,7 @@ | |||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |||
xmlns:local="clr-namespace:BPASmartClient" | |||
xmlns:vm="clr-namespace:BPASmartClient.ViewModel;assembly=BPASmartClient.ViewModel" | |||
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource" | |||
Title="MainWindow" Width="1600" | |||
Height="900" | |||
@@ -19,9 +20,11 @@ | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml"/> | |||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml"/> | |||
</ResourceDictionary.MergedDictionaries> | |||
<Geometry x:Key="Icon_Desgin">M61.141068 400.532698L3.815672 725.688936l61.197513 74.337875 83.560965-473.80941H-0.067734zM79.169555 298.333642h74.315297l-61.208801-74.315297zM359.011862 660.653173l-13.095206 74.337875 53.566168 65.024474 13.095207-74.326586zM455.171319 484.138819v0.011289H287.959077l59.3687 72.068792L107.64034 716.398113 92.908233 800.015522l347.508401-232.259293 1.648189-9.302112h0.011289l13.106496-74.304009h-0.011289zM494.490806 261.181638H187.904926l-13.095207 74.315297 61.208802 74.315298 19.676677-111.478591h157.921418l-26.201702 148.641884h74.315297l32.771884-185.793888h-0.011289z M617.224501 400.543987l-57.359263 325.156238 61.23138 74.326586 83.527098-473.80941H556.00441zM635.23041 298.344931h74.315297L648.325616 224.018345zM982.783966 224.018345h-74.326586l-32.749306 185.805177H717.7415l30.626979 37.163293H869.137893l-62.224809 353.039996 87.410504-74.326586 49.140891-278.71341h74.315298l6.558892-37.163293h-74.326586z</Geometry> | |||
</ResourceDictionary> | |||
</Window.Resources> | |||
<Window.DataContext> | |||
<vm:MainViewModel></vm:MainViewModel> | |||
</Window.DataContext> | |||
<Border Style="{DynamicResource border主窗体背景}" x:Name="br" > | |||
<Grid> | |||
@@ -42,37 +45,39 @@ | |||
<Grid Grid.Column="1"> | |||
<Menu > | |||
<MenuItem Header="状态监视" > | |||
<MenuItem Header="订单监视" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="RealTimeDataControl" /> | |||
<MenuItem Header="日志监视" FontSize="12" Click="MenuItem_Click" Tag="LogView" /> | |||
<Separator/> | |||
<MenuItem Header="设备监视" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="RealTimeDataControl" /> | |||
<MenuItem Header="订单监视" FontSize="12" Click="MenuItem_Click" Tag="RealTimeDataControl" /> | |||
<Separator/> | |||
<MenuItem Header="告警监视" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="RealTimeDataControl" /> | |||
<MenuItem Header="设备监视" FontSize="12" Click="MenuItem_Click" Tag="RealTimeDataControl" /> | |||
<Separator/> | |||
<MenuItem Header="IOT监视" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="RealTimeDataControl" /> | |||
<MenuItem Header="告警监视" FontSize="12" Click="MenuItem_Click" Tag="RealTimeDataControl" /> | |||
<Separator/> | |||
<MenuItem Header="IOT监视" FontSize="12" Click="MenuItem_Click" Tag="RealTimeDataControl" /> | |||
</MenuItem> | |||
<MenuItem Header="综合查询"> | |||
<MenuItem Header="告警查询" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="HistoryFaultControl"/> | |||
<MenuItem Header="告警查询" FontSize="12" Click="MenuItem_Click" Tag="HistoryFaultControl"/> | |||
<Separator/> | |||
<MenuItem Header="日志查询" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="MaintenanceNotificationControl"/> | |||
<MenuItem Header="日志查询" FontSize="12" Click="MenuItem_Click" Tag="MaintenanceNotificationControl"/> | |||
<Separator/> | |||
<MenuItem Header="维护查询" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="WorkorderManagementControl"/> | |||
<MenuItem Header="维护查询" FontSize="12" Click="MenuItem_Click" Tag="WorkorderManagementControl"/> | |||
</MenuItem> | |||
<MenuItem Header="功能列表"> | |||
<MenuItem Header="加盟商管理" FontSize="10" Command="{Binding NavChangedCommand}" CommandParameter="OnOffControl"/> | |||
<MenuItem Header="加盟商管理" FontSize="12" Click="MenuItem_Click" Tag="OnOffControl"/> | |||
<Separator/> | |||
<MenuItem Header="功能列表2" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="SystemParameterControl" /> | |||
<MenuItem Header="功能列表2" FontSize="12" Click="MenuItem_Click" Tag="SystemParameterControl" /> | |||
</MenuItem> | |||
<MenuItem Header="参数配置"> | |||
<MenuItem Header="参数设置" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="OnOffControl"/> | |||
<MenuItem Header="参数设置" FontSize="12" Click="MenuItem_Click" Tag="OnOffControl"/> | |||
<Separator/> | |||
<MenuItem Header="系统设置" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="SystemParameterControl" /> | |||
<MenuItem Header="系统设置" FontSize="12" Click="MenuItem_Click" Tag="SystemParameterControl" /> | |||
<Separator/> | |||
<MenuItem Header="退出程序" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="RealTimevideoControl"/> | |||
<MenuItem Header="退出程序" FontSize="12" Click="MenuItem_Click" Tag="RealTimevideoControl"/> | |||
</MenuItem> | |||
<MenuItem Header="系统帮助"> | |||
<MenuItem Header="版本更新历史" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="OnOffControl"/> | |||
<MenuItem Header="版本更新历史" FontSize="12" Click="MenuItem_Click" Tag="OnOffControl"/> | |||
<Separator/> | |||
<MenuItem Header="帮助文档" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="SystemParameterControl" /> | |||
<MenuItem Header="帮助文档" FontSize="12" Click="MenuItem_Click" Tag="SystemParameterControl" /> | |||
</MenuItem> | |||
</Menu> | |||
</Grid> | |||
@@ -108,9 +113,12 @@ | |||
<!--底部窗体--> | |||
<Grid Grid.Row="1" Margin="10"> | |||
<Button Grid.Row="2" Content="返回" Style="{DynamicResource CommonBtn_返回}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Button_Click"/> | |||
<!--#region 底部窗体栏--> | |||
<ContentControl x:Name="contentRegion"/> | |||
<!--#endregion--> | |||
<!--<Button Grid.Row="2" Content="返回" Style="{DynamicResource CommonBtn_返回}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Button_Click"/> | |||
<Button Grid.Row="2" Visibility="Collapsed" Content="测试" HorizontalAlignment="Left" Margin="153,123,0,0" VerticalAlignment="Top" Click="Button_Click"/> | |||
<Button Grid.Row="2" Visibility="Collapsed" Content="测试" HorizontalAlignment="Left" Margin="153,123,0,0" VerticalAlignment="Top" Click="Button_Click"/>--> | |||
</Grid> | |||
@@ -2,12 +2,14 @@ | |||
using BPASmartClient.Business; | |||
using BPASmartClient.EventBus; | |||
using BPASmartClient.Helper; | |||
using BPASmartClient.Message; | |||
using BPASmartClient.Model; | |||
using BPASmartClient.Model.冰淇淋.Enum; | |||
using BPASmartClient.Model.咖啡机.Enum; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Reflection; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Windows; | |||
@@ -30,8 +32,18 @@ namespace BPASmartClient | |||
public MainWindow() | |||
{ | |||
InitializeComponent(); | |||
this.ButClose.Click += (o, e) => { this.Close(); }; | |||
this.br.MouseLeftButtonDown += (o, e) => | |||
Initialize(); | |||
ThreadManage.GetInstance().Start(new Action(() => | |||
{ | |||
new MainConsole().Start(); | |||
}), "启动主控制台"); | |||
} | |||
public void Initialize() | |||
{ | |||
this.ButClose.Click += (o,e) => { this.Close(); }; | |||
this.br.MouseLeftButtonDown += (o,e) => | |||
{ | |||
if (e.ClickCount > 1) | |||
{ | |||
@@ -42,11 +54,7 @@ namespace BPASmartClient | |||
} | |||
this.DragMove(); | |||
}; | |||
ThreadManage.GetInstance().Start(new Action(() => | |||
{ | |||
new MainConsole().Start(); | |||
}), "启动主控制台"); | |||
MenuItem_Click(new MenuItem() {Tag= "LogView" },null); | |||
} | |||
private void Button_Click(object sender, RoutedEventArgs e) | |||
@@ -59,5 +67,26 @@ namespace BPASmartClient | |||
var temp=BPAPackage.Make(morkOrderPush, 12, BPA.Message.Enum.DeviceClientType.MORKS); | |||
Plugin.GetInstance().GetPlugin<MQTTMgr>().Publish("DOWN/MORKS/ORDER/12", temp.Serialize()); | |||
} | |||
/// <summary> | |||
/// 菜单切换栏 | |||
/// </summary> | |||
private void MenuItem_Click(object sender,RoutedEventArgs e) | |||
{ | |||
try | |||
{ | |||
if (sender is MenuItem) | |||
{ | |||
Type type = Type.GetType($"BPASmartClient.Control.{(sender as MenuItem).Tag?.ToString()}"); | |||
if (type == null) return; | |||
ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes); | |||
contentRegion.Content = (FrameworkElement)cti.Invoke(null); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
MessageLog.GetInstance.ShowEx($"BPASmartClient 中引发错误,MainWindow.xaml.cs 类,描述:[{ex.Message}]"); | |||
} | |||
} | |||
} | |||
} |
@@ -44,5 +44,10 @@ namespace BPASmartClient | |||
MoveCount += 1; | |||
if (MoveCount >= 5) OrderListDialogViewModel.IsAutoClose = true; | |||
} | |||
private void Window_MouseMove(object sender,MouseEventArgs e) | |||
{ | |||
} | |||
} | |||
} |