完成界面问题修改

master
mzhifa 1 year ago
parent 1021e50f89
commit e5f395f716

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 779 B

Before

Width:  |  Height:  |  Size: 348 KiB

After

Width:  |  Height:  |  Size: 348 KiB

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StartServerWPF.Assets
{
public class LogHelper
{
public static void WriteSerLog(string fn, string logstr)
{
// try
{
fn = fn + "SerLog_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
if (!File.Exists(fn))
{
Directory.CreateDirectory(Path.GetDirectoryName(fn));
}
using (StreamWriter sw = new StreamWriter(fn, true, Encoding.Default))
{
sw.WriteLine(logstr);
sw.Close();
}
}
//catch (Exception ex)
//{
//}
}
}
}

@ -0,0 +1,55 @@
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("StartServerWPF.Assets")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StartServerWPF.Assets")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
//若要开始生成可本地化的应用程序,请设置
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
//例如,如果您在源文件中使用的是美国英语,
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
//对以下 NeutralResourceLanguage 特性的注释。 更新
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly:ThemeInfo(
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
//(未在页面中找到资源时使用,
//或应用程序资源字典中找到时使用)
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
//(未在页面中找到资源时使用,
//、应用程序或任何主题专用资源字典中找到时使用)
)]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本: 4.0.30319.42000
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace StartServerWPF.Assets.Properties {
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if ((resourceMan == null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("StartServerWPF.Assets.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace StartServerWPF.Assets.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}</ProjectGuid>
<OutputType>library</OutputType>
<RootNamespace>StartServerWPF.Assets</RootNamespace>
<AssemblyName>StartServerWPF.Assets</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Compile Include="LogHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Resource Include="Fonts\iconfont.ttf" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Page Include="Styles\BaseResources.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\background.jpg" />
<Resource Include="Images\calendar.png" />
<Resource Include="Images\Union.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -1,4 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<FontFamily x:Key="Iconfont">pack://application:,,,/StartServerWPF.Modules.Main;component/Fonts/#iconfont</FontFamily>
<FontFamily x:Key="Iconfont">pack://application:,,,/StartServerWPF.Assets;component/Fonts/#iconfont</FontFamily>
</ResourceDictionary>

@ -15,7 +15,6 @@ namespace StartServerWPF.Modules.Main
// public static string zyProPath = @"\serverprogram";
public static string systemConfigPath = "SystemConfig.json";
public static string systemLogFileName;
public static string serverVision = "20230517";
public static SystemConfig ReadSystemJsonFile(string jsonFile)

@ -9,10 +9,19 @@ namespace StartServerWPF.Modules.Main.Models
{
public class LogMessageModel
{
public int LogType { get; set; }
public string LogType { get; set; }
public string AppName { get; set; }
public string State { get; set; }
public DateTime OriginTime { get; set; }
public string Message { get; set; }
public string Oprate { get; set; }
public override string ToString()
{
string str = $"{OriginTime.ToString("s")} {LogType} {AppName} {State} ";
return str;
}
}
}

@ -28,6 +28,7 @@ namespace StartServerWPF.Modules.Main.Models
public string message { get; set; }
public int uid { get; set; }
public int code { get; set; }
public string account { get; set; }
}
public class CSUserSubscribeMessage

@ -5,10 +5,18 @@
<UseWindowsForms>True</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
<None Remove="Fonts\iconfont.ttf" />
<None Remove="Images\background.jpg" />
<None Remove="Images\calendar.png" />
<None Remove="Images\Union.png" />
<Compile Remove="Fonts\**" />
<Compile Remove="Images\**" />
<Compile Remove="Styles\**" />
<EmbeddedResource Remove="Fonts\**" />
<EmbeddedResource Remove="Images\**" />
<EmbeddedResource Remove="Styles\**" />
<None Remove="Fonts\**" />
<None Remove="Images\**" />
<None Remove="Styles\**" />
<Page Remove="Fonts\**" />
<Page Remove="Images\**" />
<Page Remove="Styles\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="HandyControl" Version="3.4.0" />
@ -18,17 +26,14 @@
<PackageReference Include="Prism.Wpf" Version="8.1.97" />
<PackageReference Include="WebSocket4Net" Version="0.15.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StartServerWPF.Assets\StartServerWPF.Assets.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="DotRas">
<HintPath>..\StartServerWPF\DotRas.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Resource Include="Fonts\iconfont.ttf" />
<Resource Include="Images\background.jpg" />
<Resource Include="Images\calendar.png" />
<Resource Include="Images\Union.png" />
</ItemGroup>
<ItemGroup>
<Page Update="Views\WaveformPlayBackView.xaml">
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>

@ -21,23 +21,27 @@ namespace StartServerWPF.Modules.Main.ViewModels
{
IEventAggregator _ea;
private readonly IDialogService _dialogService;
private readonly MainViewModel _mainViewModel;
public LogManagementViewModel(
IEventAggregator ea, IDialogService dialogService)
IEventAggregator ea, IDialogService dialogService, MainViewModel mainViewModel)
{
this._dialogService = dialogService;
InitInfo();
this._mainViewModel = mainViewModel;
}
private string _title = "日志查看";
public string Title => _title;
public ICommand LoadedCommand => new DelegateCommand(()=>
{
InitInfo();
});
public ICommand UploadCommand { get; set; }
public DelegateCommand QueryDataCommand => new(QueryData);
public DelegateCommand ResetQueryDataCommand => new(InitInfo);
public DelegateCommand HFWarningCommand => new(HFWarning);
private void InitInfo()
{
StartTime = DateTime.Today;
@ -53,67 +57,53 @@ namespace StartServerWPF.Modules.Main.ViewModels
public void QueryData()
{
SelectIndexLogType = "全部";
DataList = new List<LogMessageModel>();
string fileName = "";
// File.Exists("");
string fileName = _mainViewModel.sc.vpnInfo.SystemLogPath+ "SerLog_" + EndTime.ToString("yyyyMMdd") + ".txt";
if (!File.Exists(fileName))
return;
Task.Run(() =>
{
// var lines= File.ReadAllLines(fileName);
for (int i = 0; i < 10; i++)
_queryDataList = new List<LogMessageModel>();
var lines= File.ReadAllLines(fileName);
foreach (var item in lines)
{
DataList.Add(new LogMessageModel()
var str= item.Trim().Split(" ");
_queryDataList.Add(new LogMessageModel()
{
AppName = "app"+i,
LogType = 1,
Message = "start",
OriginTime = DateTime.Now.AddMinutes(i),
State = "启动中"
OriginTime = Convert.ToDateTime(str[0]),
LogType = str[1],
AppName = str[2],
State = str[3]
});
}
_totalDataList = _queryDataList;
int index = _queryDataList.Count;
MaxCountPage = (index % countPerPage == 0 ? index / countPerPage : index / countPerPage + 1);
DataList = _totalDataList.Take(countPerPage).ToList();
});
}
private void HFWarning()
{
DialogParameters param = new DialogParameters();
param.Add("type", 0);
ShowEditDialog(param);
}
private void ShowEditDialog(DialogParameters param)
{
_dialogService.ShowDialog(
"HFLogDialog",
param,
new Action<IDialogResult>(result =>
{
if (result != null && result.Result == ButtonResult.OK)
{
System.Windows.MessageBox.Show("数据已保存", "提示");
Refresh();
}
}));
}
public void WriteTxt(FileStream fs)
private string _SelectIndexLogType;
public string SelectIndexLogType
{
try
get => _SelectIndexLogType;
set
{
// foreach (var item in _totalDataList)
if (_queryDataList != null)
{
// string mesg = item.CreateTime + "\t" + item.UserName + "\t" + item.UserId + "\t" + item.Message;
//获得字节数组
// mesg = mesg + "\n";
// byte[] data = System.Text.Encoding.Default.GetBytes(mesg);
//开始写入
// fs.Write(data, 0, data.Length);
_totalDataList = _queryDataList.Where(l => l.LogType == value).ToList();
int index = _totalDataList.Count;
MaxCountPage = (index % countPerPage == 0 ? index / countPerPage : index / countPerPage + 1);
DataList = _totalDataList.Take(countPerPage).ToList();
}
//清空缓冲区、关闭流
fs.Flush();
fs.Close();
}
catch
{
Console.WriteLine("WriteError");
SetProperty(ref _SelectIndexLogType, value);
}
}
private DateTime _StartTime;
@ -140,7 +130,9 @@ namespace StartServerWPF.Modules.Main.ViewModels
///// <summary>
///// 所有数据
///// </summary>
//private List<SystemLogDTO> _totalDataList;
private List<LogMessageModel> _totalDataList;
private List<LogMessageModel> _queryDataList;
/// <summary>
/// 页码
/// </summary>
@ -181,7 +173,7 @@ namespace StartServerWPF.Modules.Main.ViewModels
/// </summary>
private void PageUpdated(FunctionEventArgs<int> info)
{
// DataList = _totalDataList.Skip((info.Info - 1) * countPerPage).Take(countPerPage).ToList();
DataList = _totalDataList.Skip((info.Info - 1) * countPerPage).Take(countPerPage).ToList();
}
}

@ -1,7 +1,9 @@
using Org.BouncyCastle.Crypto.Modes;
using K4os.Compression.LZ4.Engine;
using Org.BouncyCastle.Crypto.Modes;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Services.Dialogs;
using StartServerWPF.Assets;
using StartServerWPF.Modules.Main.models;
using StartServerWPF.Modules.Main.Models;
using System;
@ -97,6 +99,14 @@ namespace StartServerWPF.Modules.Main.ViewModels
{
_websocket.SendMes(JsonSerializer.Serialize(new CSUserSubscribeMessage { type = CSMessage.subscribe }));
_loginViewDialogViewModel.CloseDialog(new DialogResult(ButtonResult.OK));
var log = new LogMessageModel
{
LogType = "系统",
AppName = "系统",
State = user.account+ "登录",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath, log.ToString());
}
});
break;
@ -298,8 +308,14 @@ namespace StartServerWPF.Modules.Main.ViewModels
vpn.CreateOrUpdateVPN(sc.vpnInfo.VpnName, sc.vpnInfo.VpnIP);
vpn.ConnectVPN(sc.vpnInfo.VpnName, sc.vpnInfo.VpnUserName, sc.vpnInfo.VpnPsw);
Thread.Sleep(1000);
string logStr = DateTime.Now.ToString("s") + "\tVPN手动连接";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
var log = new LogMessageModel
{
LogType="网络",
AppName="VPN",
State="连接",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath , log.ToString());
SetControlstatus();
}
@ -311,8 +327,14 @@ namespace StartServerWPF.Modules.Main.ViewModels
Thread.Sleep(500);
SetControlstatus();
Thread.Sleep(100);
string logStr = DateTime.Now.ToString("s") + "\tVPN手动断开";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
var log = new LogMessageModel
{
LogType = "网络",
AppName = "VPN",
State = "断开",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath , log.ToString());
}
}
@ -384,8 +406,14 @@ namespace StartServerWPF.Modules.Main.ViewModels
}
}
RunTime = DateDiff(DateTime.Now, StartTime);
string logStr = StartTime.ToString("s") + "\t服务器程序启动";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
var log = new LogMessageModel
{
LogType = "系统",
AppName = "系统",
State = "启动服务程序",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath , log.ToString());
IsIndeterminate =true;
timer1.Interval = TimeSpan.FromSeconds(ProMonInterval);
timer1.Start();
@ -407,8 +435,14 @@ namespace StartServerWPF.Modules.Main.ViewModels
}
timer1.Stop();
IsIndeterminate = false;
string logStr = DateTime.Now.ToString("s") + "\t服务器程序关闭";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
var log = new LogMessageModel
{
LogType = "系统",
AppName = "系统",
State = "启动服务关闭",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath , log.ToString());
StartTime = new DateTime();
}
@ -477,10 +511,14 @@ namespace StartServerWPF.Modules.Main.ViewModels
IntervalTimesSource.Add(30);
IntervalTimesSource.Add(60);
SelectedIndex = 1;
JsonParser.systemLogFileName = "SerLog_" + DateTime.Now.ToString("yyyyMMdd") + ".txt";
string logStr = DateTime.Now.ToString("s") + "\t程序启动";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
//CheckIp();
var log = new LogMessageModel
{
LogType = "系统",
AppName = "系统",
State = "程序启动",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath , log.ToString());
}
#region 方法
private bool CMDStartProcess(ProcessInfo proInfo)
@ -687,13 +725,19 @@ namespace StartServerWPF.Modules.Main.ViewModels
Thread.Sleep(2);
StartProcess(pro);
Thread.Sleep(20);
string logStr = DateTime.Now.ToString("s") + "\t服务器程序" + pro.ProName + "重启";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
var log = new LogMessageModel
{
LogType = "应用",
AppName = pro.ProName,
State = "重启",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath , log.ToString());
string jsonStr= JsonSerializer.Serialize(new CSDeviceWebhook
{
type= CSMessage.webhook,
message=logStr,
message = log.ToString(),
}, new JsonSerializerOptions
{
// 整齐打印
@ -705,81 +749,25 @@ namespace StartServerWPF.Modules.Main.ViewModels
}
}
}
#region 注释
//int sfp = FindProcess(sc.proServer);
//if (sfp == 0)
//{
// ReciveDataSource.Add("服务器程序运行正常");
//}
//else
//{
// ReciveDataSource.Add("服务器程序未运行");
// Thread.Sleep(2);
// StartProcess(sc.proServer);
// Thread.Sleep(20);
// ReciveDataSource.Add("服务器程序重启成功");
// string logStr = DateTime.Now.ToString("s") + "\t服务器程序" + sc.proServer.ProName + "重启";
// WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
//}
//sfp = FindProcess(sc.proRecv);
//if (sfp == 0)
//{
// ReciveDataSource.Add("接收数据程序运行正常");
//}
//else
//{
// ReciveDataSource.Add("接收数据程序未运行");
// Thread.Sleep(2);
// StartProcess(sc.proRecv);
// Thread.Sleep(20);
// ReciveDataSource.Add("接收数据程序重启成功");
// string logStr = DateTime.Now.ToString("s") + "\t接收数据程序" + sc.proRecv.ProName + "重启";
// WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
//}
//sfp = FindProcess(sc.proApms);
//if (sfp == 0)
//{
// ReciveDataSource.Add("自动识别程序运行正常");
//}
//else
//{
// ReciveDataSource.Add("自动识别程序未运行");
// Thread.Sleep(2);
// StartProcess(sc.proApms);
// Thread.Sleep(20);
// ReciveDataSource.Add("自动识别程序重启成功");
// string logStr = DateTime.Now.ToString("s") + "\t自动识别程序" + sc.proApms.ProName + "重启";
// WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
//}
//sfp = FindProcess(sc.proMonitor);
//if (sfp == 0)
//{
// ReciveDataSource.Add("网页服务程序运行正常");
//}
//else
//{
// ReciveDataSource.Add("网页服务程序未运行");
// Thread.Sleep(2);
// StartProcess(sc.proMonitor);
// Thread.Sleep(20);
// ReciveDataSource.Add("网页服务程序重启成功");
// string logStr = DateTime.Now.ToString("s") + "\t网页服务程序" + sc.proMonitor.ProName + "重启";
// WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
//}
#endregion
RunTime = DateDiff(DateTime.Now, StartTime);
vpnStatus = vpn.CheckVpnStatus(sc.vpnInfo.VpnName);
if (!vpnStatus)
{
vpn.ConnectVPN(sc.vpnInfo.VpnName, sc.vpnInfo.VpnUserName, sc.vpnInfo.VpnPsw);
Thread.Sleep(1000);
string logStr = DateTime.Now.ToString("s") + "\tVPN断开重连";
WriteSerLog(sc.vpnInfo.SystemLogPath + JsonParser.systemLogFileName, logStr);
var log = new LogMessageModel
{
LogType = "应用",
AppName = "VPN",
State = "重连",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(sc.vpnInfo.SystemLogPath , log.ToString());
string jsonStr = JsonSerializer.Serialize(new CSDeviceWebhook
{
type = CSMessage.webhook,
message = logStr,
message = log.ToString(),
}, new JsonSerializerOptions
{
@ -807,7 +795,6 @@ namespace StartServerWPF.Modules.Main.ViewModels
}
}
}
//return AddressIP;
}
public void SetControlstatus()
@ -829,16 +816,6 @@ namespace StartServerWPF.Modules.Main.ViewModels
}
}
public void WriteSerLog(string fn, string logstr)
{
if(!File.Exists(fn))
{
Directory.CreateDirectory(Path.GetDirectoryName(fn));
}
StreamWriter sw = new StreamWriter(fn, true, Encoding.Default);
sw.WriteLine(logstr);
sw.Close();
}
#endregion
}

@ -3,6 +3,7 @@
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:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
xmlns:hc="https://handyorg.github.io/handycontrol"
@ -22,6 +23,14 @@
<RowDefinition Height="60"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<i:InvokeCommandAction Command="{Binding Path=LoadedCommand}"/>
</i:EventTrigger>
<i:EventTrigger EventName="Unloaded">
<i:InvokeCommandAction Command="{Binding Path=UnloadedCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<Border Background="White">
<TextBlock Text="{Binding Title}" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" Margin="10,0,10,0"/>
</Border>
@ -35,15 +44,15 @@
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0" HorizontalAlignment="Left">
<TextBlock Text="日志分类:" VerticalAlignment="Center"/>
<ComboBox SelectedIndex="{Binding SelectIndexLogType}" VerticalAlignment="Center" Margin="0,0,50,0">
<ComboBox Text="{Binding SelectIndexLogType}" VerticalAlignment="Center" Margin="0,0,50,0">
<ComboBoxItem Content="全部"/>
<ComboBoxItem Content="系统"/>
<ComboBoxItem Content="网络"/>
<ComboBoxItem Content="应用"/>
</ComboBox>
<TextBlock Text="启始时间:" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<hc:DatePicker Margin="0,0,10,0" SelectedDate="{Binding StartTime}" Height="30"></hc:DatePicker>
<TextBlock Text="结束时间:" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<!--<TextBlock Text="启始时间:" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<hc:DatePicker Margin="0,0,10,0" SelectedDate="{Binding StartTime}" Height="30"></hc:DatePicker>-->
<TextBlock Text="时间:" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<hc:DatePicker SelectedDate="{Binding EndTime}" Height="30"></hc:DatePicker>
<Button Content="查看" Background="#FF009DFF" Foreground="White"
Width="70" Margin="5,0"
@ -62,7 +71,7 @@
<TextBlock Text="应用" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="1" Foreground="White" />
<TextBlock Text="状态" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" Foreground="White"/>
<TextBlock Text="时间" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="3" Foreground="White"/>
<TextBlock Text="操作" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="4" Foreground="White"/>
<!--<TextBlock Text="操作" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="4" Foreground="White"/>-->
</Grid>
<ItemsControl Grid.Row="2" ItemsSource="{Binding DataList}">
<ItemsControl.ItemTemplate>
@ -79,8 +88,8 @@
<TextBlock Grid.Column="0" Text="{Binding LogType}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="1" Text="{Binding AppName}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="2" Text="{Binding State}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="3" Text="{Binding OriginTime}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="4" Text="{Binding Message}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Grid.Column="3" Text="{Binding OriginTime,StringFormat=yyyy-MM-dd HH:mm:ss}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<!--<TextBlock Grid.Column="4" Text="{Binding Message}" VerticalAlignment="Center" HorizontalAlignment="Center"/>-->
</Grid>
</Border>
<DataTemplate.Triggers>

@ -19,7 +19,7 @@
</Style>
</prism:Dialog.WindowStyle>
<Grid >
<Image Source="../Images/background.jpg" Stretch="UniformToFill"/>
<Image Source="pack://application:,,,/StartServerWPF.Assets;component/Images/background.jpg" Stretch="UniformToFill"/>
<StackPanel Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="预警系统管理后台" Foreground="White" FontSize="20" Margin="0,0,0,60" HorizontalAlignment="Center"/>
<Border Background="White" CornerRadius="10" >

@ -12,7 +12,7 @@
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/StartServerWPF.Modules.Main;component/Styles/BaseResources.xaml"/>
<ResourceDictionary Source="pack://application:,,,/StartServerWPF.Assets;component/Styles/BaseResources.xaml"/>
<!--<ResourceDictionary Source="/Detection.platform.Assets;component/Styles/ButtonStyles.xaml"/>-->
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

@ -10,9 +10,9 @@
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/StartServerWPF.Modules.Main;component/Styles/BaseResources.xaml"/>
<!--<ResourceDictionary Source="/StartServerWPF.Modules.Main;component/Styles/ButtonStyles.xaml"/>
<ResourceDictionary Source="/StartServerWPF.Modules.Main;component/Styles/TextBoxStyle.xaml"/>-->
<ResourceDictionary Source="/StartServerWPF.Assets;component/Styles/BaseResources.xaml"/>
<!--<ResourceDictionary Source="/StartServerWPF.Assets;component/Styles/ButtonStyles.xaml"/>
<ResourceDictionary Source="/StartServerWPF.Assets;component/Styles/TextBoxStyle.xaml"/>-->
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

@ -10,7 +10,7 @@
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/StartServerWPF.Modules.Main;component/Styles/BaseResources.xaml"/>
<ResourceDictionary Source="pack://application:,,,/StartServerWPF.Assets;component/Styles/BaseResources.xaml"/>
<!--<ResourceDictionary Source="/Detection.platform.Assets;component/Styles/ButtonStyles.xaml"/>-->
<ResourceDictionary>
<ControlTemplate TargetType="ToggleButton" x:Key="ArrowButtonTemplate">

@ -10,9 +10,9 @@
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/StartServerWPF.Modules.Main;component/Styles/BaseResources.xaml"/>
<!--<ResourceDictionary Source="/StartServerWPF.Modules.Main;component/Styles/ButtonStyles.xaml"/>
<ResourceDictionary Source="/StartServerWPF.Modules.Main;component/Styles/TextBoxStyle.xaml"/>-->
<ResourceDictionary Source="/StartServerWPF.Assets;component/Styles/BaseResources.xaml"/>
<!--<ResourceDictionary Source="/StartServerWPF.Assets;component/Styles/ButtonStyles.xaml"/>
<ResourceDictionary Source="/StartServerWPF.Assets;component/Styles/TextBoxStyle.xaml"/>-->
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>

@ -148,5 +148,11 @@
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StartServerWPF.Assets\StartServerWPF.Assets.csproj">
<Project>{ea0d3c2d-5beb-420c-9222-2e6e5f40bf5c}</Project>
<Name>StartServerWPF.Assets</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -207,15 +207,15 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
{
if(!value)
{
YasixZENVisible("SHN", true);
YasixZENVisible("SHN", true);
YasixZENVisible("SHE", true);
YasixZENVisible("SHZ", false);
YasixZENVisible("SHN", false);
YasixZENVisible("SHE", false);
}
else
{
YasixZENVisible("SHN", false);
YasixZENVisible("SHE", false);
YasixZENVisible("SHZ", false);
YasixZENVisible("SHZ", true);
YasixZENVisible("SHN", true);
YasixZENVisible("SHE", true);
YasixZENVisible(SelectChannel, false);
}
@ -231,8 +231,10 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
{
if (SingleChannel)
{
YasixZENVisible(_SelectChannel, false);
YasixZENVisible(value, true);
//隐藏上当前轴
YasixZENVisible(_SelectChannel, true);
//显示选择轴
YasixZENVisible(value, false);
}
SetProperty(ref _SelectChannel, value);
}
@ -293,7 +295,11 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
st.Stop();
Debug.WriteLine("统计时间StartChart************{0}", st.Elapsed);
FeedDatasToChart();
_wavesModel.CreateAxisYEventTime(CurrentEventTime, LChartALL.ViewXY, smList.ToList());
if (CurrentEventTime != null)
{
_wavesModel.CreateAxisYEventTime(CurrentEventTime, LChartALL.ViewXY, smList.ToList());
}
}
}
@ -329,7 +335,11 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
LChartALL.EndUpdate();
}
}
/// <summary>
/// Y轴的显示和隐藏
/// </summary>
/// <param name="content">SHZ,SHN,SHE</param>
/// <param name="yAxesVisible">true 隐藏轴false显示轴</param>
private void YasixZENVisible(string content, bool yAxesVisible)
{
if (_lChartAll != null)
@ -345,10 +355,18 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels
{
if (yAxesVisible)
{
//隐藏轴
v.YAxes.Remove(axisY);
}
else
{
//显示轴
var axis= v.YAxes.Where(y => y.Title.Text==axisY.Title.Text).FirstOrDefault();
if (axis != null)
{
//找到相同的轴不用处理
continue;
}
string str = axisY.Title.Text.Replace(conStr, "");
int yIndex = 0;
if (content == "SHZ")

@ -9,6 +9,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StartServerWPF", "StartServ
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartServerWPF.Modules.MseedChart", "StartServerWPF.Modules.MseedChart\StartServerWPF.Modules.MseedChart.csproj", "{E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartServerWPF.Assets", "StartServerWPF.Assets\StartServerWPF.Assets.csproj", "{EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -27,6 +29,10 @@ Global
{E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|Any CPU.Build.0 = Release|Any CPU
{EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -8,10 +8,14 @@
<PackageReference Include="Prism.DryIoc" Version="8.1.97" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StartServerWPF.Assets\StartServerWPF.Assets.csproj" />
<ProjectReference Include="..\StartServerWPF.Modules.Main\StartServerWPF.Modules.Main.csproj" />
<ProjectReference Include="..\StartServerWPF.Modules.MseedChart\StartServerWPF.Modules.MseedChart.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="mseed2ascii.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="SystemConfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>

@ -1,7 +1,11 @@
using Prism.Commands;
using Microsoft.VisualBasic.ApplicationServices;
using Prism.Commands;
using Prism.Ioc;
using Prism.Mvvm;
using StartServerWPF.Assets;
using StartServerWPF.Modules.Main.Models;
using StartServerWPF.Modules.Main.ViewModels;
using System;
using System.Windows;
namespace StartServerWPF.ViewModels
@ -20,8 +24,18 @@ namespace StartServerWPF.ViewModels
{
if (MessageBox.Show("是否退出程序?", "警告", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
{
var main = _containerProvider.Resolve<MainViewModel>();
main.OneKeyStop();
var log = new LogMessageModel
{
LogType = "系统",
AppName = "系统",
State = "程序退出",
OriginTime = DateTime.Now,
};
LogHelper.WriteSerLog(main.sc.vpnInfo.SystemLogPath, log.ToString());
main.OneKeyStop();
Application.Current.Shutdown();
}
});

@ -8,7 +8,7 @@
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/StartServerWPF.Modules.Main;component/Styles/BaseResources.xaml"/>
<ResourceDictionary Source="pack://application:,,,/StartServerWPF.Assets;component/Styles/BaseResources.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
@ -22,7 +22,7 @@
<ColumnDefinition Width="100*"/>
</Grid.ColumnDefinitions>
<DockPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Background="#FF5E83FF">
<Image Source="/StartServerWPF.Modules.Main;component/Images/Union.png" Height="32" Stretch="Uniform" Margin="20,0,30,0"/>
<Image Source="pack://application:,,,/StartServerWPF.Assets;component/Images/Union.png" Height="32" Stretch="Uniform" Margin="20,0,30,0"/>
<TextBlock Text="微地震预警系统管理后台" FontSize="30px" Foreground="White" VerticalAlignment="Center"/>
<Button Content="&#xe603;" FontFamily="{StaticResource Iconfont}" FontSize="20" BorderBrush="Transparent" Command="{Binding ExitCommand}" HorizontalAlignment="Right" Width="58" Height="58" Foreground="White" Background="Black"/>
</DockPanel>

Binary file not shown.
Loading…
Cancel
Save