mynotes.cs
来自「事务提醒软件。自己写的事务提醒软件」· CS 代码 · 共 57 行
CS
57 行
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 + =
减小字号Ctrl + -
显示快捷键?