feat: 交互页面

master
Tongg 7 months ago
parent a85de96351
commit b0818f3caa
  1. 4
      Language/zh_CN.xaml
  2. BIN
      Resource/Images/UIResource/01-4-1.png
  3. BIN
      Resource/Images/UserControl/03-10.png
  4. BIN
      Resource/Images/UserControl/03-14-1.png
  5. BIN
      Resource/Images/UserControl/03-8-1.png
  6. BIN
      Resource/Images/UserControl/03-8-2.png
  7. BIN
      Resource/Images/UserControl/03-8.png
  8. BIN
      Resource/Images/UserControl/03-9.png
  9. BIN
      Resource/Images/ic_1000.png
  10. BIN
      Resource/Images/ic_500.png
  11. BIN
      Resource/Images/icon_200.png
  12. 20
      SparkClient.csproj
  13. 4
      SparkClient.sln.DotSettings.user
  14. 41
      Views/BaseWindow/BaseControl.xaml
  15. 87
      Views/BaseWindow/HomeWindow.xaml
  16. 7
      Views/BaseWindow/HomeWindow.xaml.cs
  17. 93
      Views/Configuration/ConfigMenuPage.xaml
  18. 2
      Views/Configuration/CutConfigPage.xaml
  19. 91
      Views/Dialog/MessageBox.xaml
  20. 124
      Views/Dialog/MessageBox.xaml.cs
  21. 72
      Views/UserControl/Viewport3D.xaml
  22. 5
      Views/UserControl/Viewport3D.xaml.cs

@ -140,7 +140,9 @@
<sys:String x:Key="SystemSettingModelSetPavilionColor">亭部主刻面颜色</sys:String>
<sys:String x:Key="SystemSettingModelSetLowerGirdleColor">下腰面颜色</sys:String>
<sys:String x:Key="SystemSettingModelSetCuletColor">底面颜色</sys:String>
<!-- 弹窗默认语言 -->
<sys:String x:Key="DialogConfirmDefaultTitle">确定</sys:String>
<sys:String x:Key="DialogCancelDefaultTitle">取消</sys:String>
<!-- 3D的右键菜单 -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@ -134,6 +134,26 @@
<Resource Include="Resource\Images\UIResource\01-6.png" />
<None Remove="Resource\Images\UIResource\01-7.png" />
<Resource Include="Resource\Images\UIResource\01-7.png" />
<None Remove="Resource\Images\ic_500.png" />
<Resource Include="Resource\Images\ic_500.png" />
<None Remove="Resource\Images\ic_1000.png" />
<Resource Include="Resource\Images\ic_1000.png" />
<None Remove="Resource\Images\icon_200.png" />
<Resource Include="Resource\Images\icon_200.png" />
<None Remove="Resource\Images\UIResource\01-4-1.png" />
<Resource Include="Resource\Images\UIResource\01-4-1.png" />
<None Remove="Resource\Images\UserControl\03-8.png" />
<Resource Include="Resource\Images\UserControl\03-8.png" />
<None Remove="Resource\Images\UserControl\03-8-1.png" />
<Resource Include="Resource\Images\UserControl\03-8-1.png" />
<None Remove="Resource\Images\UserControl\03-9.png" />
<Resource Include="Resource\Images\UserControl\03-9.png" />
<None Remove="Resource\Images\UserControl\03-10.png" />
<Resource Include="Resource\Images\UserControl\03-10.png" />
<None Remove="Resource\Images\UserControl\03-8-2.png" />
<Resource Include="Resource\Images\UserControl\03-8-2.png" />
<None Remove="Resource\Images\UserControl\03-14-1.png" />
<Resource Include="Resource\Images\UserControl\03-14-1.png" />
</ItemGroup>
<ItemGroup>

@ -15,6 +15,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEventRoute_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F96a561fe76144633acef44f09d0dcb8a825920_003Fb0_003F8f1a0289_003FEventRoute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEventToCommand_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F436b6c3e323d68842c9e251322f5d42b47569f7c925e63aa245dc65465d2843_003FEventToCommand_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEventTriggerBase_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffdc001c928464b80ad45ffa09b838a3a15e200_003Faf_003F9abbeb44_003FEventTriggerBase_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fbd1d5c50194fea68ff3559c160230b0ab50f5acf4ce3061bffd6d62958e2182_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExecutionContext_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F211e6f3b24fa438a92f1815153647ce2c8f908_003F35_003F053c62c1_003FExecutionContext_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFileSystem_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F4c69bf2d25bb4f2497b2dbd14727a7811308b0_003F9b_003F7ca26691_003FFileSystem_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AFile_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F211e6f3b24fa438a92f1815153647ce2c8f908_003F00_003Fb0994fb0_003FFile_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@ -27,6 +28,8 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJToken_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F58b0b7706a8be4f7160749424eb996a3f845a1682c3c7ac5e405a346a8c20f1_003FJToken_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMaterialVariable_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F68d37d16685244cf9996bf767117a771210200_003Fe1_003Fb1acf2fc_003FMaterialVariable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMeshGeometryModel3D_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F68d37d16685244cf9996bf767117a771210200_003Fb5_003Fc0ee0c0f_003FMeshGeometryModel3D_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMessageBox_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F476b8dbfd2cb40ab8ff230fdcda5e37081d20_003F0e_003F12425a46_003FMessageBox_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMessageBox_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ffdc001c928464b80ad45ffa09b838a3a15e200_003F55_003F1a844f6e_003FMessageBox_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARoutedEventArgs_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F1a88b4a860176dd5f825206bbebf3ee3d44ff3f058ceed9eb693c1eaa018_003FRoutedEventArgs_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARuntimeType_002ECoreCLR_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F955ec549fe664629353c3b5424b6ad6c7dfcec4ab59bae709ab962c228cf45_003FRuntimeType_002ECoreCLR_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AThrowHelper_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fcca5cfb955e146648d91eb22ffe4627a84930_003F7a_003F2d86be72_003FThrowHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@ -36,5 +39,6 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AUndoStack_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F85eb3e3af2ef415e8072243864dec55a97e00_003F18_003F3f9ef08f_003FUndoStack_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AWindow_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fd0db11e55b76dc7f234163f6cee32b297b8ddb591fb0b5cbad1b46ed17343e18_003FWindow_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXamlReader_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc82ad29b96d5485f88fa4f2ce6e6c019f60908_003F0b_003Fbba3a168_003FXamlReader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXamlReader_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F38ad98c9d60c1739a82dce92fa559af31b833496d8d3fba4a86361ff05bf017_003FXamlReader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003A_005F003CModule_005F003E_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe32fe72a9f26462ea51e007d0a63cbd252c00_003Fff_003F79504f9e_003F_005F003CModule_005F003E_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=9B346951_002D9ACB_002D4A13_002DB212_002D8C75AED24131_002Fd_003AViews_002Fd_003AGrading_002Ff_003AGradingResult_002Examl/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>

@ -7,6 +7,30 @@
mc:Ignorable="d"
Loaded="BaseControl_OnLoaded"
>
<Border.Resources>
<Style x:Key="CloseHoverImageStyle" TargetType="Image">
<!-- 默认图片 -->
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/02-3.png"/>
<Style.Triggers>
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-4-1.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="MiniszieHoverImageStyle" TargetType="Image">
<!-- 默认图片 -->
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/02-2.png"/>
<Style.Triggers>
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-3.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@ -30,14 +54,14 @@
</Grid.ColumnDefinitions>
<!-- 首位元素:图标 -->
<Image Grid.Column="0" Source="../../Resource/Images/UIResource/03-1-1.png"
Width="30" Height="50"
<Image Grid.Column="0" Source="../../Resource/Images/icon_200.png"
Width="50" Height="50"
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 0 5 0" />
<!-- 次位元素:标题 -->
<TextBlock Grid.Column="1" Text="{DynamicResource ProcName}"
VerticalAlignment="Center" FontWeight="Bold"
HorizontalAlignment="Left" FontSize="20" >
HorizontalAlignment="Left" FontSize="24" >
<TextBlock.Foreground>
<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
<GradientStop Color="#11ceff" Offset="0" />
@ -60,10 +84,9 @@
Width="40" Height="40"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Minimize_MouseEnter"
MouseLeave="Border_MouseLeave"
MouseLeftButtonDown="Minimize_Click">
<Image Source="../../Resource/Images/UIResource/02-2.png" Height="30"></Image>
<Image Style="{StaticResource MiniszieHoverImageStyle}" Height="40"></Image>
</Border>
</Button>
@ -72,11 +95,9 @@
Width="40" Height="40"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
Margin="10 0 "
MouseEnter="Border_Close_MouseEnter"
MouseLeave="Border_MouseLeave"
Margin="20 0 "
MouseLeftButtonDown="Close_Click">
<Image Source="../../Resource/Images/UIResource/02-3.png" Height="30"></Image>
<Image Style="{StaticResource CloseHoverImageStyle}" Height="40"></Image>
</Border>
</Grid>
</Grid>

@ -57,6 +57,29 @@
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<Style x:Key="CloseHoverImageStyle" TargetType="Image">
<!-- 默认图片 -->
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-4.png"/>
<Style.Triggers>
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-4-1.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="MiniszieHoverImageStyle" TargetType="Image">
<!-- 默认图片 -->
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-3.png"/>
<Style.Triggers>
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/02-2.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Resources>
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resource/Images/UIResource/01-bg.jpg" Stretch="UniformToFill" />
@ -64,11 +87,11 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="100"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Height="50" VerticalAlignment="Top" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<Grid Grid.Row="0" Height="100" VerticalAlignment="Top" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<!-- 顶部布局 -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -76,22 +99,43 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="20 0 5 0" Width="100">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="../../Resource/Images/icon_200.png"
Width="80" Height="80"
VerticalAlignment="Center" HorizontalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{DynamicResource ProcName}" Width="100"
VerticalAlignment="Center" FontWeight="Bold"
HorizontalAlignment="Left" FontSize="28"
TextAlignment="Center">
<TextBlock.Foreground>
<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
<GradientStop Color="#11ceff" Offset="0" />
<GradientStop Color="#0a699f" Offset="1" />
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
</Grid>
<!-- 首位元素:图标 -->
<Image Grid.Column="0" Source="../../Resource/Images/UIResource/03-1-1.png"
Width="30" Height="50"
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 0 5 0" />
<!-- <Image Grid.Column="0" Source="../../Resource/Images/icon_200.png" -->
<!-- Width="100" Height="100" -->
<!-- VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 10 5 0" /> -->
<!-- 次位元素:标题 -->
<TextBlock Grid.Column="1" Text="{DynamicResource ProcName}"
VerticalAlignment="Center" FontWeight="Bold"
HorizontalAlignment="Left" FontSize="20" >
<TextBlock.Foreground>
<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
<GradientStop Color="#11ceff" Offset="0" />
<GradientStop Color="#0a699f" Offset="1" />
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
<!-- <TextBlock Grid.Column="1" Text="{DynamicResource ProcName}" -->
<!-- VerticalAlignment="Center" FontWeight="Bold" -->
<!-- HorizontalAlignment="Left" FontSize="20" > -->
<!-- <TextBlock.Foreground> -->
<!-- <LinearGradientBrush StartPoint="1,0" EndPoint="1,1"> -->
<!-- <GradientStop Color="#11ceff" Offset="0" /> -->
<!-- <GradientStop Color="#0a699f" Offset="1" /> -->
<!-- </LinearGradientBrush> -->
<!-- </TextBlock.Foreground> -->
<!-- </TextBlock> -->
<!-- 末位元素:操作按钮 -->
<Grid Grid.Column="2" Width="260" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
@ -107,10 +151,9 @@
Width="40" Height="40"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Minimize_MouseEnter"
MouseLeave="Border_MouseLeave"
MouseLeftButtonDown="Minimize_Click">
<Image Source="../../Resource/Images/UIResource/01-3.png" Height="30"></Image>
<Image Style="{StaticResource MiniszieHoverImageStyle}" Height="40"></Image>
</Border>
</Button>
@ -119,11 +162,9 @@
Width="40" Height="40"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
Margin="10 0 "
MouseEnter="Border_Close_MouseEnter"
MouseLeave="Border_MouseLeave"
Margin="30 0 "
MouseLeftButtonDown="Close_Click">
<Image Source="../../Resource/Images/UIResource/01-4.png" Height="30"></Image>
<Image Style="{StaticResource CloseHoverImageStyle}" Height="40"></Image>
</Border>
</Grid>
</Grid>
@ -264,7 +305,7 @@
</Grid>
</Grid>
</Grid>
<Button Click="ButtonBase_OnClick">TEST BTN 1</Button>
</Grid>
</Border>

@ -3,6 +3,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using SparkClient.ViewModel.BaseWindow;
using MessageBox = SparkClient.Views.Dialog.MessageBox;
namespace SparkClient.Views.BaseWindow;
@ -117,4 +118,10 @@ public partial class HomeWindow
{
parentWindow = Window.GetWindow(this);
}
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
string sss;
var res = new MessageBox().ShowInput("heihei?", out sss);
}
}

@ -34,17 +34,41 @@
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<Style x:Key="CloseHoverImageStyle" TargetType="Image">
<!-- 默认图片 -->
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-4.png"/>
<Style.Triggers>
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-4-1.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="MiniszieHoverImageStyle" TargetType="Image">
<!-- 默认图片 -->
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-3.png"/>
<Style.Triggers>
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source -->
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True">
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/02-2.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Resources>
<Grid>
<Grid.Background>
<ImageBrush ImageSource="pack://application:,,,/Resource/Images/UIResource/08-bg.jpg" Stretch="UniformToFill" />
</Grid.Background>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="100"/>
<RowDefinition />
</Grid.RowDefinitions>
<Grid Grid.Row="0" Height="50" VerticalAlignment="Top" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<Grid Grid.Row="0" Height="100" VerticalAlignment="Top" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<!-- 顶部布局 -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@ -52,22 +76,44 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Margin="20 0 5 0" Width="100">
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="../../Resource/Images/icon_200.png"
Width="80" Height="80"
VerticalAlignment="Center" HorizontalAlignment="Center" />
<TextBlock Grid.Row="1" Text="{DynamicResource ProcName}" Width="100"
VerticalAlignment="Center" FontWeight="Bold"
HorizontalAlignment="Left" FontSize="28"
TextAlignment="Center">
<TextBlock.Foreground>
<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
<GradientStop Color="#11ceff" Offset="0" />
<GradientStop Color="#0a699f" Offset="1" />
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
</Grid>
<!-- 首位元素:图标 -->
<Image Grid.Column="0" Source="../../Resource/Images/UIResource/03-1-1.png"
Width="30" Height="50"
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 0 5 0" />
<!-- <Image Grid.Column="0" Source="../../Resource/Images/UIResource/03-1-1.png" -->
<!-- Width="30" Height="50" -->
<!-- VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 0 5 0" /> -->
<!-- 次位元素:标题 -->
<TextBlock Grid.Column="1" Text="{DynamicResource ProcName}"
VerticalAlignment="Center" FontWeight="Bold"
HorizontalAlignment="Left" FontSize="20" >
<TextBlock.Foreground>
<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
<GradientStop Color="#11ceff" Offset="0" />
<GradientStop Color="#0a699f" Offset="1" />
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
<!-- <TextBlock Grid.Column="1" Text="{DynamicResource ProcName}" -->
<!-- VerticalAlignment="Center" FontWeight="Bold" -->
<!-- HorizontalAlignment="Left" FontSize="20" > -->
<!-- <TextBlock.Foreground> -->
<!-- <LinearGradientBrush StartPoint="1,0" EndPoint="1,1"> -->
<!-- <GradientStop Color="#11ceff" Offset="0" /> -->
<!-- <GradientStop Color="#0a699f" Offset="1" /> -->
<!-- </LinearGradientBrush> -->
<!-- </TextBlock.Foreground> -->
<!-- </TextBlock> -->
<!-- 末位元素:操作按钮 -->
<Grid Grid.Column="2" Width="260" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
@ -83,10 +129,8 @@
Width="40" Height="40"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Minimize_MouseEnter"
MouseLeave="Border_MouseLeave"
MouseLeftButtonDown="Minimize_Click">
<Image Source="../../Resource/Images/UIResource/01-3.png" Height="30"></Image>
<Image Style="{StaticResource MiniszieHoverImageStyle}" Height="40"></Image>
</Border>
</Button>
@ -95,15 +139,16 @@
Width="40" Height="40"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
Margin="10 0 "
MouseEnter="Border_Close_MouseEnter"
MouseLeave="Border_MouseLeave"
Margin="30 0 "
MouseLeftButtonDown="Close_Click">
<Image Source="../../Resource/Images/UIResource/01-4.png" Height="30"></Image>
<Image Height="40" Style="{StaticResource CloseHoverImageStyle}"></Image>
</Border>
</Grid>
</Grid>
<!-- Source="../../Resource/Images/UIResource/01-4.png" -->
<!-- MouseEnter="Border_Close_MouseEnter" -->
<!-- MouseLeave="Border_MouseLeave" -->
<Border Grid.Row="1" Width="1090" Height="400" BorderBrush="Transparent" BorderThickness="1" CornerRadius="20">
<Grid>
@ -160,7 +205,7 @@
</Button.Triggers>
<TextBlock Foreground="Azure" FontWeight="Bold" FontSize="28"
Margin="0 125 0 0"
Text="{StaticResource LevelConfig}"/>
Text="{StaticResource AlgorithmConfig}"/>
</Button>
<Button Grid.Column="4" Padding="0" Width="250" Height="250" BorderBrush="Transparent"
RenderTransformOrigin="0.5, 0.5" RenderTransform="{StaticResource ButtonTranslateTransform}"

@ -22,7 +22,7 @@
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="添加 5 行" FontSize="14" FontFamily="PingFangSC-regular" TextAlignment="Left"
VerticalAlignment="Center" Width="70" />
<Image Grid.Column="1" Source="pack://application:,,,/Resource/Images/ze-add-o 1@3x.png" Width="24" Height="24"/>
<Image Grid.Column="1" Source="pack://application:,,,/Resource/Images/ze-add-o 1@3x.·· png" Width="24" Height="24"/>
</Grid>
</Button>
<DataGrid Grid.Row="1" ItemsSource="{Binding CutterInfos}" AutoGenerateColumns="False" CanUserAddRows="False">

@ -0,0 +1,91 @@
<Window x:Class="SparkClient.Views.Dialog.MessageBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SparkClient.Views.Dialog"
mc:Ignorable="d"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
Title="MessageBox" Height="Auto" Width="600">
<Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown">
<Border CornerRadius="20"
BorderThickness="1"
BorderBrush="LightGray"
Background="White">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Background="Transparent" BorderBrush="Transparent" Height="32" Width="32" Click="CloseButton_OnClick"
HorizontalAlignment="Right" Padding="0" Margin="0 0 15 0 " x:Name="CloseButton" >
<Image Source="../../Resource/Images/UIResource/01-8.png" Width="30" Height="30" />
</Button>
<TextBlock Grid.Row="1" Width="600" TextWrapping = "Wrap" Padding="30 0" HorizontalAlignment="Center"
VerticalAlignment="Center" TextAlignment="Center" FontSize="18" x:Name="TextBlockCenterBox" Margin="0 20"
/>
<Border Grid.Row="2" Width="500" Height="40" CornerRadius="20" BorderBrush="#ebeef5"
BorderThickness="1" Background="#ebeef5" x:Name="BorderInput" Margin="0 20">
<TextBox Width="500" BorderThickness="0" FontSize="18" HorizontalAlignment="Center"
Background="Transparent" Height="50" Padding="20 0"
VerticalAlignment="Center" TextAlignment="Center" x:Name="TextBoxInput"
/>
</Border>
<Grid Grid.Row="3" x:Name="GridButtons" Margin="0 20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button x:Name="ConfirmButton" Grid.Column="1" Padding="0" Margin="0" Height="50" Click="ConfirmButton_OnClick"
BorderThickness="0" Background="Transparent" FocusVisualStyle="{x:Null}">
<Border
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="0 0 0 0"
Padding="10, 10"
Width="120"
BorderThickness="0"
CornerRadius="20">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#40b1ff" Offset="0"/>
<GradientStop Color="#3c9ce6" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<TextBlock FontSize="18" x:Name="ConfirmButtonText" TextAlignment="Center" Foreground="#ffffff"></TextBlock>
</Border>
</Button>
<Button x:Name="CancelButton" Grid.Column="3" Padding="0" Margin="0" Height="50" Click="CancelButton_OnClick"
BorderThickness="0" Background="Transparent" FocusVisualStyle="{x:Null}">
<Border
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="0 0 0 0"
Padding="10, 10"
Width="120"
BorderThickness="0"
CornerRadius="20">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#a88ae4" Offset="0"/>
<GradientStop Color="#9072ca" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<TextBlock FontSize="18" x:Name="CancelButtonText" TextAlignment="Center" Foreground="#ffffff" />
</Border>
</Button>
</Grid>
</Grid>
</Border>
</Grid>
</Window>

@ -0,0 +1,124 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using SparkClient.Model.Helper;
namespace SparkClient.Views.Dialog;
public partial class MessageBox : Window
{
public MessageBox()
{
InitializeComponent();
WindowStartupLocation = WindowStartupLocation.CenterScreen;
}
private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (e.ButtonState == MouseButtonState.Pressed)
{
this.DragMove();
}
}
private int _showType = -1;
private bool _result = false;
public void Show(String message, String btnStr = "")
{
BorderInput.Visibility = Visibility.Hidden;
Grid.SetRow(GridButtons, 2);
CancelButton.Visibility = Visibility.Hidden;
Grid.SetColumn(ConfirmButton, 2);
TextBlockCenterBox.Text = message;
_showType = 0;
this.Height = 200;
if (!string.IsNullOrWhiteSpace(btnStr))
{
ConfirmButtonText.Text = btnStr;
}
else
{
ConfirmButtonText.Text = MultilingualHelper.getString("DialogConfirmDefaultTitle");
}
this.ShowDialog();
}
public MessageBoxResult ShowAsk(String message, String confirmButtonTitle = "", String cancelButtonTitle ="")
{
BorderInput.Visibility = Visibility.Hidden;
Grid.SetRow(GridButtons, 2);
_showType = 1;
this.Height = 250;
TextBlockCenterBox.Text = message;
if (!string.IsNullOrWhiteSpace(confirmButtonTitle) && !string.IsNullOrWhiteSpace(cancelButtonTitle))
{
ConfirmButtonText.Text = confirmButtonTitle;
CancelButtonText.Text = cancelButtonTitle;
}
else
{
ConfirmButtonText.Text = MultilingualHelper.getString("DialogConfirmDefaultTitle");
CancelButtonText.Text = MultilingualHelper.getString("DialogCancelDefaultTitle");
}
this.ShowDialog();
return _result==true ? MessageBoxResult.OK : MessageBoxResult.Cancel;
}
//
public MessageBoxResult ShowInput(String message, out String inputStr , String confirmButtonTitle = "", String cancelButtonTitle ="")
{
_showType = 2;
this.Height = 350;
TextBlockCenterBox.Text = message;
if (!string.IsNullOrWhiteSpace(confirmButtonTitle) && !string.IsNullOrWhiteSpace(cancelButtonTitle))
{
ConfirmButtonText.Text = confirmButtonTitle;
CancelButtonText.Text = cancelButtonTitle;
}
else
{
ConfirmButtonText.Text = MultilingualHelper.getString("DialogConfirmDefaultTitle");
CancelButtonText.Text = MultilingualHelper.getString("DialogCancelDefaultTitle");
}
this.ShowDialog();
inputStr = TextBoxInput.Text;
return _result==true ? MessageBoxResult.OK : MessageBoxResult.Cancel;
}
private void CloseButton_OnClick(object sender, RoutedEventArgs e)
{
this.Close();
}
private void ConfirmButton_OnClick(object sender, RoutedEventArgs e)
{
if (_showType == 0)
{
this.Close();
}else if (_showType == 1)
{
_result = true;
this.Close();
}else if (_showType == 2)
{
if (string.IsNullOrWhiteSpace(TextBoxInput.Text))
{
BorderInput.BorderBrush = Brushes.Red;
return;
}
else
{
_result = true;
this.Close();
}
}
}
private void CancelButton_OnClick(object sender, RoutedEventArgs e)
{
this.Close();
}
}

@ -26,70 +26,24 @@
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Background="Transparent" BorderBrush="Transparent" Height="50" Padding="2"
x:Name="BtnFrontView" Click="BtnAngle_OnClick">
<Border BorderThickness="1" CornerRadius="10" Padding="5">
<Border.Background>
<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
<GradientStop Color="#FF4C4D4F" Offset="0.0" />
</RadialGradientBrush>
</Border.Background>
<Image Source="pack://Application:,,,/Resource/Images/UserControl/zuanshi@3x.png" Width="30" Height="30"></Image>
</Border>
<Image Source="pack://Application:,,,/Resource/Images/UserControl/03-8.png" Width="40" Height="40"></Image>
</Button>
<Button Grid.Column="1" Background="Transparent" BorderBrush="Transparent" Height="50" Padding="2"
x:Name="BtnTopView" Click="BtnAngle_OnClick">
<Border BorderThickness="1" CornerRadius="10" Padding="5" >
<Border.Background>
<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
<GradientStop Color="#FF4C4D4F" Offset="0.0" />
</RadialGradientBrush>
</Border.Background>
<Image Source="pack://Application:,,,/Resource/Images/UserControl/Top@3x.png" Width="30" Height="30"></Image>
</Border>
x:Name="BtnFrontdView" Click="BtnAngle_OnClick">
<Image Source="pack://Application:,,,/Resource/Images/UserControl/03-8-1.png" Width="40" Height="40"></Image>
</Button>
<Button Grid.Column="2" Background="Transparent" BorderBrush="Transparent" Height="50" Padding="2"
x:Name="BtnBottomView" Click="BtnAngle_OnClick">
<Border BorderThickness="1" CornerRadius="10" Padding="5" >
<Border.Background>
<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
<GradientStop Color="#FF4C4D4F" Offset="0.0" />
</RadialGradientBrush>
</Border.Background>
<Image Source="pack://Application:,,,/Resource/Images/UserControl/Bottom@3x.png" Width="30" Height="30"></Image>
</Border>
x:Name="BtnTopView" Click="BtnAngle_OnClick">
<Image Source="pack://Application:,,,/Resource/Images/UserControl/03-9.png" Width="40" Height="40"></Image>
</Button>
<Button Grid.Column="3" Background="Transparent" BorderBrush="Transparent" Height="50" Padding="2"
x:Name="BtnFcuntion1View" Click="BtnFunction_OnClick">
<Border BorderThickness="1" CornerRadius="10" Padding="5" >
<Border.Background>
<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
<GradientStop Color="#FF4C4D4F" Offset="0.0" />
</RadialGradientBrush>
</Border.Background>
<Image Source="pack://Application:,,,/Resource/Images/UserControl/biaochi1@3x.png" Width="30" Height="30"></Image>
</Border>
x:Name="BtnBottomView" Click="BtnAngle_OnClick">
<Image Source="pack://Application:,,,/Resource/Images/UserControl/03-10.png" Width="40" Height="40"></Image>
</Button>
<Button Grid.Column="4" Background="Transparent" BorderBrush="Transparent" Height="50" Padding="2"
x:Name="BtnFcuntion2View" Click="BtnFunction_OnClick">
<Border BorderThickness="1" CornerRadius="10" Padding="5" >
<Border.Background>
<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
<GradientStop Color="#FF4C4D4F" Offset="0.0" />
</RadialGradientBrush>
</Border.Background>
<Image Source="pack://Application:,,,/Resource/Images/UserControl/biaochi2@3x.png" Width="30" Height="30"></Image>
</Border>
</Button>
<Button Grid.Column="5" Background="Transparent" BorderBrush="Transparent" Height="50" Padding="2"
x:Name="BtnFcuntion3View" Click="BtnFunction_OnClick">
<Border BorderThickness="1" CornerRadius="10" Padding="5" >
<Border.Background>
<RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5">
<GradientStop Color="#FF4C4D4F" Offset="0.0" />
</RadialGradientBrush>
</Border.Background>
<!-- <Image Source="pack://Application:,,,/Resource/Images/UserControl/biaochi2@3x.png" Width="30"></Image> -->
<Image Width="30" Height="30"></Image>
</Border>
<Image Source="pack://Application:,,,/Resource/Images/UserControl/03-8-2.png" Width="40" Height="40"></Image>
</Button>
</Grid>
<Border Grid.Row="1" x:Name="MainBorder">
@ -149,11 +103,11 @@
<Button Grid.Column="1" Grid.Row="0" Padding="0" Background="Transparent" BorderBrush="Transparent"
x:Name="BtnTop" Click="BtnDirection_OnClick">
<Image Source="../../Resource/Images/UserControl/arrow.png" />
<Image Source="../../Resource/Images/UserControl/03-14-1.png" />
</Button>
<Button Grid.Column="0" Grid.Row="1" Padding="0" Background="Transparent" BorderBrush="Transparent"
x:Name="BtnLeft" Click="BtnDirection_OnClick">
<Image Source="../../Resource/Images/UserControl/arrow.png" RenderTransformOrigin="0.5,0.5">
<Image Source="../../Resource/Images/UserControl/03-14-1.png" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform >
<RotateTransform Angle="-90" ></RotateTransform>
</Image.RenderTransform>
@ -161,7 +115,7 @@
</Button>
<Button Grid.Column="2" Grid.Row="1" Padding="0" Background="Transparent" BorderBrush="Transparent"
x:Name="BtnRight" Click="BtnDirection_OnClick">
<Image Source="../../Resource/Images/UserControl/arrow.png" RenderTransformOrigin="0.5,0.5">
<Image Source="../../Resource/Images/UserControl/03-14-1.png" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform >
<RotateTransform Angle="90" ></RotateTransform>
</Image.RenderTransform>
@ -169,7 +123,7 @@
</Button>
<Button Grid.Column="1" Grid.Row="2" Padding="0" Background="Transparent" BorderBrush="Transparent"
x:Name="BtnBottom" Click="BtnDirection_OnClick">
<Image Source="../../Resource/Images/UserControl/arrow.png" RenderTransformOrigin="0.5,0.5">
<Image Source="../../Resource/Images/UserControl/03-14-1.png" RenderTransformOrigin="0.5,0.5">
<Image.RenderTransform >
<RotateTransform Angle="180" ></RotateTransform>
</Image.RenderTransform>

@ -134,6 +134,11 @@ public partial class Viewport3D
camera.Position = new Point3D(center.X, center.Y + distance, center.Z); // 从顶部看,Y轴正方向
camera.UpDirection = new Vector3D(0, 0, 1);
break;
case "BtnFrontdView":
//测
camera.Position = new Point3D(center.X, center.Y, center.Z + distance); // 从前面看,Z轴正方向
camera.UpDirection = new Vector3D(0, 1, 0);
break;
}
camera.LookDirection = new Vector3D(center.X - camera.Position.X, center.Y - camera.Position.Y, center.Z - camera.Position.Z);

Loading…
Cancel
Save