Painter/App.xaml.cs

(完整代码) 1KB

using Painter.Component;
using Socks.Component.License;
using Socks.Platform.SDK;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace Painter
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            try
            {
                base.OnStartup(e);
                //for test
                new MainWindow().Show();
                return;

                //本地软件序列号获取--只是示例 实际可加密
                string license = XmlManage.GetConfigurationValue("License");

                //初始化平台SDK
                SocksAPI socks = SocksAPI.GetSDK("socks226d927dd9cf7c13", "7189055795204b535dbe1657578edda5");
                LicenseCheckHelper.CheckLicense(license, 90, new RegisterDelegate((a, b, s) =>{
                //序列号验证通过后 会进入该回调
                    if (b){
                        //本地软件序列号设置--只是示例 实际可加密
                        XmlManage.SetConfiguration("License", s);
                        MainWindow window = new MainWindow();
                        window.Show();
                    }
                }));
            }
            catch (Exception ex) {
                File.WriteAllText("error.log", ex.Message);
                Application.Current.Shutdown();
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。