Compare commits

..
6 Commits
Author SHA1 Message Date
sc 4e9fb61ff0 Merge branch 'master' of http://www.scserverddns.top:13000/sc/sunlight_cdkey 2024-03-29 23:16:53 +08:00
sc 1a7669f1bf key 2024-03-29 23:16:50 +08:00
sc 4e40658493 key 2024-03-29 23:15:46 +08:00
sc 608f121b5d key 2024-03-29 23:15:14 +08:00
sc 6b06bb643e key 2024-03-29 23:14:40 +08:00
sc 60bc8223b0 KEY 2024-03-29 23:14:20 +08:00
+6 -2
View File
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
@@ -108,7 +109,11 @@ namespace SUNLIGHT_CDKEY
string a;
string b, my, mm, md;
if (sn_id.Text == "") return;
if (sn_id.Text.Length <6)//id字节长度大于6有效
{
sn_id.BorderBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255,0, 0));
return;
}else sn_id.BorderBrush = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 255, 255, 255));
a= sn_id.Text.Substring(0, 6);
@@ -117,7 +122,6 @@ namespace SUNLIGHT_CDKEY
md = Convert.ToString(Convert.ToInt32(255-d), 16).ToUpper();
b=my+mm+md;
cdk.Text = a + b + CRCcheck16.ToCRC16(CRCcheck16.StringToHexByte(b), true);
}