master
Tongg 7 months ago
commit 0130c6638e
  1. 13
      .idea/.idea.SparkClient/.idea/.gitignore
  2. 4
      .idea/.idea.SparkClient/.idea/encodings.xml
  3. 8
      .idea/.idea.SparkClient/.idea/indexLayout.xml
  4. BIN
      .vs/ProjectEvaluation/sparkclient.metadata.v9.bin
  5. BIN
      .vs/ProjectEvaluation/sparkclient.projects.v9.bin
  6. BIN
      .vs/ProjectEvaluation/sparkclient.strings.v9.bin
  7. BIN
      .vs/SparkClient/DesignTimeBuild/.dtbcache.v2
  8. BIN
      .vs/SparkClient/FileContentIndex/3df9d661-aece-4bd5-845e-13139150ab57.vsidx
  9. BIN
      .vs/SparkClient/FileContentIndex/4284fedc-5c00-426c-a1ae-650edafc6a1a.vsidx
  10. BIN
      .vs/SparkClient/FileContentIndex/67248ceb-1d14-4efe-8d9b-5770628e1287.vsidx
  11. BIN
      .vs/SparkClient/v17/.futdcache.v2
  12. BIN
      .vs/SparkClient/v17/.suo
  13. 62
      .vs/SparkClient/v17/DocumentLayout.backup.json
  14. 62
      .vs/SparkClient/v17/DocumentLayout.json
  15. 34
      App.xaml
  16. 23
      App.xaml.cs
  17. 10
      AssemblyInfo.cs
  18. 34
      Language/en_US.xaml
  19. 38
      Language/zh_CN.xaml
  20. 150
      MainWindow.xaml
  21. 89
      MainWindow.xaml.cs
  22. 116
      Model/Helper/AESHelper.cs
  23. 91
      Model/Helper/Common.cs
  24. 35
      Model/Helper/DataBaseHelper.cs
  25. 47
      Model/Helper/Log4NetHelper.cs
  26. 19
      Model/Helper/MultilingualHelper.cs
  27. BIN
      Resource/Images/IGILogo.png
  28. BIN
      Resource/Images/homebg.png
  29. 25
      SparkClient - Backup.csproj
  30. 55
      SparkClient.csproj
  31. 16
      SparkClient.sln
  32. 9
      SparkClient.sln.DotSettings.user
  33. 39
      ViewModel/BaseViewModel.cs
  34. 32
      ViewModel/BaseWindow/BaseControlVM.cs
  35. 19
      ViewModel/BaseWindow/HomeWindowVM.cs
  36. 42
      ViewModel/BaseWindow/MainViewModel.cs
  37. 6
      ViewModel/HelperPageMV.cs
  38. 78
      Views/BaseWindow/BaseControl.xaml
  39. 39
      Views/BaseWindow/BaseControl.xaml.cs
  40. 73
      Views/BaseWindow/HomeWindow.xaml
  41. 12
      Views/BaseWindow/HomeWindow.xaml.cs
  42. 12
      Views/Configuration/AlgorithmConfigPage.xaml
  43. 11
      Views/Configuration/AlgorithmConfigPage.xaml.cs
  44. 11
      Views/Configuration/ConfigMenuPage.xaml
  45. 11
      Views/Configuration/ConfigMenuPage.xaml.cs
  46. 12
      Views/Configuration/CutConfigPage.xaml
  47. 11
      Views/Configuration/CutConfigPage.xaml.cs
  48. 11
      Views/Configuration/LevelConfigPage.xaml
  49. 11
      Views/Configuration/LevelConfigPage.xaml.cs
  50. 11
      Views/Grading/DiamondSelect.xaml
  51. 11
      Views/Grading/DiamondSelect.xaml.cs
  52. 12
      Views/Grading/GradingResult.xaml
  53. 11
      Views/Grading/GradingResult.xaml.cs
  54. 11
      Views/HelperPage.xaml
  55. 11
      Views/HelperPage.xaml.cs
  56. BIN
      bin/Debug/net8.0-windows/CommunityToolkit.Mvvm.dll
  57. BIN
      bin/Debug/net8.0-windows/HandyControl.dll
  58. BIN
      bin/Debug/net8.0-windows/Microsoft.Data.Sqlite.dll
  59. BIN
      bin/Debug/net8.0-windows/Newtonsoft.Json.dll
  60. BIN
      bin/Debug/net8.0-windows/SQLitePCLRaw.batteries_v2.dll
  61. BIN
      bin/Debug/net8.0-windows/SQLitePCLRaw.core.dll
  62. BIN
      bin/Debug/net8.0-windows/SQLitePCLRaw.provider.e_sqlcipher.dll
  63. BIN
      bin/Debug/net8.0-windows/SQLitePCLRaw.provider.e_sqlite3.dll
  64. 548
      bin/Debug/net8.0-windows/SparkClient.deps.json
  65. BIN
      bin/Debug/net8.0-windows/SparkClient.dll
  66. BIN
      bin/Debug/net8.0-windows/SparkClient.exe
  67. BIN
      bin/Debug/net8.0-windows/SparkClient.pdb
  68. 19
      bin/Debug/net8.0-windows/SparkClient.runtimeconfig.json
  69. BIN
      bin/Debug/net8.0-windows/SparkDB.db
  70. 0
      bin/Debug/net8.0-windows/SparkDBtemp.db
  71. BIN
      bin/Debug/net8.0-windows/en/HandyControl.resources.dll
  72. 21
      bin/Debug/net8.0-windows/log4net.config
  73. BIN
      bin/Debug/net8.0-windows/log4net.dll
  74. 48
      bin/Debug/net8.0-windows/logs/2024-11-20.log
  75. BIN
      bin/Debug/net8.0-windows/logs/history/2024-10.zip
  76. BIN
      bin/Debug/net8.0-windows/runtimes/browser-wasm/nativeassets/net8.0/e_sqlcipher.a
  77. BIN
      bin/Debug/net8.0-windows/runtimes/browser-wasm/nativeassets/net8.0/e_sqlite3.a
  78. BIN
      bin/Debug/net8.0-windows/runtimes/linux-arm/native/libe_sqlcipher.so
  79. BIN
      bin/Debug/net8.0-windows/runtimes/linux-arm/native/libe_sqlite3.so
  80. BIN
      bin/Debug/net8.0-windows/runtimes/linux-arm64/native/libe_sqlcipher.so
  81. BIN
      bin/Debug/net8.0-windows/runtimes/linux-arm64/native/libe_sqlite3.so
  82. BIN
      bin/Debug/net8.0-windows/runtimes/linux-armel/native/libe_sqlcipher.so
  83. BIN
      bin/Debug/net8.0-windows/runtimes/linux-armel/native/libe_sqlite3.so
  84. BIN
      bin/Debug/net8.0-windows/runtimes/linux-mips64/native/libe_sqlcipher.so
  85. BIN
      bin/Debug/net8.0-windows/runtimes/linux-mips64/native/libe_sqlite3.so
  86. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-arm/native/libe_sqlcipher.so
  87. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-arm/native/libe_sqlite3.so
  88. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-arm64/native/libe_sqlcipher.so
  89. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-arm64/native/libe_sqlite3.so
  90. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-s390x/native/libe_sqlcipher.so
  91. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-s390x/native/libe_sqlite3.so
  92. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-x64/native/libe_sqlcipher.so
  93. BIN
      bin/Debug/net8.0-windows/runtimes/linux-musl-x64/native/libe_sqlite3.so
  94. BIN
      bin/Debug/net8.0-windows/runtimes/linux-ppc64le/native/libe_sqlcipher.so
  95. BIN
      bin/Debug/net8.0-windows/runtimes/linux-ppc64le/native/libe_sqlite3.so
  96. BIN
      bin/Debug/net8.0-windows/runtimes/linux-s390x/native/libe_sqlcipher.so
  97. BIN
      bin/Debug/net8.0-windows/runtimes/linux-s390x/native/libe_sqlite3.so
  98. BIN
      bin/Debug/net8.0-windows/runtimes/linux-x64/native/libe_sqlcipher.so
  99. BIN
      bin/Debug/net8.0-windows/runtimes/linux-x64/native/libe_sqlite3.so
  100. BIN
      bin/Debug/net8.0-windows/runtimes/linux-x86/native/libe_sqlcipher.so
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,13 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# Rider 忽略的文件
/projectSettingsUpdater.xml
/.idea.SparkClient.iml
/modules.xml
/contentModel.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

Binary file not shown.

Binary file not shown.

@ -0,0 +1,62 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\WorkSpace\\spark\\SparkClient\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{9B346951-9ACB-4A13-B212-8C75AED24131}|SparkClient.csproj|d:\\workspace\\spark\\sparkclient\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
"RelativeMoniker": "D:0:0:{9B346951-9ACB-4A13-B212-8C75AED24131}|SparkClient.csproj|solutionrelative:mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 1,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedHeight": 343,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MainWindow.xaml",
"DocumentMoniker": "D:\\WorkSpace\\spark\\SparkClient\\MainWindow.xaml",
"RelativeDocumentMoniker": "MainWindow.xaml",
"ToolTip": "D:\\WorkSpace\\spark\\SparkClient\\MainWindow.xaml",
"RelativeToolTip": "MainWindow.xaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-11-19T03:06:02.497Z",
"EditorCaption": ""
}
]
},
{
"DockedHeight": 49,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{a80febb4-e7e0-4147-b476-21aaf2453969}"
}
]
}
]
}
]
}

@ -0,0 +1,62 @@
{
"Version": 1,
"WorkspaceRootPath": "D:\\WorkSpace\\spark\\SparkClient\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{9B346951-9ACB-4A13-B212-8C75AED24131}|SparkClient.csproj|d:\\workspace\\spark\\sparkclient\\mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}",
"RelativeMoniker": "D:0:0:{9B346951-9ACB-4A13-B212-8C75AED24131}|SparkClient.csproj|solutionrelative:mainwindow.xaml||{F11ACC28-31D1-4C80-A34B-F4E09D3D753C}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 1,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedHeight": 343,
"SelectedChildIndex": 2,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "MainWindow.xaml",
"DocumentMoniker": "D:\\WorkSpace\\spark\\SparkClient\\MainWindow.xaml",
"RelativeDocumentMoniker": "MainWindow.xaml",
"ToolTip": "D:\\WorkSpace\\spark\\SparkClient\\MainWindow.xaml",
"RelativeToolTip": "MainWindow.xaml",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|",
"WhenOpened": "2024-11-19T03:06:02.497Z",
"EditorCaption": ""
}
]
},
{
"DockedHeight": 49,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{a80febb4-e7e0-4147-b476-21aaf2453969}"
}
]
}
]
}
]
}

@ -0,0 +1,34 @@
<Application x:Class="SparkClient.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:SparkClient"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:baseWindow="clr-namespace:SparkClient.Views.BaseWindow"
xmlns:baseWindow1="clr-namespace:SparkClient.ViewModel.BaseWindow"
xmlns:views="clr-namespace:SparkClient.Views"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml"/>
<ResourceDictionary Source="pack://application:,,,/HandyControl;component/Themes/Theme.xaml"/>
<ResourceDictionary Source="/Language/en_US.xaml"/>
<ResourceDictionary Source="/Language/zh_CN.xaml"/>
</ResourceDictionary.MergedDictionaries>
<ResourceDictionary x:Key="zh-cn" Source="/Language/zh_CN.xaml"/>
<ResourceDictionary x:Key="en" Source="/Language/en_US.xaml"/>
<!-- V-VM全局映射 -->
<DataTemplate DataType="{x:Type baseWindow1:HomeWindowVM}">
<baseWindow:HomeWindow/>
</DataTemplate>
<DataTemplate DataType="{x:Type baseWindow1:BaseControlVM}">
<baseWindow:BaseControl/>
</DataTemplate>
<DataTemplate DataType="{x:Type baseWindow1:HelperPageMV}">
<views:HelperPage/>
</DataTemplate>
</ResourceDictionary>
</Application.Resources>
</Application>

@ -0,0 +1,23 @@
using System.Configuration;
using System.Data;
using System.IO;
using System.Windows;
using log4net.Config;
using SparkClient.Model.Helper;
namespace SparkClient;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
//加载日志配置文件
XmlConfigurator.Configure(new FileInfo("log4net.config"));
//运行是否需要归档
Log4NetHelper.ArchiveOldLogs();
}
}

@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

@ -0,0 +1,34 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=netstandard">
<!--Text-->
<sys:String x:Key="ProcName">Spark</sys:String>
<sys:String x:Key="StartTest">Start Test</sys:String>
<sys:String x:Key="Config">Configuration</sys:String>
<sys:String x:Key="Help">Help</sys:String>
<sys:String x:Key="DiamondSelect">Diamond Selection</sys:String>
<sys:String x:Key="DetectionResult">Detection Results</sys:String>
<sys:String x:Key="StartDetection">Starting detection, please wait</sys:String>
<sys:String x:Key="ImportModel">Import Template</sys:String>
<sys:String x:Key="Save">Update and Save</sys:String>
<sys:String x:Key="AddRow">Add {0} Rows</sys:String>
<sys:String x:Key="AlgorithmConfig">Algorithm Configuration</sys:String>
<sys:String x:Key="LevelConfig">Grading Configuration</sys:String>
<sys:String x:Key="CutConfig">Cut Configuration</sys:String>
<sys:String x:Key="ExitAsk">Do you want to exit the application?</sys:String>
<sys:String x:Key="ExitAskTitle">Exit Confirmation</sys:String>
<!--检测结果 报表-->
<sys:String x:Key="Avg">Average</sys:String>
<!--定级配置 报表-->
<sys:String x:Key="Demo2">Button</sys:String>
<!--算法配置 报表-->
<sys:String x:Key="Demo1">Button</sys:String>
</ResourceDictionary>

@ -0,0 +1,38 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=netstandard">
<!--Text-->
<sys:String x:Key="ProcName">星辉</sys:String>
<sys:String x:Key="StartTest">开始检测</sys:String>
<sys:String x:Key="Config">配置</sys:String>
<sys:String x:Key="Help">帮助</sys:String>
<sys:String x:Key="DiamondSelect">钻石选择</sys:String>
<sys:String x:Key="DetectionResult">检测结果</sys:String>
<sys:String x:Key="StartDetection">开始检测,请稍等</sys:String>
<sys:String x:Key="ImportModel">导入模板</sys:String>
<sys:String x:Key="Save">更新保存</sys:String>
<sys:String x:Key="AddRow">添加{0}行</sys:String>
<sys:String x:Key="AlgorithmConfig">算法配置</sys:String>
<sys:String x:Key="LevelConfig">定级配置</sys:String>
<sys:String x:Key="CutConfig">切工仪配置</sys:String>
<sys:String x:Key="ExitAsk">是否退出程序?</sys:String>
<sys:String x:Key="ExitAskTitle">是否退出</sys:String>
<sys:String x:Key="Yes">是</sys:String>
<sys:String x:Key="No">否</sys:String>
<sys:String x:Key="Cancel">取消</sys:String>
<sys:String x:Key="Confirm">确认</sys:String>
<!--检测结果 报表-->
<sys:String x:Key="Avg">平均</sys:String>
<!--定级配置 报表-->
<sys:String x:Key="Demo2">按钮</sys:String>
<!--算法配置 报表-->
<sys:String x:Key="Demo1">按钮</sys:String>
</ResourceDictionary>

@ -0,0 +1,150 @@
<hc:Window x:Class="SparkClient.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:baseWindow="clr-namespace:SparkClient.ViewModel.BaseWindow"
mc:Ignorable="d"
Title="{DynamicResource ProcName}"
ShowTitle="False"
WindowStyle="None"
ResizeMode="CanResizeWithGrip"
WindowStartupLocation="CenterScreen"
d:DesignHeight="800"
d:DesignWidth="1400"
MinHeight="400"
MinWidth="800"
WindowState="Maximized"
Loaded="MainWindow_OnLoaded"
Background="{DynamicResource SecondaryRegionBrush}">
<!-- ~1~ 自定义标题栏 @1@ -->
<!-- <hc:Window.NonClientAreaContent> -->
<!-- <Grid Height="50" Background="Aqua"> -->
<!-- <Grid.ColumnDefinitions> -->
<!-- <ColumnDefinition Width="Auto" /> -->
<!-- <ColumnDefinition Width="Auto" /> -->
<!-- <ColumnDefinition Width="*" /> -->
<!-- </Grid.ColumnDefinitions> -->
<!-- -->
<!-- ~1~ 图标 @1@ -->
<!-- <Image Source="Resource/Image/MenuIcon/app.png" -->
<!-- Width="40" Height="40" -->
<!-- VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0 10 0" /> -->
<!-- -->
<!-- ~1~ 窗口标题 @1@ -->
<!-- <TextBlock Grid.Column="1" Text="{DynamicResource ProcName}" -->
<!-- VerticalAlignment="Center" Foreground="Azure" -->
<!-- HorizontalAlignment="Left" FontSize="16" /> -->
<!-- </Grid> -->
<!-- </hc:Window.NonClientAreaContent> -->
<!-- 自定义标题栏背景 -->
<!-- <hc:Window.NonClientAreaBackground> -->
<!-- <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> -->
<!-- <GradientStop Color="#5b3615" Offset="0" /> -->
<!-- <GradientStop Color="#996a40" Offset="0.5" /> -->
<!-- <GradientStop Color="#5b3615" Offset="1" /> -->
<!-- </LinearGradientBrush> -->
<!-- </hc:Window.NonClientAreaBackground> -->
<!-- 内容区域 -->
<Grid Background="Aqua">
<Grid.RowDefinitions>
<RowDefinition Height="80"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Height="80" VerticalAlignment="Top">
<!-- 渐变背景 -->
<Grid.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#5b3615" Offset="0" />
<GradientStop Color="#996a40" Offset="0.5" />
<GradientStop Color="#5b3615" Offset="1" />
</LinearGradientBrush>
</Grid.Background>
<!-- 顶部布局 -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 首位元素:图标 -->
<Image Grid.Column="0" Source="Resource/Images/IGILogo.png"
Width="70" Height="70"
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 0 20 0" />
<!-- 次位元素:标题 -->
<TextBlock Grid.Column="1" Text="{StaticResource ResourceKey=ProcName}"
VerticalAlignment="Center" Foreground="Azure"
HorizontalAlignment="Left" FontSize="32" />
<!-- 末位元素:操作按钮 -->
<Grid Grid.Column="2" Width="260" HorizontalAlignment="Right">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 中文 -->
<TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center"
Text="中" Foreground="Azure" FontSize="24"/>
<!-- 英文 -->
<TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center"
Text="EN" Foreground="Azure" FontSize="24"/>
<!-- 最小化 -->
<Border Grid.Column="2"
Width="50" Height="70"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Minimize_MouseEnter"
MouseLeave="Border_MouseLeave"
MouseLeftButtonDown="Minimize_Click">
<Viewbox Stretch="Uniform">
<Path Data="{StaticResource WindowMinGeometry}"
Fill="Azure"
Stroke="Azure"
StrokeThickness="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="20 0 0 0"
Width="30" />
</Viewbox>
</Border>
<!-- 关闭 -->
<Border Grid.Column="3"
Width="50" Height="70"
HorizontalAlignment="Center" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Close_MouseEnter"
MouseLeave="Border_MouseLeave"
MouseLeftButtonDown="Close_Click">
<Viewbox Stretch="Uniform">
<Path Data="{StaticResource CloseGeometry}"
Fill="Azure"
Stroke="Azure"
StrokeThickness="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="20 0 0 0"
Width="30" />
</Viewbox>
</Border>
</Grid>
</Grid>
<!-- 窗口主体内容 -->
<ContentControl Grid.Row="1" Grid.Column="0" Content="{Binding CurrentViewModel}"/>
</Grid>
</hc:Window>

@ -0,0 +1,89 @@
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using HandyControl.Tools;
using log4net;
using log4net.Config;
using SparkClient.Model.Helper;
using SparkClient.ViewModel.BaseWindow;
using SparkClient.Views.BaseWindow;
namespace SparkClient;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow
{
private static readonly ILog Logger = LogManager.GetLogger(typeof(MainWindow));
public MainWindow()
{
InitializeComponent();
Logger.Info("Application started==================");
}
protected override void OnContentRendered(EventArgs e)
{
base.OnContentRendered(e);
DataContext = MainViewModel.Instance;
Logger.Debug("OnContentRendered -------");
}
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
{
//初始化
ConfigHelper.Instance.SetLang("en");
}
#region 重写窗体操作按钮
private void Border_Minimize_MouseEnter(object sender, MouseEventArgs e)
{
// 鼠标进入时更改背景色
if (sender is Border border)
{
border.Background = new SolidColorBrush(Color.FromArgb(50, 255, 255, 255));
}
}
private void Border_Close_MouseEnter(object sender, MouseEventArgs e)
{
// 鼠标进入时更改背景色
if (sender is Border border)
{
border.Background = new SolidColorBrush(Color.FromArgb(50, 255, 0, 0));
}
}
private void Border_MouseLeave(object sender, MouseEventArgs e)
{
// 鼠标离开时恢复背景色
if (sender is Border border)
{
border.Background = new SolidColorBrush(Colors.Transparent);
}
}
private void Minimize_Click(object sender, MouseButtonEventArgs e)
{
this.WindowState = WindowState.Minimized;
}
private void Close_Click(object sender, MouseButtonEventArgs e)
{
var message = MultilingualHelper.getString("ExitAsk");
var title = MultilingualHelper.getString("ExitAskTitle");
MessageBoxResult result = HandyControl.Controls.MessageBox.Show( message, title, MessageBoxButton.YesNo, MessageBoxImage.Question );
if (result == MessageBoxResult.Yes)
{
this.Close();
}
}
#endregion
}

@ -0,0 +1,116 @@
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace SparkClient.Model.Helper;
public class AESHelper
{
private static readonly int KeySize = 256; // AES-256
private static readonly int BlockSize = 128; // AES 块大小
/// <summary>
/// 加密字符串
/// </summary>
/// <param name="plainText">明文</param>
/// <param name="key">密钥</param>
/// <param name="iv">初始化向量</param>
/// <returns>加密后的 Base64 字符串</returns>
public static string Encrypt(string plainText, string key = Common.AesKey, string iv = Common.AesIV)
{
using (var aes = CreateAes(key, iv))
{
var encryptor = aes.CreateEncryptor();
var plainBytes = Encoding.UTF8.GetBytes(plainText);
var cipherBytes = PerformCryptography(plainBytes, encryptor);
return Convert.ToBase64String(cipherBytes);
}
}
/// <summary>
/// 解密字符串
/// </summary>
/// <param name="cipherText">密文(Base64 格式)</param>
/// <param name="key">密钥</param>
/// <param name="iv">初始化向量</param>
/// <returns>解密后的明文</returns>
public static string Decrypt(string cipherText, string key = Common.AesKey, string iv = Common.AesIV)
{
using (var aes = CreateAes(key, iv))
{
var decryptor = aes.CreateDecryptor();
var cipherBytes = Convert.FromBase64String(cipherText);
var plainBytes = PerformCryptography(cipherBytes, decryptor);
return Encoding.UTF8.GetString(plainBytes);
}
}
/// <summary>
/// 加密字节数组
/// </summary>
/// <param name="plainBytes">明文字节数组</param>
/// <param name="key">密钥</param>
/// <param name="iv">初始化向量</param>
/// <returns>加密后的字节数组</returns>
public static byte[] Encrypt(byte[] plainBytes, string key = Common.AesKey, string iv = Common.AesIV)
{
using (var aes = CreateAes(key, iv))
{
var encryptor = aes.CreateEncryptor();
return PerformCryptography(plainBytes, encryptor);
}
}
/// <summary>
/// 解密字节数组
/// </summary>
/// <param name="cipherBytes">密文字节数组</param>
/// <param name="key">密钥</param>
/// <param name="iv">初始化向量</param>
/// <returns>解密后的字节数组</returns>
public static byte[] Decrypt(byte[] cipherBytes, string key = Common.AesKey, string iv = Common.AesIV)
{
using (var aes = CreateAes(key, iv))
{
var decryptor = aes.CreateDecryptor();
return PerformCryptography(cipherBytes, decryptor);
}
}
/// <summary>
/// 创建 AES 实例
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">初始化向量</param>
/// <returns>AES 实例</returns>
private static Aes CreateAes(string key = Common.AesKey, string iv = Common.AesIV)
{
var aes = Aes.Create();
aes.KeySize = KeySize;
aes.BlockSize = BlockSize;
aes.Padding = PaddingMode.PKCS7;
aes.Mode = CipherMode.CBC; // 使用 CBC 模式
aes.Key = Encoding.UTF8.GetBytes(key.PadRight(KeySize / 8, '0')); // 密钥长度填充
aes.IV = Encoding.UTF8.GetBytes(iv.PadRight(BlockSize / 8, '0')); // IV 长度填充
return aes;
}
/// <summary>
/// 执行加密或解密
/// </summary>
/// <param name="data">输入数据</param>
/// <param name="cryptoTransform">加密或解密转换器</param>
/// <returns>处理后的数据</returns>
private static byte[] PerformCryptography(byte[] data, ICryptoTransform cryptoTransform)
{
using (var memoryStream = new MemoryStream())
{
using (var cryptoStream = new CryptoStream(memoryStream, cryptoTransform, CryptoStreamMode.Write))
{
cryptoStream.Write(data, 0, data.Length);
cryptoStream.FlushFinalBlock();
return memoryStream.ToArray();
}
}
}
}

@ -0,0 +1,91 @@
using System.Data;
using System.Reflection;
using Newtonsoft.Json;
namespace SparkClient.Model.Helper;
public class Common
{
public const string DatabasePwd = "DyumL4FvF6wVHWw";
public const string AesKey = "JbI36Snd3s+QjlOcz5dytgkL5W6OnFEV5ZNRg/OYp58=";
public const string AesIV = "QRYL9P9NcV9Uny29DqEBqg==";
public static readonly string BasePath = AppDomain.CurrentDomain.BaseDirectory;
public const string DataBaseFileName = "SparkDB.db";
public const string DataBaseTempFileName = "SparkDBtemp.db";
public const string DataBaseName = "SparkDB";
/// <summary>
/// 将 DataTable 转换为 JSON 字符串
/// </summary>
/// <param name="table">要转换的 DataTable</param>
/// <returns>JSON 字符串</returns>
public static string DataTableToJson(DataTable table)
{
if (table == null)
{
throw new ArgumentNullException(nameof(table), "DataTable cannot be null.");
}
return JsonConvert.SerializeObject(table, Formatting.Indented);
}
/// <summary>
/// 将 JSON 字符串转换为 DataTable
/// </summary>
/// <param name="json">要转换的 JSON 字符串</param>
/// <returns>还原的 DataTable</returns>
public static DataTable JsonToDataTable(string json)
{
if (string.IsNullOrEmpty(json))
{
throw new ArgumentNullException(nameof(json), "JSON string cannot be null or empty.");
}
return JsonConvert.DeserializeObject<DataTable>(json);
}
/// <summary>
/// 将 DataTable 转换为实体对象列表
/// </summary>
/// <typeparam name="T">目标实体类型</typeparam>
/// <param name="table">要转换的 DataTable</param>
/// <returns>实体对象列表</returns>
public static List<T> ConvertToEntityList<T>(DataTable table) where T : new()
{
if (table == null)
{
throw new ArgumentNullException(nameof(table), "DataTable cannot be null.");
}
var entityList = new List<T>();
// 获取实体类型的所有属性
var properties = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance);
foreach (DataRow row in table.Rows)
{
// 创建实体对象
var entity = new T();
foreach (var property in properties)
{
// 检查 DataTable 是否包含与属性名匹配的列
if (table.Columns.Contains(property.Name) && row[property.Name] != DBNull.Value)
{
// 设置实体属性值
property.SetValue(entity, Convert.ChangeType(row[property.Name], property.PropertyType));
}
}
entityList.Add(entity);
}
return entityList;
}
}

@ -0,0 +1,35 @@
using System.IO;
using Microsoft.Data.Sqlite;
namespace SparkClient.Model.Helper;
/// <summary>
/// SqLite工具类
/// </summary>
public class DataBaseHelper
{
//连接、查询、查询、关闭
public static void InitDataBase()
{
string databasePath = Path.Combine(Common.BasePath, Common.DataBaseTempFileName);
if (File.Exists(databasePath))
return;
else
File.Create(databasePath).Close();
var connection = new SqliteConnection(new SqliteConnectionStringBuilder("data source=" + databasePath)
{
Mode = SqliteOpenMode.ReadWriteCreate,
Password = Common.DatabasePwd
}.ToString());
connection.Open();
using (var command = new SqliteCommand($"ATTACH DATABASE '{Common.DataBaseFileName}' AS {Common.DataBaseName} KEY '{Common.DatabasePwd}';" +
$"SELECT sqlcipher_export('{Common.DataBaseName}');" +
$"DETACH DATABASE {Common.DataBaseName};", connection))
{
command.ExecuteNonQuery();
}
connection.Close();
}
}

@ -0,0 +1,47 @@
using System.IO;
using System.IO.Compression;
namespace SparkClient.Model.Helper;
public class Log4NetHelper
{
/// <summary>
/// 归档上月日志文件
/// </summary>
public static void ArchiveOldLogs()
{
string logDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");
string archiveDirectory = Path.Combine(logDirectory, "history");
// 确保归档目录存在
if (!Directory.Exists(archiveDirectory))
{
Directory.CreateDirectory(archiveDirectory);
}
// 获取上个月日期
DateTime now = DateTime.Now;
DateTime lastMonth = new DateTime(now.Year, now.Month, 1).AddMonths(-1);
string lastMonthPattern = lastMonth.ToString("yyyy-MM");
// 压缩文件路径
string zipFilePath = Path.Combine(archiveDirectory, $"{lastMonthPattern}.zip");
if (!File.Exists(zipFilePath))
{
// 创建压缩文件
using (var zipArchive = ZipFile.Open(zipFilePath, ZipArchiveMode.Create))
{
foreach (string file in Directory.GetFiles(logDirectory, $"{lastMonthPattern}-*.log"))
{
// 将日志文件添加到压缩包中
zipArchive.CreateEntryFromFile(file, Path.GetFileName(file));
File.Delete(file); // 删除源文件
}
}
}
Console.WriteLine($"Archived logs to {zipFilePath}");
}
}

@ -0,0 +1,19 @@
using System.Windows;
namespace SparkClient.Model.Helper;
/// <summary>
/// 多语言工具类
/// </summary>
public class MultilingualHelper
{
public static string getString(string key)
{
var result = Application.Current.TryFindResource(key);
if (result == null)
{
throw new NullReferenceException(key + " is not a valid key");
}
return (string)result;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="HandyControl" Version="3.5.1" />
<PackageReference Include="HandyControl.Lang.en" Version="3.5.1" />
<PackageReference Include="HandyControls.Lang.zh-CN" Version="3.5.3" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<None Remove="Resource\Images\IGILogo.png" />
<Resource Include="Resource\Images\IGILogo.png" />
</ItemGroup>
</Project>

@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="HandyControl" Version="3.5.1" />
<PackageReference Include="HandyControl.Lang.en" Version="3.5.1" />
<PackageReference Include="HandyControls.Lang.zh-CN" Version="3.5.3" />
<PackageReference Include="log4net" Version="3.0.3" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlcipher" Version="2.1.10" />
</ItemGroup>
<ItemGroup>
<None Remove="Resource\Images\IGILogo.png" />
<Resource Include="Resource\Images\IGILogo.png" />
<None Remove="Resource\Images\homebg.png" />
<Resource Include="Resource\Images\homebg.png" />
<None Update="log4net.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Page Update="Views\Configuration\AlgorithmConfigPage.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Configuration\ConfigMenuPage.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Configuration\CutConfigPage.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Views\Configuration\LevelConfigPage.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
</Project>

@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SparkClient", "SparkClient.csproj", "{9B346951-9ACB-4A13-B212-8C75AED24131}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9B346951-9ACB-4A13-B212-8C75AED24131}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B346951-9ACB-4A13-B212-8C75AED24131}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B346951-9ACB-4A13-B212-8C75AED24131}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B346951-9ACB-4A13-B212-8C75AED24131}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

@ -0,0 +1,9 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AButtonBase_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6412d4331611499aab4eb63809a2a83bf60910_003Ffb_003F3185652c_003FButtonBase_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AButton_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6412d4331611499aab4eb63809a2a83bf60910_003F94_003F46375460_003FButton_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_003AFrameworkElement_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F6412d4331611499aab4eb63809a2a83bf60910_003F07_003Fdab5922a_003FFrameworkElement_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_003ATriggerAction_002Ecs_002Fl_003AC_0021_003FUsers_003Ftongg_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F95b2fd5cb826a0d61aff88f87b258644cfe6df15959e521eb9d6cc8da70dc52_003FTriggerAction_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></wpf:ResourceDictionary>

@ -0,0 +1,39 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Input;
namespace SparkClient.ViewModel;
public class BaseViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string propertyName = null) {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public class RelayCommand : ICommand
{
private readonly Action<object> _execute;
private readonly Func<object, bool> _canExecute;
public RelayCommand(Action<object> execute, Func<object, bool> canExecute = null)
{
_execute = execute ?? throw new ArgumentNullException(nameof(execute));
_canExecute = canExecute;
}
public bool CanExecute(object parameter) => _canExecute == null || _canExecute(parameter);
public void Execute(object parameter) => _execute(parameter);
public event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySuggested -= value; }
}
}
}

@ -0,0 +1,32 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using HandyControl.Controls;
namespace SparkClient.ViewModel.BaseWindow;
public class BaseControlVM : BaseViewModel
{
string _windowTitle;
private Visibility _showFunctionButton;
private string _functionButtonIcon;
private Object _viewContent;
public string WindowTitle { get { return _windowTitle; } set { _windowTitle = value; OnPropertyChanged("WindowTitle"); } }
public Visibility ShowFunctionButton { get { return _showFunctionButton; } set { _showFunctionButton = value; OnPropertyChanged("ShowFunctionButton"); } }
public string FunctionButtonIcon { get { return _functionButtonIcon; } set { _functionButtonIcon = value; OnPropertyChanged("FunctionButtonIcon"); } }
public Object ViewControl { get { return _viewContent; } set { _viewContent = value; OnPropertyChanged("ViewControl"); } }
public object Content { get; }
public ICommand CloseCommand { get; }
public BaseControlVM(MainViewModel mainViewModel, object content)
{
Content = content;
CloseCommand = mainViewModel.ShowHomeCommand; // 返回 HomeWindow
}
}

@ -0,0 +1,19 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using HandyControl.Controls;
namespace SparkClient.ViewModel.BaseWindow;
public class HomeWindowVM : BaseViewModel
{
private readonly MainViewModel _mainViewModel;
public ICommand ShowHelperPageCommand => _mainViewModel.ShowHelperPageCommand;
public ICommand ShowSettingsPageCommand => _mainViewModel.ShowSettingsPageCommand;
public ICommand ShowProfilePageCommand => _mainViewModel.ShowProfilePageCommand;
public HomeWindowVM(MainViewModel mainViewModel)
{
_mainViewModel = mainViewModel;
}
}

@ -0,0 +1,42 @@
using System.Windows.Input;
using SparkClient.Views;
namespace SparkClient.ViewModel.BaseWindow;
public class MainViewModel: BaseViewModel
{
private static MainViewModel _instance;
public static MainViewModel Instance => _instance ??= new MainViewModel();
private object _currentViewModel;
public object CurrentViewModel
{
get => _currentViewModel;
set
{
_currentViewModel = value;
OnPropertyChanged();
}
}
public ICommand ShowHomeCommand { get; }
public ICommand ShowHelperPageCommand { get; }
public ICommand ShowSettingsPageCommand { get; }
public ICommand ShowProfilePageCommand { get; }
private MainViewModel()
{
// 初始化加载 HomeWindow
CurrentViewModel = new HomeWindowVM(this);
// 初始化命令
ShowHomeCommand = new RelayCommand(_ => CurrentViewModel = new HomeWindowVM(this));
ShowHelperPageCommand = new RelayCommand(_ => CurrentViewModel = new BaseControlVM(this, new HelperPage()));
// ShowSettingsPageCommand = new RelayCommand(_ => CurrentViewModel = new BaseControlVM(this, new SettingsPage()));
// ShowProfilePageCommand = new RelayCommand(_ => CurrentViewModel = new BaseControlVM(this, new ProfilePage()));
}
}

@ -0,0 +1,6 @@
namespace SparkClient.ViewModel.BaseWindow;
public class HelperPageMV
{
}

@ -0,0 +1,78 @@
<Border x:Class="SparkClient.Views.BaseWindow.BaseControl"
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:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d"
Margin="10" CornerRadius="10"
>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 模拟顶部标题栏 -->
<Grid Grid.Row="0" Background="#795C2A" Height="30">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 标题内容 -->
<TextBlock Grid.Column="0" Text="{Binding WindowTitle}"
VerticalAlignment="Center" Foreground="Azure"
HorizontalAlignment="Left" FontSize="16" Margin="10 0 0 0"/>
<!-- 按钮1 -->
<Border Grid.Column="1"
Width="30" Height="30"
HorizontalAlignment="Right" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Minimize_MouseEnter"
MouseLeave="Border_MouseLeave"
Visibility="{Binding ShowFunctionButton}">
<hc:Interaction.Triggers>
<hc:EventTrigger>
<hc:EventToCommand Command="{Binding CloseWindow}"></hc:EventToCommand>
</hc:EventTrigger>
</hc:Interaction.Triggers>
<Viewbox Stretch="Uniform">
<Path Data="{Binding FunctionButtonIcon}"
Fill="Azure"
Stroke="Azure"
StrokeThickness="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="20 0 0 0"
Width="30" />
</Viewbox>
</Border>
<!-- 关闭按钮 -->
<Border Grid.Column="2"
Width="30" Height="30"
HorizontalAlignment="Right" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Close_MouseEnter"
MouseLeave="Border_MouseLeave"
>
<hc:Interaction.Triggers>
<hc:EventTrigger>
<!-- <hc:EventToCommand Command="{Binding CloseWindow}" ></hc:EventToCommand> -->
<hc:EventToCommand Command="{Binding CloseCommand}" ></hc:EventToCommand>
</hc:EventTrigger>
</hc:Interaction.Triggers>
<Viewbox Stretch="Uniform">
<Path Data="{StaticResource CloseGeometry}"
Fill="Azure"
Stroke="Azure"
StrokeThickness="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="20 0 0 0"
Width="30" />
</Viewbox>
</Border>
</Grid>
<ContentControl Grid.Row="1" Grid.Column="0" Name="ContentMain" Content="{Binding Content}"/>
</Grid>
</Border>

@ -0,0 +1,39 @@
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using SparkClient.ViewModel.BaseWindow;
namespace SparkClient.Views.BaseWindow;
public partial class BaseControl
{
public BaseControl()
{
InitializeComponent();
}
private void Border_Minimize_MouseEnter(object sender, MouseEventArgs e)
{
// 鼠标进入时更改背景色
if (sender is Border border)
{
border.Background = new SolidColorBrush(Color.FromArgb(50, 255, 255, 255));
}
}
private void Border_Close_MouseEnter(object sender, MouseEventArgs e)
{
// 鼠标进入时更改背景色
if (sender is Border border)
{
border.Background = new SolidColorBrush(Color.FromArgb(50, 255, 0, 0));
}
}
private void Border_MouseLeave(object sender, MouseEventArgs e)
{
// 鼠标离开时恢复背景色
if (sender is Border border)
{
border.Background = new SolidColorBrush(Colors.Transparent);
}
}
}

@ -0,0 +1,73 @@
<Border x:Class="SparkClient.Views.BaseWindow.HomeWindow"
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:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:SparkClient.Views.BaseWindow"
xmlns:baseWindow="clr-namespace:SparkClient.ViewModel.BaseWindow"
mc:Ignorable="d"
>
<!-- Height="450" Width="800" -->
<Border.Background>
<ImageBrush ImageSource="pack://application:,,,/Resource/Images/homebg.png" Stretch="UniformToFill" />
</Border.Background>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 左侧占位 -->
<Grid Grid.Column="0"></Grid>
<!-- 右侧主内容 -->
<Grid Grid.Column="1" VerticalAlignment="Center" Height="800" Width="600">
<Grid.RowDefinitions>
<!-- 第一排 -->
<RowDefinition Height="8*" />
<!-- 第二排 -->
<RowDefinition Height="5*" />
</Grid.RowDefinitions>
<!-- 第一排按钮 -->
<Border Grid.Row="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="LightBlue">
<TextBlock Text="按钮 1" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" />
</Border>
<!-- 第二排两个按钮 -->
<Grid Grid.Row="1" Margin="0 10 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 第二排第一个按钮 -->
<Border Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="LightCoral">
<TextBlock Text="按钮 2" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" />
</Border>
<Border Grid.Column="1" Width="10" />
<!-- 第二排第二个按钮 -->
<Border Grid.Column="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="LightGreen">
<Button Content="帮助" VerticalAlignment="Center" HorizontalAlignment="Center"
Command="{Binding ShowHelperPageCommand}" >
</Button>
</Border>
</Grid>
</Grid>
</Grid>
</Border>

@ -0,0 +1,12 @@
using System.Windows.Controls;
using SparkClient.ViewModel.BaseWindow;
namespace SparkClient.Views.BaseWindow;
public partial class HomeWindow
{
public HomeWindow()
{
InitializeComponent();
}
}

@ -0,0 +1,12 @@
<Border x:Class="SparkClient.Views.Configuration.AlgorithmConfigPage"
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"
mc:Ignorable="d"
>
<Grid Background="Blue">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="80">算法配置</TextBlock>
</Grid>
</Border>

@ -0,0 +1,11 @@
using System.Windows.Controls;
namespace SparkClient.Views.Configuration;
public partial class AlgorithmConfigPage
{
public AlgorithmConfigPage()
{
InitializeComponent();
}
}

@ -0,0 +1,11 @@
<Border x:Class="SparkClient.Views.Configuration.ConfigMenuPage"
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"
mc:Ignorable="d" >
<Grid Background="Blue">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="80">配置菜单3个</TextBlock>
</Grid>
</Border>

@ -0,0 +1,11 @@
using System.Windows.Controls;
namespace SparkClient.Views.Configuration;
public partial class ConfigMenuPage
{
public ConfigMenuPage()
{
InitializeComponent();
}
}

@ -0,0 +1,12 @@
<Border x:Class="SparkClient.Views.Configuration.CutConfigPage"
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"
mc:Ignorable="d"
>
<Grid Background="Blue">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="80">切工仪配置</TextBlock>
</Grid>
</Border>

@ -0,0 +1,11 @@
using System.Windows.Controls;
namespace SparkClient.Views.Configuration;
public partial class CutConfigPage
{
public CutConfigPage()
{
InitializeComponent();
}
}

@ -0,0 +1,11 @@
<Border x:Class="SparkClient.Views.Configuration.LevelConfigPage"
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"
mc:Ignorable="d" >
<Grid Background="Blue">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="80">定级配置</TextBlock>
</Grid>
</Border>

@ -0,0 +1,11 @@
using System.Windows.Controls;
namespace SparkClient.Views.Configuration;
public partial class LevelConfigPage
{
public LevelConfigPage()
{
InitializeComponent();
}
}

@ -0,0 +1,11 @@
<Border x:Class="SparkClient.Views.Grading.DiamondSelect"
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.Grading"
mc:Ignorable="d">
<Grid Background="Blue">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="80">钻石选择</TextBlock>
</Grid>
</Border>

@ -0,0 +1,11 @@
using System.Windows.Controls;
namespace SparkClient.Views.Grading;
public partial class DiamondSelect
{
public DiamondSelect()
{
InitializeComponent();
}
}

@ -0,0 +1,12 @@
<Border x:Class="SparkClient.Views.Grading.GradingResult"
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.Grading"
mc:Ignorable="d"
>
<Grid Background="Blue">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="80">检测结果</TextBlock>
</Grid>
</Border>

@ -0,0 +1,11 @@
using System.Windows.Controls;
namespace SparkClient.Views.Grading;
public partial class GradingResult
{
public GradingResult()
{
InitializeComponent();
}
}

@ -0,0 +1,11 @@
<Border x:Class="SparkClient.Views.HelperPage"
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"
mc:Ignorable="d" >
<Grid Background="Blue">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="80">啊咦呦咦</TextBlock>
</Grid>
</Border>

@ -0,0 +1,11 @@
using System.Windows.Controls;
namespace SparkClient.Views;
public partial class HelperPage
{
public HelperPage()
{
InitializeComponent();
}
}

@ -0,0 +1,548 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"SparkClient/1.0.0": {
"dependencies": {
"CommunityToolkit.Mvvm": "8.3.2",
"HandyControl": "3.5.1",
"HandyControl.Lang.en": "3.5.1",
"HandyControls.Lang.zh-CN": "3.5.3",
"Microsoft.Data.Sqlite": "9.0.0",
"Newtonsoft.Json": "13.0.3",
"SQLitePCLRaw.bundle_e_sqlcipher": "2.1.10",
"log4net": "3.0.3"
},
"runtime": {
"SparkClient.dll": {}
}
},
"CommunityToolkit.Mvvm/8.3.2": {
"runtime": {
"lib/net8.0/CommunityToolkit.Mvvm.dll": {
"assemblyVersion": "8.3.0.0",
"fileVersion": "8.3.2.1"
}
}
},
"HandyControl/3.5.1": {
"runtime": {
"lib/net8.0/HandyControl.dll": {
"assemblyVersion": "3.5.1.0",
"fileVersion": "3.5.1.0"
}
}
},
"HandyControl.Lang.en/3.5.1": {
"resources": {
"lib/net8.0/en/HandyControl.resources.dll": {
"locale": "en"
}
}
},
"HandyControls.Lang.zh-CN/3.5.3": {
"resources": {
"lib/net8.0/zh-CN/HandyControl.resources.dll": {
"locale": "zh-CN"
}
}
},
"log4net/3.0.3": {
"dependencies": {
"System.Configuration.ConfigurationManager": "4.5.0"
},
"runtime": {
"lib/netstandard2.0/log4net.dll": {
"assemblyVersion": "3.0.3.0",
"fileVersion": "3.0.3.0"
}
}
},
"Microsoft.Data.Sqlite/9.0.0": {
"dependencies": {
"Microsoft.Data.Sqlite.Core": "9.0.0",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.10",
"SQLitePCLRaw.core": "2.1.10"
}
},
"Microsoft.Data.Sqlite.Core/9.0.0": {
"dependencies": {
"SQLitePCLRaw.core": "2.1.10"
},
"runtime": {
"lib/net8.0/Microsoft.Data.Sqlite.dll": {
"assemblyVersion": "9.0.0.0",
"fileVersion": "9.0.24.52902"
}
}
},
"Microsoft.NETCore.Platforms/2.0.0": {},
"Newtonsoft.Json/13.0.3": {
"runtime": {
"lib/net6.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.3.27908"
}
}
},
"SQLitePCLRaw.bundle_e_sqlcipher/2.1.10": {
"dependencies": {
"SQLitePCLRaw.lib.e_sqlcipher": "2.1.10",
"SQLitePCLRaw.provider.e_sqlcipher": "2.1.10"
},
"runtime": {
"lib/netstandard2.0/SQLitePCLRaw.batteries_v2.dll": {
"assemblyVersion": "2.1.10.2445",
"fileVersion": "2.1.10.2445"
}
}
},
"SQLitePCLRaw.bundle_e_sqlite3/2.1.10": {
"dependencies": {
"SQLitePCLRaw.lib.e_sqlite3": "2.1.10",
"SQLitePCLRaw.provider.e_sqlite3": "2.1.10"
}
},
"SQLitePCLRaw.core/2.1.10": {
"dependencies": {
"System.Memory": "4.5.3"
},
"runtime": {
"lib/netstandard2.0/SQLitePCLRaw.core.dll": {
"assemblyVersion": "2.1.10.2445",
"fileVersion": "2.1.10.2445"
}
}
},
"SQLitePCLRaw.lib.e_sqlcipher/2.1.10": {
"runtimeTargets": {
"runtimes/browser-wasm/nativeassets/net8.0/e_sqlcipher.a": {
"rid": "browser-wasm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-arm/native/libe_sqlcipher.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-arm64/native/libe_sqlcipher.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-armel/native/libe_sqlcipher.so": {
"rid": "linux-armel",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-mips64/native/libe_sqlcipher.so": {
"rid": "linux-mips64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-arm/native/libe_sqlcipher.so": {
"rid": "linux-musl-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-arm64/native/libe_sqlcipher.so": {
"rid": "linux-musl-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-s390x/native/libe_sqlcipher.so": {
"rid": "linux-musl-s390x",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-x64/native/libe_sqlcipher.so": {
"rid": "linux-musl-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-ppc64le/native/libe_sqlcipher.so": {
"rid": "linux-ppc64le",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-s390x/native/libe_sqlcipher.so": {
"rid": "linux-s390x",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-x64/native/libe_sqlcipher.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-x86/native/libe_sqlcipher.so": {
"rid": "linux-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/maccatalyst-arm64/native/libe_sqlcipher.dylib": {
"rid": "maccatalyst-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/maccatalyst-x64/native/libe_sqlcipher.dylib": {
"rid": "maccatalyst-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/osx-arm64/native/libe_sqlcipher.dylib": {
"rid": "osx-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/osx-x64/native/libe_sqlcipher.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm/native/e_sqlcipher.dll": {
"rid": "win-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/e_sqlcipher.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/e_sqlcipher.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/e_sqlcipher.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"SQLitePCLRaw.lib.e_sqlite3/2.1.10": {
"runtimeTargets": {
"runtimes/browser-wasm/nativeassets/net8.0/e_sqlite3.a": {
"rid": "browser-wasm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-arm/native/libe_sqlite3.so": {
"rid": "linux-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-arm64/native/libe_sqlite3.so": {
"rid": "linux-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-armel/native/libe_sqlite3.so": {
"rid": "linux-armel",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-mips64/native/libe_sqlite3.so": {
"rid": "linux-mips64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-arm/native/libe_sqlite3.so": {
"rid": "linux-musl-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-arm64/native/libe_sqlite3.so": {
"rid": "linux-musl-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-s390x/native/libe_sqlite3.so": {
"rid": "linux-musl-s390x",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-musl-x64/native/libe_sqlite3.so": {
"rid": "linux-musl-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-ppc64le/native/libe_sqlite3.so": {
"rid": "linux-ppc64le",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-s390x/native/libe_sqlite3.so": {
"rid": "linux-s390x",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-x64/native/libe_sqlite3.so": {
"rid": "linux-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/linux-x86/native/libe_sqlite3.so": {
"rid": "linux-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/maccatalyst-arm64/native/libe_sqlite3.dylib": {
"rid": "maccatalyst-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/maccatalyst-x64/native/libe_sqlite3.dylib": {
"rid": "maccatalyst-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/osx-arm64/native/libe_sqlite3.dylib": {
"rid": "osx-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/osx-x64/native/libe_sqlite3.dylib": {
"rid": "osx-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm/native/e_sqlite3.dll": {
"rid": "win-arm",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-arm64/native/e_sqlite3.dll": {
"rid": "win-arm64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x64/native/e_sqlite3.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "0.0.0.0"
},
"runtimes/win-x86/native/e_sqlite3.dll": {
"rid": "win-x86",
"assetType": "native",
"fileVersion": "0.0.0.0"
}
}
},
"SQLitePCLRaw.provider.e_sqlcipher/2.1.10": {
"dependencies": {
"SQLitePCLRaw.core": "2.1.10"
},
"runtime": {
"lib/net6.0-windows7.0/SQLitePCLRaw.provider.e_sqlcipher.dll": {
"assemblyVersion": "2.1.10.2445",
"fileVersion": "2.1.10.2445"
}
}
},
"SQLitePCLRaw.provider.e_sqlite3/2.1.10": {
"dependencies": {
"SQLitePCLRaw.core": "2.1.10"
},
"runtime": {
"lib/net6.0-windows7.0/SQLitePCLRaw.provider.e_sqlite3.dll": {
"assemblyVersion": "2.1.10.2445",
"fileVersion": "2.1.10.2445"
}
}
},
"System.Configuration.ConfigurationManager/4.5.0": {
"dependencies": {
"System.Security.Cryptography.ProtectedData": "4.5.0",
"System.Security.Permissions": "4.5.0"
}
},
"System.Memory/4.5.3": {},
"System.Security.AccessControl/4.5.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "2.0.0",
"System.Security.Principal.Windows": "4.5.0"
}
},
"System.Security.Cryptography.ProtectedData/4.5.0": {},
"System.Security.Permissions/4.5.0": {
"dependencies": {
"System.Security.AccessControl": "4.5.0"
}
},
"System.Security.Principal.Windows/4.5.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "2.0.0"
}
}
}
},
"libraries": {
"SparkClient/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"CommunityToolkit.Mvvm/8.3.2": {
"type": "package",
"serviceable": true,
"sha512": "sha512-m8EolE1A0Updj68WTsZSGI6VWb6mUqHPh7QFo0kt7+JPhYMNXRS1ch8TS/oITAdcxTLrwMOp3ku1KjeG1/Zdpg==",
"path": "communitytoolkit.mvvm/8.3.2",
"hashPath": "communitytoolkit.mvvm.8.3.2.nupkg.sha512"
},
"HandyControl/3.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-i2i0xrLev7F1MFnhf0DP1CNCdGw8hVJ0HJrI0kxRv02ZJgaAzLzDTgAXDPY8GAoD3aYnBLSgM74lBHZ844KQnQ==",
"path": "handycontrol/3.5.1",
"hashPath": "handycontrol.3.5.1.nupkg.sha512"
},
"HandyControl.Lang.en/3.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-7Tccm+99gQDqBRzLW4jEQH070usu7KuVIU1hcwd6TIyTwsKsIPBGGUZrrvc694s+7vhpCGmxvlcUt8dU5UQs/A==",
"path": "handycontrol.lang.en/3.5.1",
"hashPath": "handycontrol.lang.en.3.5.1.nupkg.sha512"
},
"HandyControls.Lang.zh-CN/3.5.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Nv/O6WAO3f/2bpFEri6s87VD2smKvfvh14YVprPiyrwSJfqgJeH28vQMqFTPnCF7h35Yl7mynLlwiIZ7N/kSNA==",
"path": "handycontrols.lang.zh-cn/3.5.3",
"hashPath": "handycontrols.lang.zh-cn.3.5.3.nupkg.sha512"
},
"log4net/3.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LAZBO0rHo4DM56GIt124NaXKo6LVZcfiuWVgODdUnhPNMzTOlRJWOEIXo8zVNLm426B+coDc4ocfTsTw7R7Zeg==",
"path": "log4net/3.0.3",
"hashPath": "log4net.3.0.3.nupkg.sha512"
},
"Microsoft.Data.Sqlite/9.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-lw6wthgXGx3r/U775k1UkUAWIn0kAT0wj4ZRq0WlhPx4WAOiBsIjgDKgWkXcNTGT0KfHiClkM+tyPVFDvxeObw==",
"path": "microsoft.data.sqlite/9.0.0",
"hashPath": "microsoft.data.sqlite.9.0.0.nupkg.sha512"
},
"Microsoft.Data.Sqlite.Core/9.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cFfZjFL+tqzGYw9lB31EkV1IWF5xRQNk2k+MQd+Cf86Gl6zTeAoiZIFw5sRB1Z8OxpEC7nu+nTDsLSjieBAPTw==",
"path": "microsoft.data.sqlite.core/9.0.0",
"hashPath": "microsoft.data.sqlite.core.9.0.0.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/2.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-VdLJOCXhZaEMY7Hm2GKiULmn7IEPFE4XC5LPSfBVCUIA8YLZVh846gtfBJalsPQF2PlzdD7ecX7DZEulJ402ZQ==",
"path": "microsoft.netcore.platforms/2.0.0",
"hashPath": "microsoft.netcore.platforms.2.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
"path": "newtonsoft.json/13.0.3",
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
},
"SQLitePCLRaw.bundle_e_sqlcipher/2.1.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aWxuhHZjE27/u1S8/mJ+wwvKY6qJ83PGODTiftTWOh41+tGjstwIpPPnyvuYyZ9JXQlnErkTvQZziBeamj0DVg==",
"path": "sqlitepclraw.bundle_e_sqlcipher/2.1.10",
"hashPath": "sqlitepclraw.bundle_e_sqlcipher.2.1.10.nupkg.sha512"
},
"SQLitePCLRaw.bundle_e_sqlite3/2.1.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UxWuisvZ3uVcVOLJQv7urM/JiQH+v3TmaJc1BLKl5Dxfm/nTzTUrqswCqg/INiYLi61AXnHo1M1JPmPqqLnAdg==",
"path": "sqlitepclraw.bundle_e_sqlite3/2.1.10",
"hashPath": "sqlitepclraw.bundle_e_sqlite3.2.1.10.nupkg.sha512"
},
"SQLitePCLRaw.core/2.1.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Ii8JCbC7oiVclaE/mbDEK000EFIJ+ShRPwAvvV89GOZhQ+ZLtlnSWl6ksCNMKu/VGXA4Nfi2B7LhN/QFN9oBcw==",
"path": "sqlitepclraw.core/2.1.10",
"hashPath": "sqlitepclraw.core.2.1.10.nupkg.sha512"
},
"SQLitePCLRaw.lib.e_sqlcipher/2.1.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IPLfZkNN9qnlk8IH7L4Z5xB0gWdQm4HCftZ2LVE54h17tRxjzUbwvx+3MfPE5nR/OgoeiQE2rsYycESXUekPMQ==",
"path": "sqlitepclraw.lib.e_sqlcipher/2.1.10",
"hashPath": "sqlitepclraw.lib.e_sqlcipher.2.1.10.nupkg.sha512"
},
"SQLitePCLRaw.lib.e_sqlite3/2.1.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-mAr69tDbnf3QJpRy2nJz8Qdpebdil00fvycyByR58Cn9eARvR+UiG2Vzsp+4q1tV3ikwiYIjlXCQFc12GfebbA==",
"path": "sqlitepclraw.lib.e_sqlite3/2.1.10",
"hashPath": "sqlitepclraw.lib.e_sqlite3.2.1.10.nupkg.sha512"
},
"SQLitePCLRaw.provider.e_sqlcipher/2.1.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-XH9rdwv2+vDdfDymKF49+o5s252L4gdCb4/volPO3IqRBlhIBWTpO7+bS3Ghgzv7Nqh36pgeUSQj3M33iuiRxg==",
"path": "sqlitepclraw.provider.e_sqlcipher/2.1.10",
"hashPath": "sqlitepclraw.provider.e_sqlcipher.2.1.10.nupkg.sha512"
},
"SQLitePCLRaw.provider.e_sqlite3/2.1.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-uZVTi02C1SxqzgT0HqTWatIbWGb40iIkfc3FpFCpE/r7g6K0PqzDUeefL6P6HPhDtc6BacN3yQysfzP7ks+wSQ==",
"path": "sqlitepclraw.provider.e_sqlite3/2.1.10",
"hashPath": "sqlitepclraw.provider.e_sqlite3.2.1.10.nupkg.sha512"
},
"System.Configuration.ConfigurationManager/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UIFvaFfuKhLr9u5tWMxmVoDPkFeD+Qv8gUuap4aZgVGYSYMdERck4OhLN/2gulAc0nYTEigWXSJNNWshrmxnng==",
"path": "system.configuration.configurationmanager/4.5.0",
"hashPath": "system.configuration.configurationmanager.4.5.0.nupkg.sha512"
},
"System.Memory/4.5.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"path": "system.memory/4.5.3",
"hashPath": "system.memory.4.5.3.nupkg.sha512"
},
"System.Security.AccessControl/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vW8Eoq0TMyz5vAG/6ce483x/CP83fgm4SJe5P8Tb1tZaobcvPrbMEL7rhH1DRdrYbbb6F0vq3OlzmK0Pkwks5A==",
"path": "system.security.accesscontrol/4.5.0",
"hashPath": "system.security.accesscontrol.4.5.0.nupkg.sha512"
},
"System.Security.Cryptography.ProtectedData/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wLBKzFnDCxP12VL9ANydSYhk59fC4cvOr9ypYQLPnAj48NQIhqnjdD2yhP8yEKyBJEjERWS9DisKL7rX5eU25Q==",
"path": "system.security.cryptography.protecteddata/4.5.0",
"hashPath": "system.security.cryptography.protecteddata.4.5.0.nupkg.sha512"
},
"System.Security.Permissions/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9gdyuARhUR7H+p5CjyUB/zPk7/Xut3wUSP8NJQB6iZr8L3XUXTMdoLeVAg9N4rqF8oIpE7MpdqHdDHQ7XgJe0g==",
"path": "system.security.permissions/4.5.0",
"hashPath": "system.security.permissions.4.5.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-U77HfRXlZlOeIXd//Yoj6Jnk8AXlbeisf1oq1os+hxOGVnuG+lGSfGqTwTZBoORFF6j/0q7HXIl8cqwQ9aUGqQ==",
"path": "system.security.principal.windows/4.5.0",
"hashPath": "system.security.principal.windows.4.5.0.nupkg.sha512"
}
}
}

@ -0,0 +1,19 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "8.0.0"
}
],
"configProperties": {
"MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": true
}
}
}

@ -0,0 +1,21 @@
<configuration>
<log4net>
<!-- 日志根配置 -->
<root>
<level value="DEBUG" /> <!-- 输出等级:DEBUG 及以上 -->
<appender-ref ref="RollingFileAppender" />
</root>
<!-- 滚动文件日志配置 -->
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/" /> <!-- 日志文件目录 -->
<appendToFile value="true" />
<rollingStyle value="Date" /> <!-- 按日期滚动 -->
<datePattern value="yyyy-MM-dd'.log'" /> <!-- 文件名格式 -->
<staticLogFileName value="false" /> <!-- 每日生成新文件 -->
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date - [%level][%thread][%logger]: %message%newline" />
</layout>
</appender>
</log4net>
</configuration>

@ -0,0 +1,48 @@
2024-11-20 08:51:04,021 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 08:51:04,761 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 10:50:51,808 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 10:50:52,201 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 10:53:02,345 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 10:53:02,712 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 10:53:47,904 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 10:53:48,271 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 11:24:10,389 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 11:24:10,826 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 11:25:03,553 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 11:25:04,001 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 11:27:13,090 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 11:27:13,625 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:22:33,538 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:22:33,985 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:24:40,428 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:24:40,835 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:25:12,654 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:25:13,175 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:27:05,614 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:27:06,043 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:29:14,968 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:29:15,429 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:42:48,472 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:42:48,818 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:46:30,417 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:46:30,774 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:58:12,954 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:58:13,296 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 13:59:22,868 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 13:59:23,287 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 14:00:19,011 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 14:00:19,401 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 14:00:35,011 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 14:00:35,447 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 14:09:00,077 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 14:09:01,081 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 14:47:13,835 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 14:47:14,395 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 14:52:40,414 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 14:52:40,935 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 14:59:25,851 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 14:59:26,280 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 15:00:17,401 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 15:00:21,562 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------
2024-11-20 15:27:50,895 - [INFO][1][SparkClient.MainWindow]: Application started==================
2024-11-20 15:27:55,949 - [DEBUG][1][SparkClient.MainWindow]: OnContentRendered -------

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save