CZ_Power/FormMessage.cs

(开头部分) 4KB

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

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

namespace CZ_Power
{
    public partial class FormMessage : Form
    {
        public FormMessage(string msg,string caption,int button_count)
        {
            InitializeComponent();
            TxtMessage.Text = msg;
            this.Text = caption;
            this.TopMost = true;
            if (button_count == 1)
            {
                button2.Visible = false;
                button1.Location = new Point(144, 151);
            }
            int len = msg.Split('\n').Length;
            if (len > 5) 
            {
                TxtMessage.ScrollBars = ScrollBars.Vertical;
            }
        }
        public FormMessage()
        {
            InitializeComponent();
            this.TopMost = true;
        }        
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        public static void Show(string msg, string caption, int button_count)
        {
            FormMessage fm = new FormMessage(msg, caption, button_count);
            fm.Show();
        }
        public static void Show(string msg)
        {
            FormMessage fm = new FormMessage(msg, "提示信息", 1);
            fm.Show();
        }
        public static bool ShowDialog(string msg, string caption, int button_count)
        {
            FormMessage fm = new FormMessage(msg, caption, button_count);
            switch (fm.ShowDialog()) 
            {
                case DialogResult.OK:
                    return true;
                    break;
                case DialogResult.Cancel:
                    return false;
                    break;
                default:
后面还有 80 行代码,购买后查看完整代码

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

AI 解读

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

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