个人日程管理系统设计报告
更新时间:2024-07-05 21:38:01 阅读量: 综合文库 文档下载
河南中医学院
《C#程序设计》课程设计报告
个人日程管理系统
院系: 信息技术学院 专业: 信息管理与信息系统专业 班级: 2011级 姓名:
指导教师: 完成日期: 2012年6月22日
1
设计题目:个人日程管理系统
1. 题目描述
个人日程管理系统需要满足用户对个人日程管理的需要,需要实现的功能如下:
1、实现个人日程的添加、删除、修改等基本功能;
2、实现日程的查询功能(按天、月、年查询或按照关键词查询); 3、实现日程的事件自动提前提醒功能; 4、实现日程的统计及打印功能。
2. 应用程序功能说明
2.1 个人日程管理系统共使用了6个windows窗体,分别是用户登录、用户注册、找回密码、提醒、添加和主窗体。
2.1.1 登录功能。用户输入用户名和密码,系统验证正确之后,进入系统。 2.1.2 用户注册。用户通过填写相关信息,注册个人账户。
2.1.3 找回密码。如果用户不慎丢失密码,系统可以通过注册时用户填写的相关信息,
帮助用户找回密码,方便用户使用。
2.1.4 提醒功能。进入系统后,会自动弹出提醒窗口,按照重要性分块显示用户当天
和明天的日程,使用户直观的看到要完成的日程。
2.1.5 添加功能。当用户选择添加功能时,会弹出该窗体,用户可以通过填写相关信
息进行日程的添加。
2.1.6 查询功能。用户进入主窗体后,可以选择按时间和重要性查询日程,当前显示
为当天、当月、当年日程,可以通过单选按钮查询最近三个时间段的日程。
2.1.7 删除功能。用户可以按照时间和重要性对日程进行删除。
2.1.8 修改功能。用户可以通过日程标题查询到要修改的日程,然后对相关日程进行
修改。
2.1.9 统计功能。用户在进行日程查询时,左侧显示的日程量即为日程的统计。
3. 源程序
3.1 Schedulel类代码:
using System;
using System.Collections.Generic; using System.Linq; using System.Text;
namespace smartSchedule {
class Schedule1 {
string strName;
string strPassword; string strEmail; string strEmailyu; string strQuestion;
2
string strAnswer; long longPhone; int intHour; int intMinute; int intDay; int intYear; int intMonth; string strPlace; string strTitle; string strRemind; string strImportant; string strRemark;
public string StrName {
get {
return strName; } set {
strName = value; } }
public string StrPassword {
get {
return strPassword; } set {
strPassword = value; } }
public string StrEmail {
get {
return strEmail; } set {
strEmail = value; } }
public string StrEmailyu {
get {
return strEmailyu; } set
3
{
strEmailyu = value; } }
public string StrQuestion {
get {
return strQuestion; } set {
strQuestion = value; } }
public string StrAnswer {
get {
return strAnswer; } set {
strAnswer = value; } }
public long LongPhone {
get {
return longPhone; } set {
longPhone = value; } }
public int IntDay {
get {
return intDay; } set {
intDay = value; } }
public int IntHour {
get {
return intHour;
4
} set {
intHour = value; } }
public int IntYear {
get {
return intYear; } set {
intYear = value; } }
public int IntMonth {
get {
return intMonth; } set {
intMonth = value; } }
public int IntMinute {
get {
return intMinute; } set {
intMinute = value; } }
public string StrPlace {
get {
return strPlace; } set {
strPlace = value; } }
public string StrTitle {
get
5
{
return strTitle; } set {
strTitle = value; } }
public string StrRemind {
get {
return strRemind; } set {
strRemind = value; } }
public string StrImportant {
get {
return strImportant; } set {
strImportant = value; } }
public string StrRemark {
get {
return strRemark; } set {
strRemark = value; } } } }
3.2 添加代码:
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq;
6
using System.Text;
using System.Windows.Forms;
namespace smartSchedule {
public partial class Add : Form {
public Add() {
InitializeComponent();
cbox_Important.SelectedItem = cbox_Important.Items[0]; cbox_Remind.SelectedItem = cbox_Remind.Items[0]; }
private void btn_Add_Click(object sender, EventArgs e) {
DialogResult dr = MessageBox.Show(\确定添加\, \提示\, MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dr == DialogResult.Yes) {
Schedule1 sch = new Schedule1(); sch.StrTitle = txt_Title.Text;
sch.IntHour = int.Parse(txt_Hour.Text);
sch.IntDay = int.Parse(dateTimePicker.Value.Day.ToString()); sch.IntYear =
int.Parse(dateTimePicker.Value.Year.ToString()); sch.IntMonth =
int.Parse(dateTimePicker.Value.Month.ToString());
sch.IntMinute = int.Parse(txt_Minute.Text); sch.LongPhone = long.Parse(txt_Phone.Text); sch.StrPlace = txt_Place.Text;
sch.StrImportant = cbox_Important.Text; sch.StrRemark = txt_Remark.Text; sch.StrRemind = cbox_Remind.Text; Schedule.AL_Schedule1.Add(sch); txt_Title.Text = \; txt_Hour.Text = \; txt_Minute.Text = \; txt_Place.Text = \; txt_Phone.Text = \;
cbox_Important.Text = \非常重要\; txt_Remark.Text = \;
cbox_Remind.Text = \不提醒\; } }
private void btn_Return_Click(object sender, EventArgs e) {
this.Close(); }
} }
7
3.3 找回密码代码:
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Windows.Forms;
namespace smartSchedule {
public partial class FindPassword : Form {
public FindPassword() {
InitializeComponent(); }
private void FindPassword_Load(object sender, EventArgs e) {
//cbox_Email.SelectedIndex = 0; //cbox_Problem.SelectedIndex = 0;
cbox_Emailyu2.SelectedItem = cbox_Emailyu2.Items[0]; cbox_Question2.SelectedItem = cbox_Question2.Items[0]; }
private void btn_OK_Click(object sender, EventArgs e) {
int a = 0;
string[] strName = System.IO.File.ReadAllLines(\); string[] strEmail = System.IO.File.ReadAllLines(\); string[] strEmailyu =
System.IO.File.ReadAllLines(\); string[] strPassword =
System.IO.File.ReadAllLines(\); string[] strAnswer =
System.IO.File.ReadAllLines(\); string[] strQuestion =
System.IO.File.ReadAllLines(\);
for (int i = 0; i < strName.Length; i++) {
if ((strName[i] == txt_Name2.Text && strEmail[i] == txt_Email2.Text && strEmailyu[i] == cbox_Emailyu2.Text)
|| (strName[i] == txt_Name2.Text && strAnswer[i] == txt_Answer2.Text && strQuestion[i] == cbox_Question2.Text)) {
MessageBox.Show(\您的密码是:\ + strPassword[i], \提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); Schedule sch = new Schedule();
8
sch.ShowDialog(); a = 1; break; } }
if (a == 0) {
MessageBox.Show(\找回密码失败!\); } }
private void btn_Return_Click(object sender, EventArgs e) {
this.Close(); } } }
3.4 登录注册代码:
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Windows.Forms; using System.Collections;
namespace smartSchedule {
public partial class Huanying : Form {
public Huanying() {
InitializeComponent(); }
private void lbl_Forget_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
Form findPassword = new FindPassword(); findPassword.Show(); }
private void btn_Register_Click(object sender, EventArgs e) {
Form register = new Register(); register.Show(); }
private void btn_OK_Click(object sender, EventArgs e)
9
{
int a = 0;
string [] A_strName =
System.IO.File.ReadAllLines(\); string [] A_strPassword =
System.IO.File.ReadAllLines(\);
for (int i = 0; i < A_strName.Length; i++) {
if (A_strName[i] == txt_Name1.Text && A_strPassword[i] == txt_Password1.Text) {
Schedule sch = new Schedule(); Schedule.h = this; sch.ShowDialog(); a = 1; break; } }
if (a == 0) {
MessageBox.Show(\密码错误!\); txt_Password1.Text = \; } } } }
3.5 提醒代码:
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Windows.Forms;
namespace smartSchedule {
public partial class Remind : Form {
public Remind() {
InitializeComponent(); }
private void Remind_Load(object sender, EventArgs e) {
int day = int.Parse(dateTimePicker1.Value.Day.ToString()); int month = int.Parse(dateTimePicker1.Value.Month.ToString());
int year = int.Parse(dateTimePicker1.Value.Year.ToString());
10
for (int i = 0; i < Schedule.AL_Schedule1.Count; i++) {
if (((Schedule1)Schedule.AL_Schedule1[i]).IntDay == day && ((Schedule1)Schedule.AL_Schedule1[i]).IntMonth == month && ((Schedule1)Schedule.AL_Schedule1[i]).IntYear == year) {
if (((Schedule1)Schedule.AL_Schedule1[i]).StrImportant == \非常重要\ && ((Schedule1)Schedule.AL_Schedule1[i]).StrRemind == \提醒\) {
lb_Everyimportant1.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).StrTitle);
lb_Everyimportant1.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).IntHour + \时\ + ((Schedule1)Schedule.AL_Schedule1[i]).IntMinute + \分\); }
if (((Schedule1)Schedule.AL_Schedule1[i]).StrImportant == \重要\ && ((Schedule1)Schedule.AL_Schedule1[i]).StrRemind == \提醒\) {
lb_Important1.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).StrTitle);
lb_Important1.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).IntHour + \时\ + ((Schedule1)Schedule.AL_Schedule1[i]).IntMinute + \分\); }
if (((Schedule1)Schedule.AL_Schedule1[i]).StrImportant == \不重要\ && ((Schedule1)Schedule.AL_Schedule1[i]).StrRemind == \提醒\) {
lb_Unimportant1.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).StrTitle);
lb_Unimportant1.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).IntHour + \时\ + ((Schedule1)Schedule.AL_Schedule1[i]).IntMinute + \分\); } }
if ((((Schedule1)Schedule.AL_Schedule1[i]).IntDay - day) == 1 && ((Schedule1)Schedule.AL_Schedule1[i]).IntMonth == month && ((Schedule1)Schedule.AL_Schedule1[i]).IntYear == year) {
if (((Schedule1)Schedule.AL_Schedule1[i]).StrImportant == \非常重要\ && ((Schedule1)Schedule.AL_Schedule1[i]).StrRemind == \提醒\) {
lb_everyImportant2.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).StrTitle);
lb_everyImportant2.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).IntHour + \时\ + ((Schedule1)Schedule.AL_Schedule1[i]).IntMinute + \分\); }
if (((Schedule1)Schedule.AL_Schedule1[i]).StrImportant == \重要\ && ((Schedule1)Schedule.AL_Schedule1[i]).StrRemind == \提醒\) {
11
lb_Important2.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).StrTitle);
lb_Important2.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).IntHour + \时\ + ((Schedule1)Schedule.AL_Schedule1[i]).IntMinute + \分\); }
if (((Schedule1)Schedule.AL_Schedule1[i]).StrImportant == \不重要\ && ((Schedule1)Schedule.AL_Schedule1[i]).StrRemind == \提醒\) {
lb_Unmportant2.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).StrTitle);
lb_Unmportant2.Items.Add(((Schedule1)Schedule.AL_Schedule1[i]).IntHour + \时\ + ((Schedule1)Schedule.AL_Schedule1[i]).IntMinute + \分\); } } }
}
private void btn_close_Click(object sender, EventArgs e) {
this.Close(); } } }
3.6 查询,删除,修改代码:
using System;
using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Windows.Forms; using System.Collections;
namespace smartSchedule {
public partial class Schedule : Form {
public Schedule() {
InitializeComponent();
cbox_Del_Important2.SelectedItem = cbox_Del_Important2.Items[0]; cbox_Important1.SelectedItem = cbox_Important1.Items[0]; cbox_Remind1.SelectedItem = cbox_Remind1.Items[0]; }
public static Huanying h;
public static ArrayList AL_Schedule1 = new ArrayList(); int day, year, month, s, j = 1;
private void Schedule_Load(object sender, EventArgs e)
12
{
day = int.Parse(dateTimePicker1.Value.Day.ToString()); year = int.Parse(dateTimePicker1.Value.Year.ToString()); month = int.Parse(dateTimePicker1.Value.Month.ToString()); gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = false;
gbox_Important.Visible = false; h.Hide();
dgv_schedule.ColumnCount = 9;
dgv_schedule.ColumnHeadersVisible = true; dgv_schedule.Columns[0].Name = \日程量\; dgv_schedule.Columns[1].Name = \标题\; dgv_schedule.Columns[2].Name = \日期\; dgv_schedule.Columns[3].Name = \时间\; dgv_schedule.Columns[4].Name = \地点\;
dgv_schedule.Columns[5].Name = \联系电话\; dgv_schedule.Columns[6].Name = \重要性\; dgv_schedule.Columns[7].Name = \提醒\; dgv_schedule.Columns[8].Name = \备注\; dgv_schedule.Columns[0].Width = 80; dgv_schedule.Columns[7].Width = 110; dgv_schedule.Columns[8].Width = 180; //读取数据
string[] A_longPhone =
System.IO.File.ReadAllLines(\);
string[] A_intHour = System.IO.File.ReadAllLines(\); string[] A_intMinute =
System.IO.File.ReadAllLines(\); string[] A_strPlace =
System.IO.File.ReadAllLines(\); string[] A_strTitle =
System.IO.File.ReadAllLines(\); string[] A_strRemind =
System.IO.File.ReadAllLines(\); string[]
A_strImportant=System.IO.File.ReadAllLines(\); string[] A_strRemark =
System.IO.File.ReadAllLines(\);
string[] A_intDay = System.IO.File.ReadAllLines(\); string[] A_intYear = System.IO.File.ReadAllLines(\); string[] A_intMonth =
System.IO.File.ReadAllLines(\);
for (int i = 0; i < A_strTitle.Length; i++) {
Schedule1 sch = new Schedule1(); sch.StrTitle = A_strTitle[i]; sch.StrPlace = A_strPlace[i];
sch.StrImportant = A_strImportant[i]; sch.StrRemind = A_strRemind[i]; sch.StrRemark = A_strRemark[i];
sch.LongPhone = long.Parse(A_longPhone[i]); sch.IntDay = int.Parse(A_intDay[i]);
13
sch.IntYear = int.Parse(A_intYear[i]); sch.IntMonth = int.Parse(A_intMonth[i]); sch.IntHour = int.Parse(A_intHour[i]);
sch.IntMinute = int.Parse(A_intMinute[i]); Schedule.AL_Schedule1.Add(sch); }
//日程提醒
Remind remind = new Remind(); remind.ShowDialog(); }
//树状图功能选择
private void tv_schedule_AfterSelect(object sender, TreeViewEventArgs e)
{
nudown_Day.Value = day; //日程添加
if (e.Node.Text.Trim() == \添加\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = false;
gbox_Important.Visible = false; dgv_schedule.Visible = true; Form add = new Add(); add.ShowDialog(); }
//退出系统
if (e.Node.Text.Trim() == \退出系统\) {
DialogResult dr = MessageBox.Show(\您是否要保存并退出系统? \, \提示\, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question); if (dr == DialogResult.Yes) {
//数据储存
string[] B_longPhone = new string[AL_Schedule1.Count]; string[] B_intHour = new string[AL_Schedule1.Count]; string[] B_intMinute = new string[AL_Schedule1.Count]; string[] B_intDay = new string[AL_Schedule1.Count]; string[] B_intYear = new string[AL_Schedule1.Count]; string[] B_intMonth = new string[AL_Schedule1.Count]; string[] B_strPlace = new string[AL_Schedule1.Count]; string[] B_strTitle = new string[AL_Schedule1.Count]; string[] B_strRemind = new string[AL_Schedule1.Count]; string[] B_strImportant = new string[AL_Schedule1.Count]; string[] B_strRemark = new string[AL_Schedule1.Count]; for (int i = 0; i < AL_Schedule1.Count; i++) {
B_longPhone[i] =
(((Schedule1)AL_Schedule1[i]).LongPhone).ToString(); B_intHour[i] =
(((Schedule1)AL_Schedule1[i]).IntHour).ToString();
14
B_intMinute[i] =
(((Schedule1)AL_Schedule1[i]).IntMinute).ToString(); B_intDay[i] =
(((Schedule1)AL_Schedule1[i]).IntDay).ToString(); B_intYear[i] =
(((Schedule1)AL_Schedule1[i]).IntYear).ToString(); B_intMonth[i] =
(((Schedule1)AL_Schedule1[i]).IntMonth).ToString(); B_strImportant[i] = ((Schedule1)AL_Schedule1[i]).StrImportant; B_strPlace[i] = ((Schedule1)AL_Schedule1[i]).StrPlace; B_strRemark[i] = ((Schedule1)AL_Schedule1[i]).StrRemark; B_strRemind[i] = ((Schedule1)AL_Schedule1[i]).StrRemind; B_strTitle[i] = ((Schedule1)AL_Schedule1[i]).StrTitle; }
System.IO.File.WriteAllLines(\, B_longPhone);
System.IO.File.WriteAllLines(\, B_intDay); System.IO.File.WriteAllLines(\, B_intYear); System.IO.File.WriteAllLines(\, B_intMonth);
System.IO.File.WriteAllLines(\, B_intHour); System.IO.File.WriteAllLines(\, B_intMinute);
System.IO.File.WriteAllLines(\, B_strPlace);
System.IO.File.WriteAllLines(\, B_strTitle);
System.IO.File.WriteAllLines(\, B_strRemind);
System.IO.File.WriteAllLines(\, B_strImportant);
System.IO.File.WriteAllLines(\, B_strRemark);
Application.Exit(); }
else if (dr == DialogResult.No) {
Application.Exit(); } else {
return; } }
//按日期查询
if (e.Node.Text.Trim() == \按日期查询\) {
15
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = true; gbox_Time.Text = \按月查询\; gbox_Important.Visible = false; rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = true; rbtn_Date2.Enabled = false; rbtn_Date3.Enabled = true; rbtn_Date2.Checked = true; nudown_Day.Visible = false; txt_Change.Visible = false; btn_Demand.Visible = false;
rbtn_Date1.Text = (month - 1).ToString() + \月\; rbtn_Date2.Text = month.ToString() + \月\;
rbtn_Date3.Text = (month + 1).ToString() + \月\; dgv_schedule.Visible = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntMonth == month && ((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//按天查询
if (e.Node.Text.Trim() == \按天查询\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = true; gbox_Time.Text = \按天查询\; gbox_Important.Visible = false; rbtn_Date1.Visible = false; rbtn_Date2.Visible = false; rbtn_Date3.Visible = false; nudown_Day.Visible = true;
16
txt_Change.Visible = false; btn_Demand.Visible = true; dgv_schedule.Visible = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntDay == day && ((Schedule1)AL_Schedule1[i]).IntMonth == month && ((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \:\ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//按月查询
if (e.Node.Text.Trim() == \按月查询\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = true; gbox_Time.Text = \按月查询\; gbox_Important.Visible = false; rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = true; rbtn_Date2.Enabled = false; rbtn_Date3.Enabled = true; rbtn_Date2.Checked = true; nudown_Day.Visible = false; txt_Change.Visible = false; btn_Demand.Visible = false;
rbtn_Date1.Text = (month - 1).ToString()+\月\; rbtn_Date2.Text = month .ToString()+\月\;
rbtn_Date3.Text = (month + 1).ToString()+\月\; dgv_schedule.Visible = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntMonth == month &&
17
((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//按年查询
if (e.Node.Text.Trim() == \按年查询\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = true; gbox_Time.Text = \按年查询\; gbox_Important.Visible = false; rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = true; rbtn_Date2.Enabled = false; rbtn_Date3.Enabled = true; rbtn_Date2.Checked = true; nudown_Day.Visible = false; txt_Change.Visible = false; btn_Demand.Visible = false;
rbtn_Date1.Text = (year - 1).ToString() + \年\; rbtn_Date2.Text = year.ToString() + \年\;
rbtn_Date3.Text = (year + 1).ToString() + \年\; dgv_schedule.Visible = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone,
18
((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
////按重要性查询
if (e.Node.Text.Trim() == \按重要性查询¥\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = false;
gbox_Important.Visible = true;
rbtn_EveryImportant.Enabled = false; rbtn_Important.Enabled = true; rbtn_Unimportant.Enabled = true; rbtn_EveryImportant.Checked = true; dgv_schedule.Visible = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).StrImportant == \非常重要\)
{
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//非常重要日程查询
if (e.Node.Text.Trim() == \非常重要\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = false;
gbox_Important.Visible = true;
rbtn_EveryImportant.Enabled = false; rbtn_Important.Enabled = true; rbtn_Unimportant.Enabled = true; rbtn_EveryImportant.Checked = true; dgv_schedule.Visible = true;
19
dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).StrImportant == \非常重要\)
{
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//重要日程查询
if (e.Node.Text.Trim() == \重要\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = false;
gbox_Important.Visible = true;
rbtn_EveryImportant.Enabled = true; rbtn_Important.Enabled = false; rbtn_Unimportant.Enabled = true; rbtn_Important.Checked = true; dgv_schedule.Visible = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).StrImportant == \重要\) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \:\ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } }
20
}
//不重要日程查询
if (e.Node.Text.Trim() == \不重要\) {
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = false;
gbox_Important.Visible = true;
rbtn_EveryImportant.Enabled = true; rbtn_Important.Enabled = true; rbtn_Unimportant.Checked = true; rbtn_Unimportant.Enabled = false; dgv_schedule.Visible = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).StrImportant == \不重要\)
{
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \:\ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//按日期删除
if (e.Node.Text.Trim() == \按日期删除\) {
txt_Del_Condition.Text = \; gbox_Change.Visible = false; gbox_Del.Visible = true; gbox_Time.Visible = false;
gbox_Important.Visible = false; dgv_schedule.Visible = true;
cbox_Del_Important2.Visible = true; cbox_Del_Important2.Text = \日期\; if (month < 10) {
txt_Del_Condition.Text = year.ToString() + \ + month.ToString() + day.ToString(); } else
21
{
txt_Del_Condition.Text = year.ToString() + month.ToString() + day.ToString(); } }
//按重要性删除
if (e.Node.Text.Trim() == \按重要性删除\) {
txt_Del_Condition.Text = \; gbox_Change.Visible = false; gbox_Del.Visible = true; gbox_Time.Visible = false;
gbox_Important.Visible = false; dgv_schedule.Visible = true;
cbox_Del_Important2.Visible = true; cbox_Del_Important2.Text = \重要性\; }
//日程修改
if (e.Node.Text.Trim() == \修T改?\) {
txt_Change.Text = \;
gbox_Change.Visible = false; gbox_Del.Visible = false; gbox_Time.Visible = true;
gbox_Time.Text = \按标题查询\; gbox_Important.Visible = false; rbtn_Date1.Visible = false; rbtn_Date2.Visible = false; rbtn_Date3.Visible = false; nudown_Day.Visible = false; txt_Change.Visible = true; btn_Demand.Visible = true; } }
//条件查询
private void btn_Demand_Click(object sender, EventArgs e) {
//按天?查询
if (gbox_Time.Text == \按天查询\) {
dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntDay ==
nudown_Day.Value && ((Schedule1)AL_Schedule1[i]).IntMonth == month && ((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear
22
+ \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \:\ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//按标题查询
else if (gbox_Time.Text == \按标题查询\) {
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (txt_Change.Text == ((Schedule1)AL_Schedule1[i]).StrTitle) {
gbox_Time.Visible = false; dgv_schedule.Visible = false; gbox_Change.Visible = true; //数据读取
txt_Title1.Text = ((Schedule1)AL_Schedule1[i]).StrTitle; txt_Phone1.Text =
((Schedule1)AL_Schedule1[i]).LongPhone.ToString(); txt_Place1.Text = ((Schedule1)AL_Schedule1[i]).StrPlace; txt_Remark1.Text = ((Schedule1)AL_Schedule1[i]).StrRemark; txt_Hour.Text =
((Schedule1)AL_Schedule1[i]).IntHour.ToString(); txt_Minute.Text =
((Schedule1)AL_Schedule1[i]).IntMinute.ToString(); txt_Remark1.Text = ((Schedule1)AL_Schedule1[i]).StrRemark;
cbox_Important1.Text = ((Schedule1)AL_Schedule1[i]).StrImportant; cbox_Remind1.Text = ((Schedule1)AL_Schedule1[i]).StrRemind;
dateTimePicker1.Text = ((Schedule1)AL_Schedule1[i]).IntYear + \年¨o\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月?\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日¨?\; s = i; }
else if (txt_Change.Text == \) {
MessageBox.Show(\无关于此标题的日程,请重新输入!\提示\, MessageBoxButtons.OK, MessageBoxIcon.Information); return;
, 23
\
} } } }
//单选按钮查询
private void rbtn_Date1_CheckedChanged(object sender, EventArgs e) {
if (gbox_Time.Text == \按月查询\) {
rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = false; rbtn_Date2.Enabled = true; rbtn_Date3.Enabled = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntMonth == month - 1 && ((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
if (gbox_Time.Text == \按年查询\) {
rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = false; rbtn_Date2.Enabled = true; rbtn_Date3.Enabled = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntYear == year - 1) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear
24
+ \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } } }
//单选按钮查询
private void rbtn_Date2_CheckedChanged(object sender, EventArgs e) {
if (gbox_Time.Text == \按月查询\) {
rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = true; rbtn_Date2.Enabled = false; rbtn_Date3.Enabled = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntMonth == month && ((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
if (gbox_Time.Text == \按年查询\) {
rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = true; rbtn_Date2.Enabled = false;
25
rbtn_Date3.Enabled = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } } }
//单选按钮查询
private void rbtn_Date3_CheckedChanged(object sender, EventArgs e) {
if (gbox_Time.Text == \按月查询\) {
rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = true; rbtn_Date2.Enabled = true; rbtn_Date3.Enabled = false; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntMonth == month + 1 && ((Schedule1)AL_Schedule1[i]).IntYear == year) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); }
26
} }
if (gbox_Time.Text == \按年查询\) {
rbtn_Date1.Visible = true; rbtn_Date2.Visible = true; rbtn_Date3.Visible = true; rbtn_Date1.Enabled = true; rbtn_Date2.Enabled = true; rbtn_Date3.Enabled = false; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).IntYear == year + 1) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } } }
//单选按查询
private void rbtn_EveryImportant_CheckedChanged(object sender, EventArgs e) {
rbtn_EveryImportant.Enabled = false; rbtn_Important.Enabled = true; rbtn_Unimportant.Enabled = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).StrImportant == \非常重要\) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \:\ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone,
27
((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//单选按钮查询 private void rbtn_Important_CheckedChanged(object sender, EventArgs e) {
rbtn_EveryImportant.Enabled = true; rbtn_Important.Enabled = false; rbtn_Unimportant.Enabled = true; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).StrImportant == \重要\) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute, ((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//单选按钮查询
private void rbtn_Unimportant_CheckedChanged(object sender, EventArgs e)
{
rbtn_EveryImportant.Enabled = true; rbtn_Important.Enabled = true; rbtn_Unimportant.Enabled = false; dgv_schedule.Rows.Clear(); j = 1;
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (((Schedule1)AL_Schedule1[i]).StrImportant == \不重要\) {
dgv_schedule.Rows.Add(j++,
((Schedule1)AL_Schedule1[i]).StrTitle, ((Schedule1)AL_Schedule1[i]).IntYear + \年\ + ((Schedule1)AL_Schedule1[i]).IntMonth + \月\ + ((Schedule1)AL_Schedule1[i]).IntDay + \日\, ((Schedule1)AL_Schedule1[i]).IntHour + \: \ + ((Schedule1)AL_Schedule1[i]).IntMinute,
28
((Schedule1)AL_Schedule1[i]).StrPlace, ((Schedule1)AL_Schedule1[i]).LongPhone, ((Schedule1)AL_Schedule1[i]).StrImportant, ((Schedule1)AL_Schedule1[i]).StrRemind, ((Schedule1)AL_Schedule1[i]).StrRemark); } } }
//删除日程
private void btn_Del_Click(object sender, EventArgs e) {
DialogResult dr = MessageBox.Show(\确定删除\, \提示\, MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dr == DialogResult.Yes) {
for (int i = 0; i < AL_Schedule1.Count; i++) {
if (cbox_Del_Important2.Text==\重要性\ &&
((Schedule1)AL_Schedule1[i]).StrImportant == txt_Del_Condition.Text) {
AL_Schedule1.RemoveAt(i); i--; }
if (cbox_Del_Important2.Text == \日期\) {
if (((Schedule1)AL_Schedule1[i]).IntYear.ToString() + \ + ((Schedule1)AL_Schedule1[i]).IntMonth.ToString() +
((Schedule1)AL_Schedule1[i]).IntDay.ToString() == txt_Del_Condition.Text || ((Schedule1)AL_Schedule1[i]).IntYear.ToString() + ((Schedule1)AL_Schedule1[i]).IntMonth.ToString() +
((Schedule1)AL_Schedule1[i]).IntDay.ToString() == txt_Del_Condition.Text) {
AL_Schedule1.RemoveAt(i); i--; } } } } }
//删除条件文本清除
private void txt_Del_Condition_MouseClick(object sender, MouseEventArgs e) {
txt_Del_Condition.Clear(); }
//删除类型改变
private void cbox_Del_Important2_SelectedValueChanged(object sender, EventArgs e) {
if (cbox_Del_Important2.Text == \日期\)
29
{
if (month < 10) {
txt_Del_Condition.Text = year.ToString() + \ + month.ToString() + day.ToString(); } else {
txt_Del_Condition.Text = year.ToString() + month.ToString() + day.ToString(); } }
else if (cbox_Del_Important2.Text == \重要性\) {
txt_Del_Condition.Text = \; } }
//修改日程
private void btn_Change_Click(object sender, EventArgs e) {
DialogResult dr = (MessageBox.Show(\您确定要更改此日程信息\, \提示?\, MessageBoxButtons.YesNo, MessageBoxIcon.Information)); if (dr==DialogResult.Yes) {
((Schedule1)AL_Schedule1[s]).StrTitle=txt_Title1.Text;
((Schedule1)AL_Schedule1[s]).LongPhone=long.Parse(txt_Phone1.Text.ToString());
((Schedule1)AL_Schedule1[s]).StrImportant=cbox_Important1.Text;
((Schedule1)AL_Schedule1[s]).StrPlace=txt_Place1.Text; ((Schedule1)AL_Schedule1[s]).StrRemark=txt_Remark1.Text; ((Schedule1)AL_Schedule1[s]).StrRemind=cbox_Remind1.Text;
((Schedule1)AL_Schedule1[s]).IntYear=int.Parse(dateTimePicker1.Value.Year.ToString());
((Schedule1)AL_Schedule1[s]).IntMonth=int.Parse(dateTimePicker1.Value.Month.ToString());
((Schedule1)AL_Schedule1[s]).IntDay=int.Parse(dateTimePicker1.Value.Day.ToString());
((Schedule1)AL_Schedule1[s]).IntHour = int.Parse(txt_Hour.Text.ToString());
((Schedule1)AL_Schedule1[s]).IntMinute = int.Parse(txt_Minute.Text.ToString()); } }
//关闭系统时数据保存
private void Schedule_FormClosing(object sender, FormClosingEventArgs e)
30
{
string[] B_longPhone = new string[AL_Schedule1.Count]; string[] B_intHour = new string[AL_Schedule1.Count]; string[] B_intMinute = new string[AL_Schedule1.Count]; string[] B_intDay = new string[AL_Schedule1.Count]; string[] B_intYear = new string[AL_Schedule1.Count]; string[] B_intMonth = new string[AL_Schedule1.Count]; string[] B_strPlace = new string[AL_Schedule1.Count]; string[] B_strTitle = new string[AL_Schedule1.Count]; string[] B_strRemind = new string[AL_Schedule1.Count]; string[] B_strImportant = new string[AL_Schedule1.Count]; string[] B_strRemark = new string[AL_Schedule1.Count]; for (int i = 0; i < AL_Schedule1.Count; i++) {
B_longPhone[i] =
(((Schedule1)AL_Schedule1[i]).LongPhone).ToString(); B_intHour[i] =
(((Schedule1)AL_Schedule1[i]).IntHour).ToString(); B_intMinute[i] =
(((Schedule1)AL_Schedule1[i]).IntMinute).ToString(); B_intDay[i] =
(((Schedule1)AL_Schedule1[i]).IntDay).ToString(); B_intYear[i] =
(((Schedule1)AL_Schedule1[i]).IntYear).ToString(); B_intMonth[i] =
(((Schedule1)AL_Schedule1[i]).IntMonth).ToString(); B_strImportant[i] =
((Schedule1)AL_Schedule1[i]).StrImportant;
B_strPlace[i] = ((Schedule1)AL_Schedule1[i]).StrPlace; B_strRemark[i] = ((Schedule1)AL_Schedule1[i]).StrRemark; B_strRemind[i] = ((Schedule1)AL_Schedule1[i]).StrRemind; B_strTitle[i] = ((Schedule1)AL_Schedule1[i]).StrTitle; }
System.IO.File.WriteAllLines(\, B_longPhone); System.IO.File.WriteAllLines(\, B_intDay); System.IO.File.WriteAllLines(\, B_intYear); System.IO.File.WriteAllLines(\, B_intMonth); System.IO.File.WriteAllLines(\, B_intHour);
System.IO.File.WriteAllLines(\, B_intMinute); System.IO.File.WriteAllLines(\, B_strPlace); System.IO.File.WriteAllLines(\, B_strTitle); System.IO.File.WriteAllLines(\, B_strRemind); System.IO.File.WriteAllLines(\, B_strImportant);
System.IO.File.WriteAllLines(\, B_strRemark); Application.Exit(); } } }
4. 调试结果
31
4.1 用户登录
4.2 用户注册
32
4.3 找回密码
4.4 日程提醒
33
4.5 日程添加
4.6 日程查询
4.7 日程删除
34
4.8 日程修改
5. 设计总结及心得体会
个人管理系统涉及到到了数组,类,循环,控件,页面的设计,文件内容的储存等知识的运用,共建了6个Window窗体,实现了注册、登录、找回密码、提醒、查询、添加、删除、修改等功能。分工及设计心得体会如下:
35
正在阅读:
个人日程管理系统设计报告07-05
2017届高考生物二轮复习专题辅导与训练第三部分基础回扣篇专题二03-08
摄影部规章制度12-16
浙江大学2013-2014校历04-23
北师大版小学五年级上学期数学第四单元分数的加减法试题04-16
人文学院毕业论文撰写格式样本04-08
2022年制造业行业市场分析报告04-16
新版青岛版三年级下册数学第七单元《家居中的学问 小数的初步认识》教案(2018新版教材)09-03
48个国际音标发音表之欧阳光明创编05-10
十八大开幕式观后感12-11
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 日程
- 管理系统
- 报告
- 设计
- 个人