DotNet.AuthorizeClient/SystemMethodInvoke.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace DotNet.AuthorizeClient
{
    /// <summary>
    /// 系统静态Invoke方法类
    /// </summary>
    internal static class SystemMethodInvoke
    {
        /// <summary>
        /// 设置注册码控件的值
        /// </summary>
        /// <typeparam name="TObject"></typeparam>
        /// <param name="objCtrl"></param>
        /// <param name="text"></param>
        /// <param name="winf"></param>
        public static void SetTextBoxRegistCodeText<TObject>(TObject objCtrl, string text, Form winf) where TObject : DotNet.Authorize.TextBoxRegistCode
        {
            if (objCtrl.InvokeRequired)
            {
                SystemDelegate.SetTextBoxRegistCodeTextCallback d = new SystemDelegate.SetTextBoxRegistCodeTextCallback(SetTextBoxRegistCodeText);

                if (winf.IsDisposed)
                {
                    return;
                }
                else
                {
                    if (objCtrl.IsHandleCreated)
                    {
                        winf.Invoke(d, new object[] { objCtrl, text, winf });
                    }
                }
            }
            else
            {
                objCtrl.Text = text;
            }
        }

        /// <summary>
        /// 设置控件的Text值
        /// </summary>
        /// <typeparam name="TObject"></typeparam>
        /// <param name="objCtrl"></param>
        /// <param name="text"></param>
        /// <param name="winf"></param>
        public static void SetText<TObject>(TObject objCtrl, string text, Form winf) where TObject : System.Windows.Forms.Control
        {
            if (objCtrl.InvokeRequired)
            {
                SystemDelegate.SetTextCallback d = new SystemDelegate.SetTextCallback(SetText);

                if (winf.IsDisposed)
                {
                    return;
                }
                else
后面还有 40 行代码,购买后查看完整代码

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

AI 解读 AI

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

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