Utils/EventService.cs

(开头部分) 14KB

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

using AppManager.Config;
using AppManager.Pojo;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace AppManager.Utils {
    /// <summary>
    /// 事件服务费类
    /// </summary>
    internal static class EventService {

        /// <summary>
        /// 右键定位文件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void BtnRightOpenFilePathClick(Object sender, EventArgs e) {
            var menuItem = (ToolStripMenuItem)sender;
            var section = (string)menuItem.Tag;
            var appSection = AppSections.GetAppBySection(section);
            if (null != appSection) {
                CliWrapUtils.CreateCli("explorer.exe", null, " /select," + appSection.App).Execute();
            } else {
                MessageBox.Show("项目未找到,请重启程序!");
            }
        }

        /// <summary>
        /// 右键刷新
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public static void BtnRightFreshClick(Object sender, EventArgs e) {
            var menuItem = (ToolStripMenuItem)sender;
            var section = (string)menuItem.Tag;
            var projectSection = AppSections.GetAppBySection(section);
            if (null != projectSection) {
                // 刷新bat文件
                Configs.mainForm.CheckSection(projectSection, true);
                TimerUtils.ShowOperateLabelMessage("刷新成功", Color.Green);
            } else {
                MessageBox.Show("项目未找到,请重启程序!");
            }
        }
        public static void GroupBtnRightFreshClick(Object sender, EventArgs e) {
            var menuItem = (ToolStripMenuItem)sender;
            var group = (string)menuItem.Tag;
            var projectSectionDic = AppSections.GetAllSectionDic();
            projectSectionDic.ToList().ForEach(dic => {
                if (null == dic.Value || Configs.AppRunStatSuccess == dic.Value.RunStat) return;
                if (dic.Value.Group.Equals(@group)) {
                    // 刷新bat文件
                    Configs.mainForm.CheckSection(dic.Value, true);

                }
            });
后面还有 253 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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