diff --git a/CMWTAT_DIGITAL.sln b/CMWTAT_DIGITAL.sln new file mode 100644 index 0000000..0119cec --- /dev/null +++ b/CMWTAT_DIGITAL.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CMWTAT_DIGITAL", "CMWTAT_DIGITAL\CMWTAT_DIGITAL.csproj", "{961DE925-B82C-4515-8FBD-6805E36D1212}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {961DE925-B82C-4515-8FBD-6805E36D1212}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {961DE925-B82C-4515-8FBD-6805E36D1212}.Debug|Any CPU.Build.0 = Debug|Any CPU + {961DE925-B82C-4515-8FBD-6805E36D1212}.Release|Any CPU.ActiveCfg = Release|Any CPU + {961DE925-B82C-4515-8FBD-6805E36D1212}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {653ED007-6FEF-4A82-9898-F60578205F1C} + EndGlobalSection +EndGlobal diff --git a/CMWTAT_DIGITAL/App.xaml b/CMWTAT_DIGITAL/App.xaml new file mode 100644 index 0000000..e7f7e0f --- /dev/null +++ b/CMWTAT_DIGITAL/App.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + diff --git a/CMWTAT_DIGITAL/App.xaml.cs b/CMWTAT_DIGITAL/App.xaml.cs new file mode 100644 index 0000000..ac47f66 --- /dev/null +++ b/CMWTAT_DIGITAL/App.xaml.cs @@ -0,0 +1,17 @@ +using CMWTAT_DIGITAL; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Windows; + +namespace CMWTAT_KMS +{ + /// + /// App.xaml 的交互逻辑 + /// + public partial class App : Application + { + } +} diff --git a/CMWTAT_DIGITAL/CMWTAT.ico b/CMWTAT_DIGITAL/CMWTAT.ico new file mode 100644 index 0000000..42f687a Binary files /dev/null and b/CMWTAT_DIGITAL/CMWTAT.ico differ diff --git a/CMWTAT_DIGITAL/CMWTAT.png b/CMWTAT_DIGITAL/CMWTAT.png new file mode 100644 index 0000000..e0ebb76 Binary files /dev/null and b/CMWTAT_DIGITAL/CMWTAT.png differ diff --git a/CMWTAT_DIGITAL/CMWTAT_DIGITAL.csproj b/CMWTAT_DIGITAL/CMWTAT_DIGITAL.csproj new file mode 100644 index 0000000..7f10051 --- /dev/null +++ b/CMWTAT_DIGITAL/CMWTAT_DIGITAL.csproj @@ -0,0 +1,198 @@ + + + + + 10.0.10240.0 + Debug + AnyCPU + {961DE925-B82C-4515-8FBD-6805E36D1212} + WinExe + CMWTAT_DIGITAL + CMWTAT_DIGITAL + v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + app.manifest + + + CMWTAT.ico + + + CMWTAT_DIGITAL.Program + + + + ..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll + False + + + ..\packages\MaterialDesignThemes.2.5.0.1205\lib\net45\MaterialDesignThemes.Wpf.dll + False + + + ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll + False + + + + + + + + + + + + + + + 4.0 + + + + + + + + + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + + + + MainWindow.xaml + Code + + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + Designer + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + Res\MaterialDesignColors.dll + + + Res\MaterialDesignThemes.Wpf.dll + + + Res\Newtonsoft.Json.dll + + + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CMWTAT_DIGITAL/CMWTAT_DIGITAL.csproj.user b/CMWTAT_DIGITAL/CMWTAT_DIGITAL.csproj.user new file mode 100644 index 0000000..1aab52f --- /dev/null +++ b/CMWTAT_DIGITAL/CMWTAT_DIGITAL.csproj.user @@ -0,0 +1,20 @@ + + + + + + + + publish\ + + + + + + zh-CN + false + + + -l -%3f + + \ No newline at end of file diff --git a/CMWTAT_DIGITAL/Domain/IsSN.cs b/CMWTAT_DIGITAL/Domain/IsSN.cs new file mode 100644 index 0000000..3e5bbfe --- /dev/null +++ b/CMWTAT_DIGITAL/Domain/IsSN.cs @@ -0,0 +1,82 @@ +using System; +using System.Globalization; +using System.Text.RegularExpressions; +using System.Windows.Controls; + +namespace CMWTAT_DIGITAL.Domain +{ + class IsSN : ValidationRule + { + #region 匹配方法 + + /// + /// 验证字符串是否匹配正则表达式描述的规则 + /// + /// 待验证的字符串 + /// 正则表达式字符串 + /// 是否匹配 + public static bool IsMatch(string inputStr, string patternStr) + { + return IsMatch(inputStr, patternStr, false, false); + } + + /// + /// 验证字符串是否匹配正则表达式描述的规则 + /// + /// 待验证的字符串 + /// 正则表达式字符串 + /// 匹配时是否不区分大小写 + /// 是否匹配 + public static bool IsMatch(string inputStr, string patternStr, bool ifIgnoreCase) + { + return IsMatch(inputStr, patternStr, ifIgnoreCase, false); + } + + /// + /// 验证字符串是否匹配正则表达式描述的规则 + /// + /// 待验证的字符串 + /// 正则表达式字符串 + /// 匹配时是否不区分大小写 + /// 是否验证空白字符串 + /// 是否匹配 + public static bool IsMatch(string inputStr, string patternStr, bool ifIgnoreCase, bool ifValidateWhiteSpace) + { + if (!ifValidateWhiteSpace && string.IsNullOrEmpty(inputStr)) + return false;//如果不要求验证空白字符串而此时传入的待验证字符串为空白字符串,则不匹配 + Regex regex = null; + if (ifIgnoreCase) + regex = new Regex(patternStr, RegexOptions.IgnoreCase);//指定不区分大小写的匹配 + else + regex = new Regex(patternStr); + return regex.IsMatch(inputStr); + } + + #endregion + + public override ValidationResult Validate(object value, CultureInfo cultureInfo) + { + //Console.WriteLine("\""+value+"\""); + //return string.IsNullOrWhiteSpace((value ?? "").ToString()) + // ? new ValidationResult(false, "Key is required.") + // : ValidationResult.ValidResult; + + string pattern = @"^[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}$"; + + if (IsMatch((value ?? "").ToString(), pattern)) + { + return ValidationResult.ValidResult; + + } + else if (string.IsNullOrWhiteSpace((value ?? "").ToString())) + { + return new ValidationResult(false, "Please enter the key for the current edition."); + } + else + { + return new ValidationResult(false, "Invalid format."); + } + + } + } +} diff --git a/CMWTAT_DIGITAL/Domain/NotifyPropertyChangedExtension.cs b/CMWTAT_DIGITAL/Domain/NotifyPropertyChangedExtension.cs new file mode 100644 index 0000000..4d9a982 --- /dev/null +++ b/CMWTAT_DIGITAL/Domain/NotifyPropertyChangedExtension.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace CMWTAT_DIGITAL.Domain +{ + public static class NotifyPropertyChangedExtension + { + public static void MutateVerbose(this INotifyPropertyChanged instance, ref TField field, TField newValue, Action raise, [CallerMemberName] string propertyName = null) + { + if (EqualityComparer.Default.Equals(field, newValue)) return; + field = newValue; + raise?.Invoke(new PropertyChangedEventArgs(propertyName)); + } + } +} diff --git a/CMWTAT_DIGITAL/Domain/ViewModel.cs b/CMWTAT_DIGITAL/Domain/ViewModel.cs new file mode 100644 index 0000000..68d3228 --- /dev/null +++ b/CMWTAT_DIGITAL/Domain/ViewModel.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace CMWTAT_DIGITAL.Domain +{ + class ViewModel : INotifyPropertyChanged + { + private string _sn; + + public ViewModel() + { + LongListToTestComboVirtualization = new List(Enumerable.Range(0, 1000)); + } + + public string SN + { + get { return _sn; } + set + { + this.MutateVerbose(ref _sn, value, RaisePropertyChanged()); + } + } + + public IList LongListToTestComboVirtualization { get; } + + public event PropertyChangedEventHandler PropertyChanged; + + private Action RaisePropertyChanged() + { + return args => PropertyChanged?.Invoke(this, args); + } + } +} diff --git a/CMWTAT_DIGITAL/Lang/en.xaml b/CMWTAT_DIGITAL/Lang/en.xaml new file mode 100644 index 0000000..f1d933a --- /dev/null +++ b/CMWTAT_DIGITAL/Lang/en.xaml @@ -0,0 +1,213 @@ + + + + + + + + Roboto + + + + + + OK + + + Cancel + + + Refuse + + + Thanks developer and donate a dinner + + + Exit + + + Update Now + + + Ignore + + + CMWTAT Digital Edition + + + CMWTAT Digital Edition V2 + + + A new version available! + + + Current Version + + + Latest Version + + + Auto Mode + + + Manual Mode + + + Activate + + + Convert versions (Install Key without Activate) + + + Test Text + + + Loading + + + Activating + + + Complete + + + CloudMoe Windows 10 Activation Toolkit V2 + + + Running. + + + Experimental + + + Attention + + + System edition + + + Unable to correctly identify your operating system edition in support list, may be not be supported. + + + Only found experimental options that can be used with this operating system edition, little hope of activation success. + + + Your system edition may not be supported, program will exit. you can try add --expact or -e to startup. + + + Your system edition may not be supported, program will exit. + + + Unable to connect to server, Please check the network and try to try again later, program will exit. + + + Unable to connect to server, Please check the network and try to try again later, program will exit. + + + Converting + + + Activating + + + Getting Key via Internet + + + Getting Key via Internet + + + Uninstalling old Key + + + Uninstalling old Key + + + Uninstalling old Key (Experimental) + + + Installing Key + + + Installing Key + + + Getting edition code (Experimental) + + + Prepare for the next step (Experimental) + + + Writing feature of old Windows version + + + Getting free upgrade permissions + + + Cleaning changes + + + Getting digital license + + + Complete + + + Error + + + Code: + + + System return: + + + + + +This application now supports the use of console args to startup! -a --auto Auto activate. -h --hide Run with hide mode (Only be worked with -auto). -e --expact Experimental activation. -l --log Output log to file. -? --help Show this help Dialog. + + +Congratulation! Windows 10 has been successful converted. + + +Congratulation! Windows 10 has been successful activated. + + +We found a new version for CloudMoe Windows 10 Activation Toolkit Digital Edition. Please update to the latest version to make sure it works. + + +We found a new version for CloudMoe Windows 10 Activation Toolkit Digital Edition. And because your version is too old, so you MUST update to the latest version to make sure it works. + + +Activate Windows 10 requires a network to gets the product key :) + + +Cannot to uninstall old key. :( + + +Cannot to install key, may be you choose or enter a incorrect version. :( + + +Cannot to get edition code. :( + + +Cannot to install key, may be you choose or enter a incorrect version. :( + + +Time out, may be you choose or enter a incorrect version. :( + + +Activation Failed. :( Maybe: 1.This edition/version of Windows does not support digital license activation. 2. Unable to connect to Microsoft Windows Activation Server. 3. Other unexpected problems. You can try to wait a minute or try again later. + + +Only found Long-Term Offline KMS (LTOK) options that can be used with this operating system edition. This means that it will not be activate automatically after you reinstalled the system. But don't worry, this is different from the legacy KMS activation method (it can keep activating for 180 days in offline environment). LTOK (The prefix is Offline-KMS) can keep activating for up to 19 years even it is without networking! + + +Congratulation! Windows 10 is ready to activate. However, it seems that Windows cannot connect to the Microsoft Activation Server. Your system will be activated automatically the next time the server is connected. + + \ No newline at end of file diff --git a/CMWTAT_DIGITAL/Lang/ja.xaml b/CMWTAT_DIGITAL/Lang/ja.xaml new file mode 100644 index 0000000..f60cac9 --- /dev/null +++ b/CMWTAT_DIGITAL/Lang/ja.xaml @@ -0,0 +1,213 @@ + + + + + + + + Yu Gothic UI + + + + + + はい + + + キャンセル + + + リフューズ + + + 寄付します + + + 終了 + + + 今すぐアップデート + + + 無視する + + + 雲萌 Windows 10 デジタルライセンス認証アプリ + + + CMWTAT Digital Edition V2 + + + 新しいバージョンがあります! + + + バージョン + + + ラストバージョン + + + オートモード + + + マニュアルモード + + + 認証 + + + エディション変換 (キーをインストールするが、認証しません) + + + テストテキスト + + + ローディング + + + 認証中 + + + コンプリート + + + 雲萌 Windows 10 認証アプリ V2 + + + 実行中。 + + + 実験性 + + + 注意 + + + システムエディション + + + あなたのシステムエディションが判別できません、対応していないかもしれません。 + + + このシステムエディションに実験性オプションしか取れません、認証成功の可能性は極めて低い。 + + + あなたのシステムエディションは対応していないかもしれません。アプリは終了する。試して、--expactまたは-eを追加することでアプリ起動してください。 + + + あなたのシステムエディションは対応していないかもしれません。アプリは終了する。 + + + サーバーに接続できません、インターネット接続を確認するまたは後で試してください、アプリは終了します。 + + + サーバーに接続できません、インターネット接続を確認するまたは後で試してください、アプリは終了します。 + + + 変換中 + + + ライセンス認証中 + + + インターネットを通じてキーを取得しています + + + インターネットを通じてキーを取得しています + + + 以前のキーをアンインストールしています + + + 以前のキーをアンインストールしています + + + 以前のキーをアンインストールしています(実験性) + + + キーをインストールしています + + + キーをインストールしています + + + エディションコードを取得中(実験性) + + + 次のステップに準備しています(実験性) + + + 旧システムの特徴を書き込み中 + + + 無償アップグレード権限を取得中 + + + 変更がクリーンアップされます + + + デジタルライセンスを取得中 + + + コンプリート + + + エラー + + + コード: + + + システムメッセージ: + + + + + +このアプリは起動時にコンソール引数を使用できるようになりました! -a --auto 自動認証。 -h --hide 非表示モードで実行 (-autoと一緒に使用するだけ可能)。 -e --expact 実験性認証。 -l --log ログをファイルに出力。 -? --help この説明ダイアログボックスを表示する。 + + +おめでとう! Windows 10 エディション変換成功。 + + +おめでとう! Windows 10 認証成功。 + + +雲萌 Windows10 デジタルライセンス認証アプリの新しいバージョン発見しました。 最新バージョンにアップデートしてください。 + + +雲萌 Windows10 デジタルライセンス認証アプリの新しいバージョン発見しました。 アプリが古すぎるため、最新バージョンにアップデートしてから利用ください。 + + +Windows10ライセンス認証にはインターネットを通じてキーを取得する必要があります :) + + +以前のキーをアンインストールできません :( + + +キーをインストールできません、選択または入力されたエディションが間違っているかもしれません :( + + +エディションコードを取得できません :( + + +キーをインストールできません、選択または入力されたエディションが間違っているかもしれません :( + + +タイムアウト,選択または入力されたエディションが間違っているかもしれません :( + + +認証失敗。 :( 多分: 1. このエディション/バージョンの Windows はデジタルライセンス認証が適用しない。 2. マイクロソフトの認証サーバーに接続できません。 3. その他。 暫くお待ちくださいまたはあとでもう一度やり直してください。 + + +このシステムエディションに適用されたのは長期オフラインKMS(LTOK)オプションしか見つかりません。これによってシステムを再インストールした時自動的にライセンス認証しませんが、心配する必要はありません。この方法(LTOK)でライセンス認証後、インターネット接続なしでも最大19年間稼働を継続できます! + + +おめでとうございます! Windows 10はライセンス認証の準備が出来ています。 でも、マイクロソフトのライセンス認証サーバーに接続できませんみたいです。 システムは認証サーバーに接続出来る次第に自動的にライセンス認証します。 + + diff --git a/CMWTAT_DIGITAL/Lang/zh.xaml b/CMWTAT_DIGITAL/Lang/zh.xaml new file mode 100644 index 0000000..b686399 --- /dev/null +++ b/CMWTAT_DIGITAL/Lang/zh.xaml @@ -0,0 +1,213 @@ + + + + + + + + Microsoft YaHei UI + + + + + + 好 + + + 取消 + + + 丑拒 + + + 请顿晚饭,感谢作者 + + + 退出 + + + 立即更新 + + + 忽略 + + + 云萌 Windows 10 数字权利激活工具 + + + CMWTAT Digital Edition V2 + + + 新版本可用! + + + 当前版本 + + + 最新版本 + + + 自动模式 + + + 手动模式 + + + 激活 + + + 版本无缝转换 (安装产品密钥而不激活) + + + 测试文本 + + + 载入中 + + + 激活中 + + + 完成 + + + 云萌 Windows 10 激活工具 V2 + + + 运行中。 + + + 实验性 + + + 注意 + + + 系统版本 + + + 无法在支持列表里识别您的操作系统版本,可能不受支持。 + + + 只找到用于此版本系统的实验性选项,成功概率极低。 + + + 你的系统版本可能不受支持,程序即将退出。不过你可以尝试添加 --expact 或者 -e 参数来启动。 + + + 你的系统版本可能不受支持,程序即将退出。 + + + 无法连接服务器,请检查网络并尝试稍后重试,程序即将退出。 + + + 无法连接服务器,请检查网络并尝试稍后重试,程序即将退出。 + + + 转换中 + + + 激活中 + + + 正在通过网络获取产品密钥 + + + 正在通过网络获取产品密钥 + + + 正在卸载旧的产品密钥 + + + 正在卸载旧的产品密钥 + + + 正在卸载旧的产品密钥(实验性) + + + 正在安装产品密钥 + + + 正在安装产品密钥 + + + 正在获取版本代号(实验性) + + + 正在准备下一步(实验性) + + + 正在写入旧系统残留特征 + + + 正在获取免费升级许可 + + + 正在清理更改 + + + 正在获取数字许可证 + + + 完成 + + + 错误 + + + 代码: + + + 系统返回: + + + + + +这个应用现已支持通过控制台参数启动! -a --auto 自动激活。 -h --hide 隐藏模式运行 (只能与 -auto 一起使用)。 -e --expact 实验性激活。 -l --log 输出日志到文件。 -? --help 显示此说明对话框。 + + +祝贺! Windows 10 已经成功转换。 + + +祝贺! Windows 10 已经成功激活。 + + +我们发现了新版本的 云萌 Windows10 数字权利激活工具。 请更新到最新版本来确保它可以正常工作。 + + +我们发现了新版本的 云萌 Windows10 数字权利激活工具。 由于您的版本太旧,所以您必须更新到最新版本来确保它可以正常工作。 + + +激活Windows10需要网络获取产品密钥 :) + + +无法卸载旧密钥 :( + + +无法安装密钥,可能没有选择或输入正确的版本 :( + + +无法获取版本代号 :( + + +无法安装密钥,可能没有选择或输入正确的版本 :( + + +执行超时,可能没有选择正确或输入的版本 :( + + +激活失败。 :( 可能因为: 1. 此版本/类型的 Windows 不支持数字权利(数字许可证)方式激活。 2. 无法连接到微软Windows激活服务器。 3. 其它未知问题。 你可以尝试稍等片刻或者稍后重试。 + + +只找到用于此版本系统的长期离线KMS(批量激活)选项。 这表示您将不能在下次重装系统后自动激活。 不过无需担心,这不同于传统的KMS激活方式(离线状态下可以保持激活180天) 长期离线KMS(Offline-KMS)即使不联网也可以保持激活长达19年! + + +祝贺! Windows 10 已经快要激活成功了。 不过似乎Windows无法连接到微软激活服务器, 当下次连接上服务器时系统将会自动激活。 + + \ No newline at end of file diff --git a/CMWTAT_DIGITAL/MainWindow.xaml b/CMWTAT_DIGITAL/MainWindow.xaml new file mode 100644 index 0000000..2675932 --- /dev/null +++ b/CMWTAT_DIGITAL/MainWindow.xaml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +