CDKET生成

This commit is contained in:
sc committed 2024-03-29 22:59:10 +08:00
commit 481d85d04a
10 files changed
+19 -6

No files matched your search

File renamed without changes.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

+1 -1
View File
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SUNLIGHT_CDKEY"
mc:Ignorable="d"
Title="MainWindow" Height="400" Width="600">
Title="SUNLIGHT_CDKEY" Height="400" Width="600">
<Grid>
<TextBlock HorizontalAlignment="Left" Height="40" Margin="20,10,0,0" TextWrapping="Wrap" Text="SN:" VerticalAlignment="Top" Width="170" FontSize="24"/>
<TextBox x:Name="sn_id" HorizontalAlignment="Left" Height="40" Margin="170,10,0,0" VerticalAlignment="Top" Width="340" FontSize="24"/>
+11 -4
View File
@@ -1,4 +1,5 @@
using System;
using formula_manage.UserClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -12,7 +13,6 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using SUNLIGHT_CDKEY.UserClass;
namespace SUNLIGHT_CDKEY
{
@@ -105,10 +105,17 @@ namespace SUNLIGHT_CDKEY
private void Button_Click(object sender, RoutedEventArgs e)
{
string a, b;
string a;
string b, my, mm, md;
if (sn_id.Text == "") return;
a= sn_id.Text.Substring(0, 6);
b=(2255-y).ToString()+(255-m).ToString()+(255-d).ToString();
my = Convert.ToString(Convert.ToInt32(2255 - y), 16).ToUpper();
mm = Convert.ToString(Convert.ToInt32(255 - m), 16).ToUpper();
md = Convert.ToString(Convert.ToInt32(255-d), 16).ToUpper();
b=my+mm+md;
cdk.Text = a + b + CRCcheck16.ToCRC16(CRCcheck16.StringToHexByte(b), true);
}
+7 -1
View File
@@ -33,6 +33,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>sunlight_logo.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -66,7 +69,7 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="UserClass\CRCcheck16.cs" />
<Compile Include="CRCcheck16.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -86,5 +89,8 @@
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="sunlight_logo.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB