您好,欢迎光临本网站![请登录][注册会员]  
文件名称: C#制作的精美时钟.rar
  所属分类: 硬件开发
  开发工具:
  文件大小: 231kb
  下载次数: 0
  上传时间: 2009-02-20
  提 供 者: zl***
 详细说明: public class Task { public string AlarmDate , AlarmTime ,TaskName ,MsgText , MsgFormType; public bool AlarmEveryDay , bSound , bMsgBox ,bAutoHide; private Thread ThreadSound ; public Task() { // // TODO: 在此处添加构造函数逻辑 // LoadAlarm(); } public int CheckAlarm() { if(AlarmDate=="" || AlarmTime=="") { return 0 ; } if(!AlarmEveryDay) { if( Convert.ToDateTime (AlarmTime) > DateTime.Now && AlarmDate==DateTime.Now.ToShortDateString () ) { System.TimeSpan extime = Convert.ToDateTime (AlarmTime)-DateTime.Now ; return (int)extime.TotalSeconds+1 ; } } else { if( Convert.ToDateTime (AlarmTime) > DateTime.Now) { System.TimeSpan extime = Convert.ToDateTime (AlarmTime)-DateTime.Now ; return (int)extime.TotalSeconds+1 ; } } return 0 ; } private void LoadAlarm() { string path = Application.StartupPath ; Ini ini = new Ini(path+"\\Set.ini"); AlarmDate = ini.IniReadValue ("Alarm","AlarmDate"); AlarmTime = ini.IniReadValue ("Alarm","AlarmTime"); AlarmEveryDay = Convert.ToBoolean (ini.IniReadValue ("Alarm","AlarmEveryDay")); bSound = Convert.ToBoolean (ini.IniReadValue ("Alarm","bSound")); bMsgBox = Convert.ToBoolean (ini.IniReadValue ("Alarm","bMsgBox")); MsgText = ini.IniReadValue ("Alarm","MsgText"); TaskName = ini.IniReadValue ("Alarm","TaskName"); bAutoHide = Convert.ToBoolean (ini.IniReadValue ("MsgForm","AutoHide")); MsgFormType = ini.IniReadValue ("MsgForm","Type"); } public void Alarm() { switch(TaskName) { case "闹钟": if(bSound) { ThreadSound = new Thread (new ThreadStart (PlaySoundAlarm)); ThreadSound.Start (); } if(bMsgBox) { if(this.MsgFormType == "MSN") { TaskbarNotifier Notifier=new TaskbarNotifier(); Notifier.SetBackgroundBitmap(new Bitmap("skin\\msgskin.bmp"),Color.FromArgb(255,0,255)); Notifier.SetCloseBitmap(new Bitmap("skin\\msgclose.bmp"),Color.FromArgb(255,0,255),new Point(127,8)); Notifier.TitleRectangle=new Rectangle(40,9,70,25); Notifier.ContentRectangle=new Rectangle(8,41,133,68); Notifier.AutoHide = this.bAutoHide ; Notifier.Show ("闹钟",MsgText,500,5000,500); } else { TaskbarNotifier Notifier=new TaskbarNotifier(); Notifier.SetBackgroundBitmap(new Bitmap ("skin\\msgskin2.bmp"),Color.FromArgb(255,0,255)); Notifier.SetCloseBitmap(new Bitmap("skin\\msgclose2.bmp"),Color.FromArgb(255,0,255),new Point(300,74)); Notifier.TitleRectangle=new Rectangle(123,80,176,16); Notifier.ContentRectangle=new Rectangle(116,97,197,22); Notifier.AutoHide = false ; //Notifier.TitleClick+=new EventHandler(TitleClick); //Notifier.ContentClick+=new EventHandler(ContentClick); //Notifier.CloseClick+=new EventHandler(CloseClick); Notifier.AutoHide = this.bAutoHide ; Notifier.Show ("闹钟",MsgText,500,5000,500); } } break; case "关机": ExWin exdlg = new ExWin ("关机"); exdlg.Show (); break; case "重启": ExWin rebootdlg = new ExWin ("重启"); rebootdlg.Show (); break; default : break; } } private void PlaySoundAlarm() { Common.PlaySound ("Alarm.wav",0,0x05); } } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: 精美时钟
 输入关键字,在本站1000多万海量源码库中尽情搜索: