⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mynotes.cs

📁 事务提醒软件。自己写的事务提醒软件
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace MyNote
{
    public class MyNotes
    {
        //
        //public 
        //
        public Person mPerson;
        public MyEvent[] mEvents;
        //public bool[] mDoneWork;
        public event EventHandler Alert;
        public event EventHandler NewUpdateEvent;
        private DateTime mNowDate;
       
        public MyNotes(Person person,MyEvent[] Events)
        {
            //MessageBox.Show("MyNotes");
            int i;
            mPerson = person;
            mEvents = Events;
            //mDoneWork = new bool[Events.Length];
            //mDoneWork = state;
            //for (i = 0; i < Events.Length; i++)
            //{
            //    mDoneWork[i] = false;
            //}
            mNowDate = DateTime.Now;
        }
        public void NewDate()
        {
            //MessageBox.Show("mNowDate.Date.CompareTo(DateTime.Now.Date)="+mNowDate.Date.CompareTo(DateTime.Now.Date).ToString());
            if (mNowDate.Date.CompareTo(DateTime.Now.Date) < 0)
            {
                if (Alert != null)
                {
                    mNowDate = DateTime.Now.AddDays(1);
                    Alert(this, new EventArgs());
                }
            }
        }

        public void NewEventUpdate()
        {
            if (NewUpdateEvent != null)
            {

                NewUpdateEvent(this, new EventArgs());
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -