taskbarApp/Form1.cs

(开头部分) 3KB

这里只显示每个文件的开头 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;
using MaterialSkin;
using MaterialSkin.Controls;
namespace taskbarApp
{
    public partial class Form1 : MaterialForm
    {
        public Form1()
        {
            InitializeComponent();
            var materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.Green500, Primary.Green300, Primary.BlueGrey500, Accent.Green700, TextShade.WHITE);
        }

        /// <summary> /// 状态栏小图标的鼠标点击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> 
        private void nIcon_Click(object sender, MouseEventArgs e)
        {
            try
            {
                if (this.WindowState == FormWindowState.Minimized)//当程序是最小化的状态时显示程序页面 
                {
                    this.WindowState = FormWindowState.Normal;
                }
                this.Activate();
                this.Visible = true; this.ShowInTaskbar = true;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }

        private void toolStripMenuItemExit_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("你确定要关闭吗!", "提示信息", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
            if (result == DialogResult.OK) 
            { 
                this.Dispose();
                this.Close();
                 Application.Exit();
            } 

           
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            try {
                e.Cancel = true; 
                this.Visible = false; 
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message); 
后面还有 39 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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