HealthHelper/FrmMain.cs

(开头部分) 11KB

这里只显示每个文件的开头 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;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HealthHelper
{
    public partial class FrmMain : FrameForm
    {
        public FrmMain()
        {
            InitializeComponent();
        }
        ConfigJson configJson = null;

        private void FrmMain_Load(object sender, EventArgs e)
        {
            configJson = ConfigJsonFactory.LoadConfig();
            txt_Time.Text = configJson.WorkMinutes.ToString();
            btn_Switch.Checked = configJson.RestOpen;
            txt_Time.MinValue = uc_Meter.MinValue = configJson.MinWorkMinutes;
            txt_Time.MaxValue = uc_Meter.MaxValue = configJson.MaxWorkMinutes;
            new Thread(WorkThrd).Start();
        }

        AutoResetEvent waitEvent = new AutoResetEvent(false);

        private bool appRun = true;

        // 工作时长
        protected int WorkSecond
        {
            get
            {
                return configJson.WorkMinutes * 60;
            }
        }

        // 休息时长
        protected int RestSecond
        {
            get
            {
                return configJson.RestMinutes * 60;
            }
        }

        // 休息提醒秒
        protected int RestRemindSecond
        {
            get
            {
                return configJson.RestRemindSecond > 0 ? configJson.RestRemindSecond : 3;
            }
后面还有 307 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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