Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.H2V
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.H2V
Commits
17170478
Commit
17170478
authored
Sep 19, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 3D鼠标初始化增强
2. 主页添加初始化3D鼠标按钮
parent
f19b1f91
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
12 deletions
+57
-12
Lib/VIZ.Framework.Core.Navigation3D.dll
+0
-0
VIZ.H2V.Module.Resource/Icons/navigation3d_24x24.png
+0
-0
VIZ.H2V.Module.Resource/Style/Button/Button_WindowTop.xaml
+25
-0
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
+8
-0
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
+9
-3
VIZ.H2V.Module/NDIMainView/ViewModel/NDIMainViewModel.cs
+11
-9
VIZ.H2V.Module/NDIView/Controller/Manual/ManualController.cs
+2
-0
VIZ.H2V/App.xaml.cs
+2
-0
No files found.
Lib/VIZ.Framework.Core.Navigation3D.dll
View file @
17170478
No preview for this file type
VIZ.H2V.Module.Resource/Icons/navigation3d_24x24.png
0 → 100644
View file @
17170478
531 Bytes
VIZ.H2V.Module.Resource/Style/Button/Button_WindowTop.xaml
0 → 100644
View file @
17170478
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="Button_Navigation3D" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="50"></Setter>
<Setter Property="Height" Value="40"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bd" BorderBrush="Transparent" BorderThickness="1" Background="Transparent">
<Image Width="18" Height="18" HorizontalAlignment="Center" VerticalAlignment="Center"
Source="/VIZ.H2V.Module.Resource;component/Icons/navigation3d_24x24.png"></Image>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#22ffffff"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
View file @
17170478
...
@@ -74,6 +74,10 @@
...
@@ -74,6 +74,10 @@
<SubType>Designer</SubType>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
</Page>
</Page>
<Page Include="Style\Button\Button_WindowTop.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Style\CheckBox\CheckBox_Setting.xaml">
<Page Include="Style\CheckBox\CheckBox_Setting.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
...
@@ -201,5 +205,8 @@
...
@@ -201,5 +205,8 @@
<Resource Include="Icons\center_24x24.png" />
<Resource Include="Icons\center_24x24.png" />
<Resource Include="Icons\center_over_24x24.png" />
<Resource Include="Icons\center_over_24x24.png" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\navigation3d_24x24.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
View file @
17170478
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
<UserControl.Resources>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.H2V.Module.Resource;component/Style/Button/Button_WindowTop.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common.Resource;component/Style/Button/Button_WindowTop.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common.Resource;component/Style/Button/Button_WindowTop.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common.Resource;component/Style/ListBox/ListBox_None.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.Framework.Common.Resource;component/Style/ListBox/ListBox_None.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
...
@@ -37,9 +38,14 @@
...
@@ -37,9 +38,14 @@
<Grid Background="#ff12202d">
<Grid Background="#ff12202d">
<TextBlock Text="横转竖智能裁切系统" FontSize="12" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="横转竖智能裁切系统" FontSize="12" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<Button Command="{Binding Path=SettingCommand}" Style="{StaticResource Button_Setting}" Height="30"></Button>
<Button Command="{Binding Path=InitNavigation3DCommand}" ToolTip="初始化摇杆"
<Button Command="{Binding Path=MinCommand}" Style="{StaticResource Button_Min}" Height="30"></Button>
Style="{StaticResource Button_Navigation3D}" Height="30"></Button>
<Button Command="{Binding Path=CloseCommand}" Style="{StaticResource Button_Close}" Height="30"></Button>
<Button Command="{Binding Path=SettingCommand}" ToolTip="系统设置"
Style="{StaticResource Button_Setting}" Height="30"></Button>
<Button Command="{Binding Path=MinCommand}" ToolTip="最小化"
Style="{StaticResource Button_Min}" Height="30"></Button>
<Button Command="{Binding Path=CloseCommand}" ToolTip="关闭"
Style="{StaticResource Button_Close}" Height="30"></Button>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
<!-- 主体 -->
<!-- 主体 -->
...
...
VIZ.H2V.Module/NDIMainView/ViewModel/NDIMainViewModel.cs
View file @
17170478
...
@@ -12,6 +12,7 @@ using VIZ.H2V.Storage;
...
@@ -12,6 +12,7 @@ using VIZ.H2V.Storage;
using
VIZ.H2V.Domain
;
using
VIZ.H2V.Domain
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
Gma.System.MouseKeyHook
;
using
Gma.System.MouseKeyHook
;
using
System.Windows.Interop
;
namespace
VIZ.H2V.Module
namespace
VIZ.H2V.Module
{
{
...
@@ -56,7 +57,7 @@ namespace VIZ.H2V.Module
...
@@ -56,7 +57,7 @@ namespace VIZ.H2V.Module
this
.
MinCommand
=
new
VCommand
(
this
.
Min
);
this
.
MinCommand
=
new
VCommand
(
this
.
Min
);
this
.
CloseCommand
=
new
VCommand
(
this
.
Close
);
this
.
CloseCommand
=
new
VCommand
(
this
.
Close
);
this
.
SettingCommand
=
new
VCommand
(
this
.
Setting
);
this
.
SettingCommand
=
new
VCommand
(
this
.
Setting
);
this
.
KeyDownCommand
=
new
VCommand
<
KeyEventArgs
>(
this
.
KeyDown
);
this
.
InitNavigation3DCommand
=
new
VCommand
(
this
.
InitNavigation3D
);
}
}
/// <summary>
/// <summary>
...
@@ -225,22 +226,23 @@ namespace VIZ.H2V.Module
...
@@ -225,22 +226,23 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
KeyDownCommand
--
按键
命令
#
region
InitNavigation3DCommand
--
初始化
3D
鼠标
命令
/// <summary>
/// <summary>
///
按键
命令
///
初始化3D鼠标
命令
/// </summary>
/// </summary>
public
VCommand
<
KeyEventArgs
>
KeyDown
Command
{
get
;
set
;
}
public
VCommand
InitNavigation3D
Command
{
get
;
set
;
}
/// <summary>
/// <summary>
///
按键
///
初始化3D鼠标
/// </summary>
/// </summary>
/// <param name="e">按键事件</param>
private
void
InitNavigation3D
()
private
void
KeyDown
(
KeyEventArgs
e
)
{
{
string
hotkey
=
HotkeyHelper
.
GetHotkey
(
e
);
Navigation3DHelper
.
dispose_3D_Mouse
();
WindowInteropHelper
windowInteropHelper
=
new
WindowInteropHelper
(
this
.
GetWindow
());
bool
result
=
Navigation3DHelper
.
init_3D_Mouse
(
windowInteropHelper
.
Handle
);
Debug
.
WriteLine
(
hotkey
);
MessageBoxEx
.
ShowDialog
(
result
?
"摇杆初始化成功!"
:
"摇杆初始化失败!"
);
}
}
#
endregion
#
endregion
...
...
VIZ.H2V.Module/NDIView/Controller/Manual/ManualController.cs
View file @
17170478
...
@@ -82,7 +82,9 @@ namespace VIZ.H2V.Module
...
@@ -82,7 +82,9 @@ namespace VIZ.H2V.Module
Navigation3DMapping
mapping
=
mappingList
.
FirstOrDefault
(
p
=>
value
>=
p
.
MinValue
&&
value
<
p
.
MaxValue
);
Navigation3DMapping
mapping
=
mappingList
.
FirstOrDefault
(
p
=>
value
>=
p
.
MinValue
&&
value
<
p
.
MaxValue
);
if
(
mapping
==
null
)
if
(
mapping
==
null
)
{
return
0
;
return
0
;
}
return
(
int
)(
mapping
.
MappingValue
*
symbol
*
ApplicationDomainEx
.
Navigation3DMapping
.
Multiple
);
return
(
int
)(
mapping
.
MappingValue
*
symbol
*
ApplicationDomainEx
.
Navigation3DMapping
.
Multiple
);
}
}
...
...
VIZ.H2V/App.xaml.cs
View file @
17170478
...
@@ -39,6 +39,8 @@ namespace VIZ.H2V
...
@@ -39,6 +39,8 @@ namespace VIZ.H2V
AppSetup
.
AppendLoad
(
new
AppSetup_Monitor
());
AppSetup
.
AppendLoad
(
new
AppSetup_Monitor
());
// 初始化3D鼠标
// 初始化3D鼠标
AppSetup
.
AppendLoad
(
new
AppSetup_Navigation3D
());
AppSetup
.
AppendLoad
(
new
AppSetup_Navigation3D
());
// 调试窗口
//AppSetup.AppendLoad(new AppSetup_DebugWindow());
// 执行启动流程
// 执行启动流程
AppSetupContext
context
=
AppSetup
.
Setup
();
AppSetupContext
context
=
AppSetup
.
Setup
();
...
...
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