Compare commits
6
Commits
b8878d4223
..
CDKEY
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e9fb61ff0 | ||
|
|
1a7669f1bf | ||
|
|
4e40658493 | ||
|
|
608f121b5d | ||
|
|
6b06bb643e | ||
|
|
60bc8223b0 |
+6
-2
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
@@ -108,7 +109,11 @@ namespace SUNLIGHT_CDKEY
|
|||||||
string a;
|
string a;
|
||||||
string b, my, mm, md;
|
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);
|
a= sn_id.Text.Substring(0, 6);
|
||||||
|
|
||||||
@@ -117,7 +122,6 @@ namespace SUNLIGHT_CDKEY
|
|||||||
md = Convert.ToString(Convert.ToInt32(255-d), 16).ToUpper();
|
md = Convert.ToString(Convert.ToInt32(255-d), 16).ToUpper();
|
||||||
b=my+mm+md;
|
b=my+mm+md;
|
||||||
|
|
||||||
|
|
||||||
cdk.Text = a + b + CRCcheck16.ToCRC16(CRCcheck16.StringToHexByte(b), true);
|
cdk.Text = a + b + CRCcheck16.ToCRC16(CRCcheck16.StringToHexByte(b), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user