diff --git a/UserClass/CRCcheck16.cs b/CRCcheck16.cs similarity index 100% rename from UserClass/CRCcheck16.cs rename to CRCcheck16.cs diff --git a/Logo/SUNLIGHT.ico b/Logo/SUNLIGHT.ico new file mode 100644 index 0000000..2e138f4 Binary files /dev/null and b/Logo/SUNLIGHT.ico differ diff --git a/Logo/sunlight_logo.ico b/Logo/sunlight_logo.ico new file mode 100644 index 0000000..2fe6131 Binary files /dev/null and b/Logo/sunlight_logo.ico differ diff --git a/Logo/sunlight_logo.jpg b/Logo/sunlight_logo.jpg new file mode 100644 index 0000000..1b98457 Binary files /dev/null and b/Logo/sunlight_logo.jpg differ diff --git a/Logo/sunlight_logotext.jpg b/Logo/sunlight_logotext.jpg new file mode 100644 index 0000000..fee7f29 Binary files /dev/null and b/Logo/sunlight_logotext.jpg differ diff --git a/Logo/sunlight_sc.png b/Logo/sunlight_sc.png new file mode 100644 index 0000000..5165ad8 Binary files /dev/null and b/Logo/sunlight_sc.png differ diff --git a/MainWindow.xaml b/MainWindow.xaml index cc20df3..6fd0ddf 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -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"> diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 161a8be..5f344b2 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -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); } diff --git a/SUNLIGHT_CDKEY.csproj b/SUNLIGHT_CDKEY.csproj index 8322ff6..e83d10f 100644 --- a/SUNLIGHT_CDKEY.csproj +++ b/SUNLIGHT_CDKEY.csproj @@ -33,6 +33,9 @@ prompt 4 + + sunlight_logo.ico + @@ -66,7 +69,7 @@ Code - + True True @@ -86,5 +89,8 @@ Settings.Designer.cs + + + \ No newline at end of file diff --git a/sunlight_logo.ico b/sunlight_logo.ico new file mode 100644 index 0000000..2fe6131 Binary files /dev/null and b/sunlight_logo.ico differ