UI/wPlatFrm.cs

(开头部分) 1KB

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

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TQ.UI
{
    public partial class wPlatFrm : Form
    {
        public wPlatFrm()
        {
            InitializeComponent();
        }

        public DialogResult ShowWin(string funcName, Point pnt)
        {
            //窗体位置设置为Location指定
            this.StartPosition = FormStartPosition.Manual;
            this.Location = pnt;
            //窗体名称
            this.Text = funcName.StartsWith("lb") ? funcName.Remove(0, 2) : funcName; 
            //初始化界面
            UserControl uc = GetFunctionalInterface(funcName);
            uc.Parent = this;
            uc.Dock = DockStyle.Fill;

            this.Show();
            return this.DialogResult;
        }

        #region Functional Interface Extension
        public virtual UserControl GetFunctionalInterface(string funcName)
        {
            switch (funcName)
            {
                //此处添加扩展:扩展名称对应主界面的标签名称

                case "lbExcelImport":
                    return new ToolKit.ucExcelImport();
                    break;
                case "lbQRCode":
                    return new ToolKit.ucQRCode();
                    break;
                case "lbTableAnalysis":
                    return new ToolKit.ucTableAnalysis();

                default:
                    return new ToolKit.ucTimeClock();
                    break;
            }
        }
        #endregion

        private void wPlatFrm_Load(object sender, EventArgs e)
        {
后面还有 4 行代码,解锁后查看完整代码

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

AI 解读

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

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