Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Package
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Package
Commits
c7af1699
Commit
c7af1699
authored
Jan 16, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Viz 命令日志窗口
异常日志窗口
parent
bfc47cfa
Show whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
318 additions
and
472 deletions
+318
-472
VIZ.Package.Common/Log/ErrorMessageAppender.cs
+11
-0
VIZ.Package.Common/VIZ.Package.Common.csproj
+16
-1
VIZ.Package.Connection/Protocol/VIZ/VizEndpointManager.cs
+2
-4
VIZ.Package.Domain/ApplicationDomainEx.cs
+10
-0
VIZ.Package.Domain/Enum/LogType.cs
+0
-29
VIZ.Package.Domain/Enum/ModulePluginIds.cs
+0
-5
VIZ.Package.Domain/Message/Log/ErrorLogMessaeg.cs
+0
-12
VIZ.Package.Domain/Message/Log/LogMessage.cs
+0
-24
VIZ.Package.Domain/VIZ.Package.Domain.csproj
+2
-2
VIZ.Package.Module/Debug/View/DebugWindow.xaml
+1
-2
VIZ.Package.Module/Debug/ViewModel/DebugViewModel.cs
+16
-36
VIZ.Package.Module/Log/LogPluginLifeCycle.cs
+0
-57
VIZ.Package.Module/Log/Service/ILogService.cs
+0
-27
VIZ.Package.Module/Log/View/ErrorLogWindow.xaml
+3
-3
VIZ.Package.Module/Log/View/ErrorLogWindow.xaml.cs
+4
-4
VIZ.Package.Module/Log/View/ErrorWindow.xaml
+0
-12
VIZ.Package.Module/Log/View/ErrorWindow.xaml.cs
+0
-28
VIZ.Package.Module/Log/View/LogView.xaml
+0
-22
VIZ.Package.Module/Log/View/LogView.xaml.cs
+0
-31
VIZ.Package.Module/Log/View/VizCommandWindow.xaml
+15
-5
VIZ.Package.Module/Log/View/VizCommandWindow.xaml.cs
+12
-1
VIZ.Package.Module/Log/ViewModel/ErrorLogWindowModel.cs
+8
-8
VIZ.Package.Module/Log/ViewModel/ErrorWindowModel.cs
+0
-12
VIZ.Package.Module/Log/ViewModel/LogViewModel.cs
+0
-125
VIZ.Package.Module/Log/ViewModel/VizCommandWindowModel.cs
+95
-3
VIZ.Package.Module/Main/View/MainConnView.xaml
+1
-1
VIZ.Package.Module/Main/View/MainStatusView.xaml
+14
-2
VIZ.Package.Module/Main/View/MainView.xaml
+10
-1
VIZ.Package.Module/Main/ViewModel/MainStatusViewModel.cs
+59
-0
VIZ.Package.Module/Main/ViewModel/MainViewModel.cs
+4
-1
VIZ.Package.Module/Resource/GHResource/View/GHResourcePanel.xaml
+1
-1
VIZ.Package.Module/VIZ.Package.Module.csproj
+16
-10
VIZ.Package.Storage/VIZ.Package.Storage.csproj
+4
-0
VIZ.Package/App.xaml.cs
+1
-0
VIZ.Package/MainWindow.xaml
+6
-2
VIZ.Package/config/config.ini
+2
-1
VIZ.Package/config/log.config
+5
-0
No files found.
VIZ.Package.Common/Log/ErrorMessageAppender.cs
View file @
c7af1699
...
@@ -5,6 +5,7 @@ using System.Collections.Generic;
...
@@ -5,6 +5,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.Common
namespace
VIZ.Package.Common
{
{
...
@@ -32,10 +33,20 @@ namespace VIZ.Package.Common
...
@@ -32,10 +33,20 @@ namespace VIZ.Package.Common
/// <param name="loggingEvent">日志事件</param>
/// <param name="loggingEvent">日志事件</param>
public
void
DoAppend
(
LoggingEvent
loggingEvent
)
public
void
DoAppend
(
LoggingEvent
loggingEvent
)
{
{
try
{
if
(
loggingEvent
.
Level
!=
Level
.
Error
)
if
(
loggingEvent
.
Level
!=
Level
.
Error
)
return
;
return
;
ErrorLogMessage
msg
=
new
ErrorLogMessage
();
msg
.
Error
=
loggingEvent
.
RenderedMessage
;
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
}
catch
{
// nothing can do.
}
}
}
}
}
}
}
VIZ.Package.Common/VIZ.Package.Common.csproj
View file @
c7af1699
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
</Page>
</Page>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="Log\ErrorMessageAppender.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
...
@@ -105,6 +106,19 @@
...
@@ -105,6 +106,19 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</None>
</ItemGroup>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Core\VIZ.Framework.Core.csproj">
<Project>{75b39591-4bc3-4b09-bd7d-ec9f67efa96e}</Project>
<Name>VIZ.Framework.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Domain\VIZ.Framework.Domain.csproj">
<Project>{28661e82-c86a-4611-a028-c34f6ac85c97}</Project>
<Name>VIZ.Framework.Domain</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Domain\VIZ.Package.Domain.csproj">
<Project>{dbaeae47-1f2d-4b05-82c3-abf7cc33aa2d}</Project>
<Name>VIZ.Package.Domain</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.Package.Connection/Protocol/VIZ/VizEndpointManager.cs
View file @
c7af1699
...
@@ -103,8 +103,7 @@ namespace VIZ.Package.Connection
...
@@ -103,8 +103,7 @@ namespace VIZ.Package.Connection
this
.
vizEnginePool
.
Send
(
message
);
this
.
vizEnginePool
.
Send
(
message
);
// 记录日志
// 记录日志
LogMessage
msg
=
new
LogMessage
();
VizCommandLogMessage
msg
=
new
VizCommandLogMessage
();
msg
.
Type
=
LogType
.
VizLog
;
msg
.
Log
=
$"[
{
this
.
RemoteIP
}
:
{
this
.
RemotePort
}
] 发送:
{
message
}
"
;
msg
.
Log
=
$"[
{
this
.
RemoteIP
}
:
{
this
.
RemotePort
}
] 发送:
{
message
}
"
;
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
...
@@ -120,8 +119,7 @@ namespace VIZ.Package.Connection
...
@@ -120,8 +119,7 @@ namespace VIZ.Package.Connection
string
result
=
this
.
vizEnginePool
.
Request
(
message
);
string
result
=
this
.
vizEnginePool
.
Request
(
message
);
// 记录日志
// 记录日志
LogMessage
msg
=
new
LogMessage
();
VizCommandLogMessage
msg
=
new
VizCommandLogMessage
();
msg
.
Type
=
LogType
.
VizLog
;
msg
.
Log
=
$"[
{
this
.
RemoteIP
}
:
{
this
.
RemotePort
}
] 发送:
{
message
}
返回:
{
result
}
"
;
msg
.
Log
=
$"[
{
this
.
RemoteIP
}
:
{
this
.
RemotePort
}
] 发送:
{
message
}
返回:
{
result
}
"
;
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
...
...
VIZ.Package.Domain/ApplicationDomainEx.cs
View file @
c7af1699
...
@@ -40,6 +40,16 @@ namespace VIZ.Package.Domain
...
@@ -40,6 +40,16 @@ namespace VIZ.Package.Domain
/// </summary>
/// </summary>
public
static
Window
FieldEditWindow
{
get
;
set
;
}
public
static
Window
FieldEditWindow
{
get
;
set
;
}
/// <summary>
/// Viz命令日志窗口
/// </summary>
public
static
Window
VizCommandLogWindow
{
get
;
set
;
}
/// <summary>
/// 错误日志窗口
/// </summary>
public
static
Window
ErrorLogWindow
{
get
;
set
;
}
// =============================================================
// =============================================================
// 数据
// 数据
// =============================================================
// =============================================================
...
...
VIZ.Package.Domain/Enum/LogType.cs
deleted
100644 → 0
View file @
bfc47cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Domain
{
/// <summary>
/// 日志等级
/// </summary>
public
enum
LogType
{
/// <summary>
/// 日志
/// </summary>
Log
,
/// <summary>
/// Viz日志
/// </summary>
VizLog
,
/// <summary>
/// 错误
/// </summary>
Error
}
}
VIZ.Package.Domain/Enum/ModulePluginIds.cs
View file @
c7af1699
...
@@ -12,11 +12,6 @@ namespace VIZ.Package.Domain
...
@@ -12,11 +12,6 @@ namespace VIZ.Package.Domain
public
static
class
ModulePluginIds
public
static
class
ModulePluginIds
{
{
/// <summary>
/// <summary>
/// 日志
/// </summary>
public
const
string
LOG
=
"LOG"
;
/// <summary>
/// Viz预览
/// Viz预览
/// </summary>
/// </summary>
public
const
string
VIZ_PREVIEW
=
"VIZ_PREVIEW"
;
public
const
string
VIZ_PREVIEW
=
"VIZ_PREVIEW"
;
...
...
VIZ.Package.Domain/Message/Log/ErrorLogMessaeg.cs
deleted
100644 → 0
View file @
bfc47cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Domain.Message.Log
{
internal
class
ErrorLogMessaeg
{
}
}
VIZ.Package.Domain/Message/Log/LogMessage.cs
deleted
100644 → 0
View file @
bfc47cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Domain
{
/// <summary>
/// 日志消息
/// </summary>
public
class
LogMessage
{
/// <summary>
/// 日志类型
/// </summary>
public
LogType
Type
{
get
;
set
;
}
/// <summary>
/// 日志信息
/// </summary>
public
string
Log
{
get
;
set
;
}
}
}
VIZ.Package.Domain/VIZ.Package.Domain.csproj
View file @
c7af1699
...
@@ -75,7 +75,6 @@
...
@@ -75,7 +75,6 @@
<Compile Include="ApplicationConstants.cs" />
<Compile Include="ApplicationConstants.cs" />
<Compile Include="ApplicationDomainEx.cs" />
<Compile Include="ApplicationDomainEx.cs" />
<Compile Include="Core\GridColumnDefinition.cs" />
<Compile Include="Core\GridColumnDefinition.cs" />
<Compile Include="Enum\LogType.cs" />
<Compile Include="Enum\ModulePluginIds.cs" />
<Compile Include="Enum\ModulePluginIds.cs" />
<Compile Include="Enum\ViewServiceKeys.cs" />
<Compile Include="Enum\ViewServiceKeys.cs" />
<Compile Include="Info\VizTreeNodeInfo.cs" />
<Compile Include="Info\VizTreeNodeInfo.cs" />
...
@@ -83,7 +82,8 @@
...
@@ -83,7 +82,8 @@
<Compile Include="Message\Conn\ConnChangedMessage.cs" />
<Compile Include="Message\Conn\ConnChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlListFieldChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlListFieldChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlFieldChangedMessage.cs" />
<Compile Include="Message\ControlObject\ControlFieldChangedMessage.cs" />
<Compile Include="Message\Log\LogMessage.cs" />
<Compile Include="Message\Log\ErrorLogMessage.cs" />
<Compile Include="Message\Log\VizCommandLogMessage.cs" />
<Compile Include="Message\Page\PageOpenMessage.cs" />
<Compile Include="Message\Page\PageOpenMessage.cs" />
<Compile Include="Message\Page\PageInitedMessage.cs" />
<Compile Include="Message\Page\PageInitedMessage.cs" />
<Compile Include="Message\Project\ProjectSaveMessage.cs" />
<Compile Include="Message\Project\ProjectSaveMessage.cs" />
...
...
VIZ.Package.Module/Debug/View/DebugWindow.xaml
View file @
c7af1699
...
@@ -35,8 +35,7 @@
...
@@ -35,8 +35,7 @@
</GroupBox>
</GroupBox>
<GroupBox Header="日志测试" Grid.Column="1">
<GroupBox Header="日志测试" Grid.Column="1">
<StackPanel>
<StackPanel>
<Button Content="添加日志" Command="{Binding AddLogCommand}"></Button>
<Button Content="错误日志" Command="{Binding ErrorLogCommand}"></Button>
<Button Content="清理日志" Command="{Binding ClearLogCommand}"></Button>
</StackPanel>
</StackPanel>
</GroupBox>
</GroupBox>
</Grid>
</Grid>
...
...
VIZ.Package.Module/Debug/ViewModel/DebugViewModel.cs
View file @
c7af1699
using
System
;
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -13,6 +14,11 @@ namespace VIZ.Package.Module
...
@@ -13,6 +14,11 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
public
class
DebugViewModel
:
ViewModelBase
public
class
DebugViewModel
:
ViewModelBase
{
{
/// <summary>
/// 日志
/// </summary>
private
readonly
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
DebugViewModel
));
public
DebugViewModel
()
public
DebugViewModel
()
{
{
// 初始化命令
// 初始化命令
...
@@ -28,9 +34,8 @@ namespace VIZ.Package.Module
...
@@ -28,9 +34,8 @@ namespace VIZ.Package.Module
this
.
SaveLayoutCommand
=
new
VCommand
(
this
.
SaveLayout
);
this
.
SaveLayoutCommand
=
new
VCommand
(
this
.
SaveLayout
);
this
.
LoadLayoutCommand
=
new
VCommand
(
this
.
LoadLayout
);
this
.
LoadLayoutCommand
=
new
VCommand
(
this
.
LoadLayout
);
// 日志
// Log
this
.
AddLogCommand
=
new
VCommand
(
this
.
AddLog
);
this
.
ErrorLogCommand
=
new
VCommand
(
this
.
ErrorLog
);
this
.
ClearLogCommand
=
new
VCommand
(
this
.
ClearLog
);
}
}
// ======================================================================
// ======================================================================
...
@@ -83,46 +88,21 @@ namespace VIZ.Package.Module
...
@@ -83,46 +88,21 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
// ---------------------------------------------------------
// ---------------------------------------------------------
// 日志
// Log
#
region
AddLogCommand
--
添加日志命令
/// <summary>
/// 添加日志命令
/// </summary>
public
VCommand
AddLogCommand
{
get
;
set
;
}
/// <summary>
/// 添加日志
/// </summary>
private
void
AddLog
()
{
ILogService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
ILogService
>(
ViewServiceKeys
.
LOG_VIEW_SERVICE
);
if
(
service
==
null
)
return
;
service
.
AppendLog
(
"this is a try."
);
}
#
endregion
#
region
ErrorLogCommand
--
错误日志命令
#
region
ClearLogCommand
--
清理日志命令
/// <summary>
/// <summary>
///
清理
日志命令
///
错误
日志命令
/// </summary>
/// </summary>
public
VCommand
Clea
rLogCommand
{
get
;
set
;
}
public
VCommand
Erro
rLogCommand
{
get
;
set
;
}
/// <summary>
/// <summary>
///
清理
日志
///
错误
日志
/// </summary>
/// </summary>
private
void
Clea
rLog
()
private
void
Erro
rLog
()
{
{
ILogService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
ILogService
>(
ViewServiceKeys
.
LOG_VIEW_SERVICE
);
log
.
Error
(
"测试错误日志!"
);
if
(
service
==
null
)
return
;
service
.
ClearLog
();
}
}
#
endregion
#
endregion
...
...
VIZ.Package.Module/Log/LogPluginLifeCycle.cs
deleted
100644 → 0
View file @
bfc47cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Plugin
;
namespace
VIZ.Package.Module
{
/// <summary>
/// 日志插件生命周期
/// </summary>
public
class
LogPluginLifeCycle
:
IPluginLifeCycle
{
/// <summary>
/// 插件分组
/// </summary>
public
const
string
PLUGIN_GROUP
=
ApplicationConstants
.
APPLICATION_GROUP_NAME
;
/// <summary>
/// 插件ID
/// </summary>
/// <remarks>
/// 插件ID不能包含点号
/// </remarks>
public
const
string
PLUGIN_ID
=
ModulePluginIds
.
LOG
;
/// <summary>
/// 插件名称
/// </summary>
public
const
string
PLUGIN_NAME
=
"日志"
;
/// <summary>
/// 注册
/// </summary>
/// <returns>插件信息</returns>
public
PluginInfo
Register
()
{
PluginInfo
info
=
new
PluginInfo
();
info
.
Group
=
PLUGIN_GROUP
;
info
.
ID
=
PLUGIN_ID
;
info
.
Name
=
PLUGIN_NAME
;
info
.
ViewType
=
typeof
(
LogView
);
return
info
;
}
/// <summary>
/// 销毁
/// </summary>
public
void
Dispose
()
{
}
}
}
VIZ.Package.Module/Log/Service/ILogService.cs
deleted
100644 → 0
View file @
bfc47cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
namespace
VIZ.Package.Module
{
/// <summary>
/// 日志服务
/// </summary>
public
interface
ILogService
:
IService
{
/// <summary>
/// 添加日志
/// </summary>
/// <param name="log">日志</param>
void
AppendLog
(
string
log
);
/// <summary>
/// 清理日志
/// </summary>
void
ClearLog
();
}
}
\ No newline at end of file
VIZ.Package.Module/Log/View/ErrorLogWindow.xaml
View file @
c7af1699
<dx:ThemedWindow x:Class="VIZ.Package.Module.ErrorWindow"
<dx:ThemedWindow x:Class="VIZ.Package.Module.Error
Log
Window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.Package.Module"
xmlns:local="clr-namespace:VIZ.Package.Module"
mc:Ignorable="d"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:ErrorWindowModel}"
d:DataContext="{d:DesignInstance Type=local:Error
Log
WindowModel}"
Title="
Viz命令
窗口" Height="800" Width="1200"
Title="
错误消息
窗口" Height="800" Width="1200"
WindowStartupLocation="CenterScreen">
WindowStartupLocation="CenterScreen">
<Grid>
<Grid>
...
...
VIZ.Package.Module/Log/View/ErrorLogWindow.xaml.cs
View file @
c7af1699
...
@@ -16,15 +16,15 @@ using VIZ.Framework.Core;
...
@@ -16,15 +16,15 @@ using VIZ.Framework.Core;
namespace
VIZ.Package.Module
namespace
VIZ.Package.Module
{
{
/// <summary>
/// <summary>
/// Interaction logic for ErrorWindow.xaml
/// Interaction logic for Error
Log
Window.xaml
/// </summary>
/// </summary>
public
partial
class
ErrorWindow
:
ThemedWindow
public
partial
class
Error
Log
Window
:
ThemedWindow
{
{
public
ErrorWindow
()
public
Error
Log
Window
()
{
{
InitializeComponent
();
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
ErrorWindowModel
());
WPFHelper
.
BindingViewModel
(
this
,
new
Error
Log
WindowModel
());
this
.
Closing
+=
VizCommandWindow_Closing
;
this
.
Closing
+=
VizCommandWindow_Closing
;
}
}
...
...
VIZ.Package.Module/Log/View/ErrorWindow.xaml
deleted
100644 → 0
View file @
bfc47cfa
<dx:ThemedWindow
x:Class="VIZ.Package.Module.ErrorWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
Title="ErrorWindow" Height="800" Width="1000"
>
<Grid>
</Grid>
</dx:ThemedWindow>
VIZ.Package.Module/Log/View/ErrorWindow.xaml.cs
deleted
100644 → 0
View file @
bfc47cfa
using
DevExpress.Xpf.Core
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
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.Shapes
;
namespace
VIZ.Package.Module
{
/// <summary>
/// Interaction logic for ErrorWindow.xaml
/// </summary>
public
partial
class
ErrorWindow
:
ThemedWindow
{
public
ErrorWindow
()
{
InitializeComponent
();
}
}
}
VIZ.Package.Module/Log/View/LogView.xaml
deleted
100644 → 0
View file @
bfc47cfa
<UserControl x:Class="VIZ.Package.Module.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:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:local="clr-namespace:VIZ.Package.Module"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:LogViewModel}"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Button Width="80" Height="20" Content="清除" Command="{Binding Path=ClearCommand}" HorizontalAlignment="Left"></Button>
<TextBox x:Name="tb" IsReadOnly="True" AcceptsReturn="False" VerticalScrollBarVisibility="Auto"
Grid.Row="1"></TextBox>
</Grid>
</UserControl>
VIZ.Package.Module/Log/View/LogView.xaml.cs
deleted
100644 → 0
View file @
bfc47cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
VIZ.Framework.Core
;
namespace
VIZ.Package.Module
{
/// <summary>
/// LogView.xaml 的交互逻辑
/// </summary>
public
partial
class
LogView
:
UserControl
{
public
LogView
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
LogViewModel
());
}
}
}
VIZ.Package.Module/Log/View/VizCommandWindow.xaml
View file @
c7af1699
<dx:ThemedWindow
<dx:ThemedWindow x:Class="VIZ.Package.Module.VizCommandWindow"
x:Class="VIZ.Package.Module.VizCommandWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
Title="VizCommandWindow" Height="800" Width="1000"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
>
xmlns:local="clr-namespace:VIZ.Package.Module"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:VizCommandWindowModel}"
Title="Viz命令窗口" Height="800" Width="1200"
WindowStartupLocation="CenterScreen">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Button Width="80" Height="20" Content="清除" Command="{Binding Path=ClearCommand}" HorizontalAlignment="Left"></Button>
<TextBox x:Name="tb" IsReadOnly="True" AcceptsReturn="False" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
Grid.Row="1"></TextBox>
</Grid>
</Grid>
</dx:ThemedWindow>
</dx:ThemedWindow>
VIZ.Package.Module/Log/View/VizCommandWindow.xaml.cs
View file @
c7af1699
...
@@ -11,7 +11,7 @@ using System.Windows.Input;
...
@@ -11,7 +11,7 @@ using System.Windows.Input;
using
System.Windows.Media
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Shapes
;
using
System.Windows.Shapes
;
using
VIZ.Framework.Core
;
namespace
VIZ.Package.Module
namespace
VIZ.Package.Module
{
{
...
@@ -23,6 +23,17 @@ namespace VIZ.Package.Module
...
@@ -23,6 +23,17 @@ namespace VIZ.Package.Module
public
VizCommandWindow
()
public
VizCommandWindow
()
{
{
InitializeComponent
();
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
VizCommandWindowModel
());
this
.
Closing
+=
VizCommandWindow_Closing
;
}
private
void
VizCommandWindow_Closing
(
object
sender
,
System
.
ComponentModel
.
CancelEventArgs
e
)
{
e
.
Cancel
=
true
;
this
.
Visibility
=
Visibility
.
Collapsed
;
}
}
}
}
}
}
VIZ.Package.Module/Log/ViewModel/ErrorLogWindowModel.cs
View file @
c7af1699
...
@@ -12,17 +12,17 @@ namespace VIZ.Package.Module
...
@@ -12,17 +12,17 @@ namespace VIZ.Package.Module
/// <summary>
/// <summary>
/// 错误窗口模型
/// 错误窗口模型
/// </summary>
/// </summary>
public
class
ErrorWindowModel
:
ViewModelBase
public
class
Error
Log
WindowModel
:
ViewModelBase
{
{
/// <summary>
/// <summary>
/// 日志
/// 日志
/// </summary>
/// </summary>
private
static
readonly
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
ErrorWindowModel
));
private
static
readonly
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
Error
Log
WindowModel
));
/// <summary>
/// <summary>
/// 错误窗口模型
/// 错误窗口模型
/// </summary>
/// </summary>
public
ErrorWindowModel
()
public
Error
Log
WindowModel
()
{
{
// 初始化命令
// 初始化命令
this
.
InitCommand
();
this
.
InitCommand
();
...
@@ -44,7 +44,7 @@ namespace VIZ.Package.Module
...
@@ -44,7 +44,7 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
InitMessage
()
private
void
InitMessage
()
{
{
ApplicationDomainEx
.
MessageManager
.
Register
<
VizCommandLogMessage
>(
this
,
this
.
OnVizCommand
LogMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ErrorLogMessage
>(
this
,
this
.
OnError
LogMessage
);
}
}
// ==================================================================================
// ==================================================================================
...
@@ -77,18 +77,18 @@ namespace VIZ.Package.Module
...
@@ -77,18 +77,18 @@ namespace VIZ.Package.Module
// ==================================================================================
// ==================================================================================
/// <summary>
/// <summary>
///
Viz命令日志
///
错误日志消息
/// </summary>
/// </summary>
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
On
VizCommandLogMessage
(
VizCommand
LogMessage
msg
)
private
void
On
ErrorLogMessage
(
Error
LogMessage
msg
)
{
{
WPFHelper
.
BeginInvoke
(()
=>
WPFHelper
.
BeginInvoke
(()
=>
{
{
VizCommandWindow
view
=
this
.
GetView
<
VizCommand
Window
>();
ErrorLogWindow
view
=
this
.
GetView
<
ErrorLog
Window
>();
if
(
view
==
null
)
if
(
view
==
null
)
return
;
return
;
string
log
=
$"
{
DateTime
.
Now
.
ToString
(
"HH:mm:ss"
)}
{
msg
.
Log
}
"
;
string
log
=
$"
{
DateTime
.
Now
.
ToString
(
"HH:mm:ss"
)}
{
msg
.
Error
}
"
;
view
.
tb
.
AppendText
(
$"
{
log
}
\r\n"
);
view
.
tb
.
AppendText
(
$"
{
log
}
\r\n"
);
view
.
tb
.
ScrollToEnd
();
view
.
tb
.
ScrollToEnd
();
...
...
VIZ.Package.Module/Log/ViewModel/ErrorWindowModel.cs
deleted
100644 → 0
View file @
bfc47cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Module.Log.ViewModel
{
internal
class
ErrorWindowModel
{
}
}
VIZ.Package.Module/Log/ViewModel/LogViewModel.cs
deleted
100644 → 0
View file @
bfc47cfa
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.Module
{
/// <summary>
/// 日志视图模型
/// </summary>
public
class
LogViewModel
:
ViewModelBase
,
ILogService
{
/// <summary>
/// 日志
/// </summary>
private
static
readonly
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
LogViewModel
));
/// <summary>
/// 日志视图模型
/// </summary>
public
LogViewModel
()
{
// 初始化命令
this
.
InitCommand
();
// 初始化消息
this
.
InitMessage
();
/// 注册服务
ApplicationDomainEx
.
ServiceManager
.
AddService
(
ViewServiceKeys
.
LOG_VIEW_SERVICE
,
this
);
}
/// <summary>
/// 初始化命令
/// </summary>
private
void
InitCommand
()
{
this
.
ClearCommand
=
new
VCommand
(
this
.
Clear
);
}
/// <summary>
/// 初始化消息
/// </summary>
private
void
InitMessage
()
{
ApplicationDomainEx
.
MessageManager
.
Register
<
LogMessage
>(
this
,
this
.
OnLogMessage
);
}
// ==================================================================================
// Command
// ==================================================================================
#
region
ClearCommand
--
清除消息
/// <summary>
/// 清除消息
/// </summary>
public
VCommand
ClearCommand
{
get
;
set
;
}
/// <summary>
/// 清除
/// </summary>
private
void
Clear
()
{
this
.
ClearLog
();
}
#
endregion
// ==================================================================================
// Message
// ==================================================================================
/// <summary>
/// 处理日志消息
/// </summary>
/// <param name="msg">消息</param>
private
void
OnLogMessage
(
LogMessage
msg
)
{
string
log
=
$"
{
DateTime
.
Now
.
ToString
(
"HH:mm:ss"
)}
<
{
msg
.
Type
}
>
{
msg
.
Log
}
"
;
this
.
AppendLog
(
log
);
}
// ==================================================================================
// Public Function
// ==================================================================================
/// <summary>
/// 添加日志
/// </summary>
/// <param name="log"></param>
public
void
AppendLog
(
string
log
)
{
WPFHelper
.
BeginInvoke
(()
=>
{
LogView
view
=
this
.
GetView
<
LogView
>();
if
(
view
==
null
)
return
;
view
.
tb
.
AppendText
(
$"
{
log
}
\r\n"
);
});
}
/// <summary>
/// 清理日志
/// </summary>
public
void
ClearLog
()
{
WPFHelper
.
BeginInvoke
(()
=>
{
LogView
view
=
this
.
GetView
<
LogView
>();
if
(
view
==
null
)
return
;
view
.
tb
.
Clear
();
});
}
}
}
\ No newline at end of file
VIZ.Package.Module/Log/ViewModel/VizCommandWindowModel.cs
View file @
c7af1699
using
System
;
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
namespace
VIZ.Package.Module
.Log.ViewModel
namespace
VIZ.Package.Module
{
{
internal
class
VizCommandWindowModel
/// <summary>
/// Viz命令窗口模型
/// </summary>
public
class
VizCommandWindowModel
:
ViewModelBase
{
{
/// <summary>
/// 日志
/// </summary>
private
static
readonly
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
VizCommandWindowModel
));
/// <summary>
/// 日志视图模型
/// </summary>
public
VizCommandWindowModel
()
{
// 初始化命令
this
.
InitCommand
();
// 初始化消息
this
.
InitMessage
();
}
/// <summary>
/// 初始化命令
/// </summary>
private
void
InitCommand
()
{
this
.
ClearCommand
=
new
VCommand
(
this
.
Clear
);
}
/// <summary>
/// 初始化消息
/// </summary>
private
void
InitMessage
()
{
ApplicationDomainEx
.
MessageManager
.
Register
<
VizCommandLogMessage
>(
this
,
this
.
OnVizCommandLogMessage
);
}
// ==================================================================================
// Command
// ==================================================================================
#
region
ClearCommand
--
清除消息
/// <summary>
/// 清除消息
/// </summary>
public
VCommand
ClearCommand
{
get
;
set
;
}
/// <summary>
/// 清除
/// </summary>
private
void
Clear
()
{
VizCommandWindow
view
=
this
.
GetView
<
VizCommandWindow
>();
if
(
view
==
null
)
return
;
view
.
tb
.
Clear
();
}
#
endregion
// ==================================================================================
// Message
// ==================================================================================
/// <summary>
/// Viz命令日志
/// </summary>
/// <param name="msg">消息</param>
private
void
OnVizCommandLogMessage
(
VizCommandLogMessage
msg
)
{
WPFHelper
.
BeginInvoke
(()
=>
{
VizCommandWindow
view
=
this
.
GetView
<
VizCommandWindow
>();
if
(
view
==
null
)
return
;
string
log
=
$"
{
DateTime
.
Now
.
ToString
(
"HH:mm:ss"
)}
{
msg
.
Log
}
"
;
view
.
tb
.
AppendText
(
$"
{
log
}
\r\n"
);
view
.
tb
.
ScrollToEnd
();
});
}
// ==================================================================================
// Public Function
// ==================================================================================
}
}
}
}
\ No newline at end of file
VIZ.Package.Module/Main/View/MainConnView.xaml
View file @
c7af1699
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<StackPanel Orientation="Horizontal" Background="Transparent" VerticalAlignment="Center"
<StackPanel Orientation="Horizontal" Background="Transparent" VerticalAlignment="Center"
IsEnabled="{Binding Path=IsLoading,Converter={StaticResource Bool2BoolConverter}}"
IsEnabled="{Binding Path=IsLoading,Converter={StaticResource Bool2BoolConverter}}"
TextBlock.Foreground="{Binding Path=IsConnected,Converter={StaticResource Bool2SolidColorBrushConverter}}"
TextBlock.Foreground="{Binding Path=IsConnected,Converter={StaticResource Bool2SolidColorBrushConverter}}"
TextBlock.FontSize="1
4
"
TextBlock.FontSize="1
2
"
Cursor="Hand" MinWidth="120" Margin="10,0,0,0">
Cursor="Hand" MinWidth="120" Margin="10,0,0,0">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand Event="PreviewMouseLeftButtonDown"
<dxmvvm:EventToCommand Event="PreviewMouseLeftButtonDown"
...
...
VIZ.Package.Module/Main/View/MainStatusView.xaml
View file @
c7af1699
...
@@ -8,12 +8,24 @@
...
@@ -8,12 +8,24 @@
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="35" d:DesignWidth="800">
d:DesignHeight="35" d:DesignWidth="800">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="200"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<!-- 項目名 -->
<!-- 項目名 -->
<TextBlock Text="项目:" Margin="10,0,0,0" Opacity="0.6"></TextBlock>
<TextBlock Text="项目:" Margin="10,0,0,0" Opacity="0.6"></TextBlock>
<TextBlock Text="{Binding ProjectName}" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="{Binding ProjectName}" Margin="10,0,0,0"
ToolTip="{Binding ProjectName}"></TextBlock>
<TextBlock Text="场景:" Margin="40,0,0,0" Opacity="0.6"></TextBlock>
<TextBlock Text="场景:" Margin="40,0,0,0" Opacity="0.6"></TextBlock>
<TextBlock Text="{Binding Scene}" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="{Binding Scene}" Margin="10,0,0,0"
ToolTip="{Binding Scene}"></TextBlock>
</StackPanel>
<!-- 命令组 -->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Column="1">
<Button Content="Viz Command Log" Command="{Binding Path=OpenVizCommandLogWindowCommand}"></Button>
<Button Content="Errors" Margin="10,0,5,0" Command="{Binding Path=OpenErrorLogWindowCommand}"></Button>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.Package.Module/Main/View/MainView.xaml
View file @
c7af1699
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxdove="http://schemas.devexpress.com/winfx/2008/xaml/docking/visualelements"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:plugin="clr-namespace:VIZ.Package.Plugin;assembly=VIZ.Package.Plugin"
xmlns:plugin="clr-namespace:VIZ.Package.Plugin;assembly=VIZ.Package.Plugin"
xmlns:domain="clr-namespace:VIZ.Package.Domain;assembly=VIZ.Package.Domain"
xmlns:domain="clr-namespace:VIZ.Package.Domain;assembly=VIZ.Package.Domain"
...
@@ -20,6 +21,13 @@
...
@@ -20,6 +21,13 @@
<DataTemplate DataType="{x:Type domain:PluginInfo}">
<DataTemplate DataType="{x:Type domain:PluginInfo}">
<plugin:PluginLoader ViewType="{Binding ViewType,Mode=OneWay}"></plugin:PluginLoader>
<plugin:PluginLoader ViewType="{Binding ViewType,Mode=OneWay}"></plugin:PluginLoader>
</DataTemplate>
</DataTemplate>
<!--<Style x:Key="CaptionImageStyle" TargetType="dxdove:CaptionImage">
<Setter Property="Width" Value="20"/>
<Setter Property="Height" Value="20"/>
<Setter Property="Stretch" Value="Fill"/>
</Style>-->
<Style TargetType="{x:Type dxdo:LayoutPanel}">
<Style TargetType="{x:Type dxdo:LayoutPanel}">
<Setter Property="BindableName" Value="{Binding ID}" />
<Setter Property="BindableName" Value="{Binding ID}" />
<Setter Property="Caption" Value="{Binding Name}" />
<Setter Property="Caption" Value="{Binding Name}" />
...
@@ -38,7 +46,8 @@
...
@@ -38,7 +46,8 @@
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxmvvm:Interaction.Behaviors>
<dxdo:DockLayoutManager x:Name="dockLayoutManager" FloatingMode="Desktop" EnableWin32Compatibility="True">
<dxdo:DockLayoutManager x:Name="dockLayoutManager" FloatingMode="Desktop" EnableWin32Compatibility="True"
AutoHideExpandMode="MouseDown">
<dxdo:LayoutGroup ItemsSource="{Binding ItemsSource}"></dxdo:LayoutGroup>
<dxdo:LayoutGroup ItemsSource="{Binding ItemsSource}"></dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</dxdo:DockLayoutManager>
</UserControl>
</UserControl>
VIZ.Package.Module/Main/ViewModel/MainStatusViewModel.cs
View file @
c7af1699
...
@@ -18,6 +18,27 @@ namespace VIZ.Package.Module
...
@@ -18,6 +18,27 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
public
MainStatusViewModel
()
public
MainStatusViewModel
()
{
{
// 初始化命令
this
.
InitCommand
();
// 初始化消息
this
.
InitMessage
();
}
/// <summary>
/// 初始化命令
/// </summary>
private
void
InitCommand
()
{
this
.
OpenVizCommandLogWindowCommand
=
new
VCommand
(
this
.
OpenVizCommandLogWindow
);
this
.
OpenErrorLogWindowCommand
=
new
VCommand
(
this
.
OpenErrorLogWindow
);
}
/// <summary>
/// 初始化消息
/// </summary>
private
void
InitMessage
()
{
ApplicationDomainEx
.
MessageManager
.
Register
<
ProjectOpenMessage
>(
this
,
this
.
OnProjectOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ProjectOpenMessage
>(
this
,
this
.
OnProjectOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ProjectCloseMessage
>(
this
,
this
.
OnProjectCloseMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ProjectCloseMessage
>(
this
,
this
.
OnProjectCloseMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
...
@@ -56,6 +77,44 @@ namespace VIZ.Package.Module
...
@@ -56,6 +77,44 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
// ======================================================================
// ======================================================================
// Command
// ======================================================================
#
region
OpenVizCommandLogWindowCommand
--
打开
Viz
命令日志窗口命令
/// <summary>
/// 打开Viz命令日志窗口命令
/// </summary>
public
VCommand
OpenVizCommandLogWindowCommand
{
get
;
set
;
}
/// <summary>
/// 打开Viz命令日志窗口
/// </summary>
private
void
OpenVizCommandLogWindow
()
{
ApplicationDomainEx
.
VizCommandLogWindow
.
Visibility
=
System
.
Windows
.
Visibility
.
Visible
;
}
#
endregion
#
region
OpenErrorLogWindowCommand
--
打开错误日志窗口命令
/// <summary>
/// 打开错误日志窗口命令
/// </summary>
public
VCommand
OpenErrorLogWindowCommand
{
get
;
set
;
}
/// <summary>
/// 打开错误日志窗口
/// </summary>
private
void
OpenErrorLogWindow
()
{
ApplicationDomainEx
.
ErrorLogWindow
.
Visibility
=
System
.
Windows
.
Visibility
.
Visible
;
}
#
endregion
// ======================================================================
// Message
// Message
// ======================================================================
// ======================================================================
...
...
VIZ.Package.Module/Main/ViewModel/MainViewModel.cs
View file @
c7af1699
...
@@ -94,8 +94,11 @@ namespace VIZ.Package.Module
...
@@ -94,8 +94,11 @@ namespace VIZ.Package.Module
// 加载布局
// 加载布局
this
.
LoadLayout
();
this
.
LoadLayout
();
//
// 创建VizCommand窗口
ApplicationDomainEx
.
VizCommandLogWindow
=
new
VizCommandWindow
();
// 创建Error窗口
ApplicationDomainEx
.
ErrorLogWindow
=
new
ErrorLogWindow
();
}
}
#
endregion
#
endregion
...
...
VIZ.Package.Module/Resource/GHResource/View/GHResourcePanel.xaml
View file @
c7af1699
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
<dx:WaitIndicator DeferedVisibility="{Binding IsFolderLoading}" Content="Loading..." Margin="0,0,6,0" />
<dx:WaitIndicator DeferedVisibility="{Binding IsFolderLoading}" Content="Loading..." Margin="0,0,6,0" />
<GridSplitter HorizontalAlignment="Right" Width="10" Style="{StaticResource GridSplitter_None}"></GridSplitter>
<GridSplitter HorizontalAlignment="Right" Width="10" Style="{StaticResource GridSplitter_None}"></GridSplitter>
<dxg:GridControl x:Name="fileGrid" Grid.Column="1" ShowBorder="
Fals
e"
<dxg:GridControl x:Name="fileGrid" Grid.Column="1" ShowBorder="
Tru
e"
ContextMenu="{Binding Path=FileContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:GHResourcePanel}}}"
ContextMenu="{Binding Path=FileContextMenu,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:GHResourcePanel}}}"
SelectionMode="Row"
SelectionMode="Row"
CustomRowFilterCommand="{Binding Path=FileRowFilterCommand}"
CustomRowFilterCommand="{Binding Path=FileRowFilterCommand}"
...
...
VIZ.Package.Module/VIZ.Package.Module.csproj
View file @
c7af1699
...
@@ -104,6 +104,10 @@
...
@@ -104,6 +104,10 @@
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FontListCellEdit.xaml.cs">
<Compile Include="ControlObject\FieldEdit\Edit\ListEdit\CellEdit\FontListCellEdit.xaml.cs">
<DependentUpon>FontListCellEdit.xaml</DependentUpon>
<DependentUpon>FontListCellEdit.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Log\ViewModel\ErrorLogWindowModel.cs" />
<Compile Include="Log\View\ErrorLogWindow.xaml.cs">
<DependentUpon>ErrorLogWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Help\About\View\AboutWindow.xaml.cs">
<Compile Include="Help\About\View\AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon>
<DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile>
</Compile>
...
@@ -112,6 +116,7 @@
...
@@ -112,6 +116,7 @@
<Compile Include="ControlObject\FieldEdit\Service\IFieldEditService.cs" />
<Compile Include="ControlObject\FieldEdit\Service\IFieldEditService.cs" />
<Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditViewModelBase.cs" />
<Compile Include="ControlObject\FieldEdit\ViewModel\FieldEditViewModelBase.cs" />
<Compile Include="ControlObject\FieldTree\Service\IFieldTreeService.cs" />
<Compile Include="ControlObject\FieldTree\Service\IFieldTreeService.cs" />
<Compile Include="Log\ViewModel\VizCommandWindowModel.cs" />
<Compile Include="Main\ViewModel\MainConnViewModel.cs" />
<Compile Include="Main\ViewModel\MainConnViewModel.cs" />
<Compile Include="Main\View\MainConnView.xaml.cs">
<Compile Include="Main\View\MainConnView.xaml.cs">
<DependentUpon>MainConnView.xaml</DependentUpon>
<DependentUpon>MainConnView.xaml</DependentUpon>
...
@@ -279,12 +284,6 @@
...
@@ -279,12 +284,6 @@
<Compile Include="Login\View\LoginView.xaml.cs">
<Compile Include="Login\View\LoginView.xaml.cs">
<DependentUpon>LoginView.xaml</DependentUpon>
<DependentUpon>LoginView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Log\LogPluginLifeCycle.cs" />
<Compile Include="Log\Service\ILogService.cs" />
<Compile Include="Log\ViewModel\LogViewModel.cs" />
<Compile Include="Log\View\LogView.xaml.cs">
<DependentUpon>LogView.xaml</DependentUpon>
</Compile>
<Compile Include="Main\Service\IMainViewService.cs" />
<Compile Include="Main\Service\IMainViewService.cs" />
<Compile Include="Main\View\MainTopView.xaml.cs">
<Compile Include="Main\View\MainTopView.xaml.cs">
<DependentUpon>MainTopView.xaml</DependentUpon>
<DependentUpon>MainTopView.xaml</DependentUpon>
...
@@ -333,6 +332,9 @@
...
@@ -333,6 +332,9 @@
<Compile Include="Setting\VizConfig\View\VizConfigSettingView.xaml.cs">
<Compile Include="Setting\VizConfig\View\VizConfigSettingView.xaml.cs">
<DependentUpon>VizConfigSettingView.xaml</DependentUpon>
<DependentUpon>VizConfigSettingView.xaml</DependentUpon>
</Compile>
</Compile>
<Compile Include="Log\View\VizCommandWindow.xaml.cs">
<DependentUpon>VizCommandWindow.xaml</DependentUpon>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
...
@@ -364,6 +366,10 @@
...
@@ -364,6 +366,10 @@
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
</Page>
</Page>
<Page Include="Log\View\ErrorLogWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Help\About\View\AboutWindow.xaml">
<Page Include="Help\About\View\AboutWindow.xaml">
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
...
@@ -504,10 +510,6 @@
...
@@ -504,10 +510,6 @@
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
</Page>
<Page Include="Log\View\LogView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Main\View\MainTopView.xaml">
<Page Include="Main\View\MainTopView.xaml">
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
...
@@ -544,6 +546,10 @@
...
@@ -544,6 +546,10 @@
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
</Page>
<Page Include="Log\View\VizCommandWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Common.Resource\VIZ.Framework.Common.Resource.csproj">
<ProjectReference Include="..\..\VIZ.Framework\VIZ.Framework.Common.Resource\VIZ.Framework.Common.Resource.csproj">
...
...
VIZ.Package.Storage/VIZ.Package.Storage.csproj
View file @
c7af1699
...
@@ -118,5 +118,8 @@
...
@@ -118,5 +118,8 @@
<Name>VIZ.Framework.Storage</Name>
<Name>VIZ.Framework.Storage</Name>
</ProjectReference>
</ProjectReference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Folder Include="Json\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.Package/App.xaml.cs
View file @
c7af1699
...
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
...
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using
System.Windows
;
using
System.Windows
;
using
System.Windows.Controls.Primitives
;
using
System.Windows.Controls.Primitives
;
using
VIZ.Framework.Module
;
using
VIZ.Framework.Module
;
using
VIZ.Package.Common
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Module
;
using
VIZ.Package.Module
;
...
...
VIZ.Package/MainWindow.xaml
View file @
c7af1699
...
@@ -18,8 +18,12 @@
...
@@ -18,8 +18,12 @@
<!-- 主视图 -->
<!-- 主视图 -->
<module:MainView></module:MainView>
<module:MainView></module:MainView>
<!-- 状态视图 -->
<!-- 状态视图 -->
<module:MainStatusView Grid.Row="1"></module:MainStatusView>
<Border BorderBrush="#ff3f3f46" BorderThickness="1" Grid.Row="1" Margin="0,5,0,0">
<module:MainStatusView></module:MainStatusView>
</Border>
<!-- 连接视图 -->
<!-- 连接视图 -->
<module:MainConnView Grid.Row="2"></module:MainConnView>
<Border BorderBrush="#ff3f3f46" BorderThickness="1" Grid.Row="2" Margin="0,5,0,0">
<module:MainConnView></module:MainConnView>
</Border>
</Grid>
</Grid>
</dx:ThemedWindow>
</dx:ThemedWindow>
VIZ.Package/config/config.ini
View file @
c7af1699
[Application]
[Application]
APPLICATION_IS_DEBUG
=
fals
e
APPLICATION_IS_DEBUG
=
tru
e
[Viz]
[Viz]
VIZ_IMAGE_FILTER
=
ͼƬ|*.jpg;*.jpeg;*.bmp;*.png;
VIZ_IMAGE_FILTER
=
ͼƬ|*.jpg;*.jpeg;*.bmp;*.png;
\ No newline at end of file
VIZ.Package/config/log.config
View file @
c7af1699
...
@@ -60,14 +60,18 @@
...
@@ -60,14 +60,18 @@
<
conversionPattern
value
=
"%date %logger - %message%newline"
/>
<
conversionPattern
value
=
"%date %logger - %message%newline"
/>
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
appender
name
=
"errorMessageAppender"
type
=
"VIZ.Package.Common.ErrorMessageAppender, VIZ.Package.Common"
>
</
appender
>
<
root
>
<
root
>
<
level
value
=
"ALL"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"errorAppender"
/>
<
appender
-
ref
ref
=
"errorAppender"
/>
<
appender
-
ref
ref
=
"infoAppender"
/>
<
appender
-
ref
ref
=
"infoAppender"
/>
<
appender
-
ref
ref
=
"debugAppender"
/>
<
appender
-
ref
ref
=
"debugAppender"
/>
<
appender
-
ref
ref
=
"errorMessageAppender"
/>
</
root
>
</
root
>
<
logger
name
=
"Performance"
additivity
=
"false"
>
<
logger
name
=
"Performance"
additivity
=
"false"
>
<
level
value
=
"ALL"
/>
<
level
value
=
"ALL"
/>
<
appender
-
ref
ref
=
"perfAppender"
/>
<
appender
-
ref
ref
=
"perfAppender"
/>
<
appender
-
ref
ref
=
"errorMessageAppender"
/>
</
logger
>
</
logger
>
</
log4net
>
</
log4net
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment