77范文网 - 专业文章范例文档资料分享平台

个人日程管理系统设计报告(3)

来源:网络收集 时间:2019-03-09 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

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

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库个人日程管理系统设计报告(3)在线全文阅读。

个人日程管理系统设计报告(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/504954.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: