麦田

不积跬步无以至千里.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 9 10 11 12 13 14 下一页

2012年12月19日

摘要: using System;using System.Collections.Generic;using System.Text;namespace Timer{ public class TimerManager { System.Timers.Timer t = new System.Timers.Timer(20000); //实例化Timer类,设置间隔时间为10000毫秒 public TimerManager() { t.Elapsed += new System.Timers.ElapsedEventHan... 阅读全文
posted @ 2012-12-19 11:35 一些记录 阅读(322) 评论(0) 推荐(0)

摘要: this.dataGridViewTemplate.DataSource = ap01TemplateBLL.GetAllList(); this.dataGridViewTemplate.DataMember = "ds"; 阅读全文
posted @ 2012-12-19 11:26 一些记录 阅读(180) 评论(0) 推荐(0)

摘要: 最好不要直接在真正的项目上面操作 这样 你会觉得很乱在模拟的简单项目上面 练习 了解透了这样你搬到真正的项目上面 才能得心应手就好像我做多线程调度的那个项目 阅读全文
posted @ 2012-12-19 10:54 一些记录 阅读(177) 评论(0) 推荐(0)

2012年12月18日

摘要: Write multi-threaded demo program with C# language: two threads, you can start, you can pause, you can recove 阅读全文
posted @ 2012-12-18 22:24 一些记录 阅读(285) 评论(3) 推荐(0)

摘要: //添加引用using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;using System.Threading;using System.Collections; //定义变量private Thread convertThread;private Mutex mutex = ne 阅读全文
posted @ 2012-12-18 22:03 一些记录 阅读(629) 评论(0) 推荐(0)

摘要: 本文将为您介绍12个优秀的UML工具:1. StarUML StarUML(简称SU),是一种创建UML类图,是一种生成类图和其他类型的统一建模语言(UML)图表的工具。StarUML是一个开源项目之一发展快、灵活、可扩展性强(zj)。2. Netbeans UML Plugin 目前支持:Activity图, Class图, Sequence图, State图以及Use Case图。3. Acceleo Acceleo是一个开源的代码生成器设计成让每个人都能把MDA方法运用到开发过程中并且能够提高软件的开发效率。Acceleo包含一组工具和编辑器使得它易于学习而且适合任何类型的技术。4. A 阅读全文
posted @ 2012-12-18 21:50 一些记录 阅读(9898) 评论(0) 推荐(1)

摘要: using System;using System.Collections.Generic;using System.Text;namespace APlusEmail.Model{ public class EmailSendFeedBack { private bool isSuccess; public bool IsSuccess { get { return isSuccess; } set { isSuccess = value; } } private s... 阅读全文
posted @ 2012-12-18 17:31 一些记录 阅读(167) 评论(0) 推荐(0)

摘要: using System;using System.Collections.Generic;using System.Text;using APlusEmail.Quartz.EmailJob;using APlusEmail.Model;namespace APlusEmail.Quartz.Timer{ public class TimerManager { System.Timers.Timer t = new System.Timers.Timer(10000); //实例化Timer类,设置间隔时间为10000毫秒; public Timer... 阅读全文
posted @ 2012-12-18 17:14 一些记录 阅读(521) 评论(0) 推荐(0)

摘要: Select * From MAIN.[AP01SendQueue] where info = '立即' Limit 1000 阅读全文
posted @ 2012-12-18 10:59 一些记录 阅读(419) 评论(0) 推荐(0)

摘要: 在多线程或单线程任务中,让线程带传入参数一直是个麻烦的问题,通常有种方法就是以类,对像的变量来传参数,这种方法理解上很简单不过在某些场合使用很麻烦,这里就不介绍了,我们主要介绍一种.NET2.0中新增加的带参数运行线程的方法,示例程序如下:ParameterizedThreadStart ParStart = new ParameterizedThreadStart(ThreadMethod);Thread myThread = new Thread(ParStart);object o = “hello”;myThread.Start(o);ThreadMethod如下:public voi 阅读全文
posted @ 2012-12-18 10:24 一些记录 阅读(378) 评论(0) 推荐(0)

摘要: 阅读全文
posted @ 2012-12-18 09:55 一些记录 阅读(309) 评论(1) 推荐(0)

摘要: 阅读全文
posted @ 2012-12-18 09:41 一些记录 阅读(136) 评论(0) 推荐(0)

摘要: if (e.Message.Contains("mail from address must be same as authorization")) { //该qq没开启smtp服务 } return false; 阅读全文
posted @ 2012-12-18 09:32 一些记录 阅读(201) 评论(0) 推荐(0)

摘要: 用qq邮箱发信的时候 遇到这样的exection"参数或变量中有语法错误. 服务器响应为: mail from address must be same as authorization user"解决方法是:打开qq开启smtp服务 阅读全文
posted @ 2012-12-18 09:26 一些记录 阅读(2339) 评论(0) 推荐(0)

2012年12月17日

摘要: 关于Quartz.NET的xml配置文本 必须写在其他的前面.. 阅读全文
posted @ 2012-12-17 18:05 一些记录 阅读(276) 评论(0) 推荐(0)

摘要: 无法从用法中推导出方法”******”的类型实参。请尝试显式指定类型实参有时候开发的时候遇到这种情况的错误 老是找不到办法其实 可能是还没生成 你尝试从新生成解决方案就会知道是什么原因了 阅读全文
posted @ 2012-12-17 11:51 一些记录 阅读(771) 评论(0) 推荐(0)

2012年12月16日

摘要: <marquee behavior="alternate">来回滚动</marquee> <marquee behavior="scroll">单方向循环滚动</marquee> <marquee behavior="scroll" direction="up" height="30">改单方向向上循环滚动</marquee> <marquee behavior="slide">只滚动一次&l 阅读全文
posted @ 2012-12-16 12:07 一些记录 阅读(742) 评论(0) 推荐(0)

2012年12月15日

摘要: 在日期保存到Sqlite数据库时转换一个类型,比如:string _now = System.DateTime.Now.ToString("s");也就是说在.ToString()方法中加一个s,转换成 iso 8601标准字符串格式,即可解决日期读取错误的问题。另外每次都要这样转换很麻烦,特别是很多时候datetime列我们不操作使其为NULL(NULL被认为是“1899-12-30 0:00:00”),我们可以在建表的时候将这列设置为非空,并设置初始值:1899-12-30T0:00:00。这样在我们不操作这列的时候sqlite自己的默认值我们也能认出来了。 阅读全文
posted @ 2012-12-15 17:52 一些记录 阅读(3752) 评论(0) 推荐(0)

摘要: string dtString="2008-08-19";DateTime dt=Convert.ToDateTime(dtString); 阅读全文
posted @ 2012-12-15 17:52 一些记录 阅读(145) 评论(0) 推荐(0)

摘要: Java代码publicclassColorJobimplementsStatefulJob2.重写execute(JobExecutionContext context)方法Java代码StringjobName=context.getJobDetail().getFullName();可以通过context获取一些参数3.通过context获取JobDataMap,JobDataMap实现了Map接口,所以可以通过JobDataMap获取参数a . 设置参数Java代码job1.getJobDataMap().put(ColorJob.FAVORITE_COLOR,"Green& 阅读全文
posted @ 2012-12-15 17:51 一些记录 阅读(11812) 评论(0) 推荐(0)

摘要: 出处:http://www.cnblogs.com/mikechen/archive/2010/04/10/1709124.htmlSystem.Net.Mail命名空间是在.NET Framework中新增的,该命名空间提供了发送电子邮件的功能。通过对本章的学习,读者可以轻松地使用.NET Framework提供的类库来发送电子邮件。本章的讲解流程如图18-1所示。 图18-1 发送电子邮件的讲解流程18.1 System.Net.Mail 简介System.Net.Mail命名空间包含用于将电子邮件发送到SMTP服务器的类,这些类需要结合Microsoft SMTP Server一起使.. 阅读全文
posted @ 2012-12-15 13:22 一些记录 阅读(1787) 评论(1) 推荐(0)

摘要: private void buttonSure_Click(object sender, EventArgs e) { // MessageBox.Show(this.userControlChoiceTime1.GetUserChoiceTime().ToLocalTime().ToString()); DateTime userChoiceTime = this.userControlChoiceTime1.GetUserChoiceTime(); //TimeSpan ts1 = new Tim... 阅读全文
posted @ 2012-12-15 09:56 一些记录 阅读(616) 评论(0) 推荐(0)

摘要: 用两个dateTimePicker控件 一个显示日期 一个显示时间显示时间的dateTimePicker控件的showupdown设置为true 同时时间那里 要设置customFormatHH:mm:ssFormat 改为Time//之后用改方法 可以获得完整的datatimepublic DateTime GetUserChoiceTime(){DateTime date = DateTime.Parse(this.dateTimePickerData.Text);DateTime time = DateTime.Parse(this.dateTimePickerTime.Text);.. 阅读全文
posted @ 2012-12-15 09:10 一些记录 阅读(331) 评论(1) 推荐(0)

2012年12月14日

摘要: 原 http://blog.csdn.net/BusyDonkey/article/details/5327665在C#里现在有3个Timer类:System.Windows.Forms.TimerSystem.Threading.TimerSystem.Timers.Timer这三个Timer我想大家对System.Windows.Forms.Timer已经很熟悉了,唯一我要说的就是这个Timer在激发Timer.Tick事件的时候,事件的处理函数是在程序主线程上执行的,所以在WinForm上面用这个Timer很方便,因为在From上的所有控件都是在程序主线程上创建的,那么在Tick的处理函 阅读全文
posted @ 2012-12-14 21:24 一些记录 阅读(309) 评论(0) 推荐(0)

摘要: 我现在做了一个幼儿教育软件~我想在规定时间提醒他关闭程序 该休息休息 了!如果他还不管3分钟内强制关闭~?请问这个该怎么弄谢谢你们?问题补充:我希望能给出来完整的代码 我是初学 ,,是winform程序~~在 一个 Form 里拖 两个控件 Lable, Timer, 修改Timer属性.Enable=true,Interval=1000. Id 不改保持默认。在窗体类写一下代码: const int closeTime = 5;//关闭程序时间,秒 const int workTime = 10; //弹出窗口所需时间,秒 int curWorkT... 阅读全文
posted @ 2012-12-14 21:18 一些记录 阅读(614) 评论(0) 推荐(0)

摘要: run(){ while(true) { show(); if(条件) { break; } sleep(5*60*1000);//暂停5分钟 }}thread Brun(){ while(true) { time=当前时间; if(time==你设定的时间) { A a=new A(); a.run(); break; } sleep(60*1000);//暂停1分钟 }} 主方法 B b=new B();b.run();如果用时间控件,用2个时间控件,A一个enable=true,B一个为false,A控件设置运行间隔为60000毫秒,B设置时间间隔为300000毫秒在A TImer事件. 阅读全文
posted @ 2012-12-14 21:11 一些记录 阅读(399) 评论(0) 推荐(0)

摘要: 定时器事件代码 static void Main(string[] args){ Method(); #region 定时器事件 Timer aTimer = new Timer(); aTimer.Elapsed += new ElapsedEventHandler(TimedEvent); aTimer.Interval = seconds * 1000; //配置文件中配置的秒数 aTimer.Enabled = true; #endregion str... 阅读全文
posted @ 2012-12-14 21:09 一些记录 阅读(3850) 评论(1) 推荐(1)

摘要: 我们在写灌水机器人、抓资源机器人和Web网游辅助工具的时候第一步要实现的就是用户登录。那么怎么用C#来模拟一个用户的登录,要实现用户的登录,那么首先就必须要了解一般网站中是怎么判断用户是否登录的。HTTP协议是一个无连接的协议,也就是说这次对话的内容和状态与上次的无关,为了实现和用户的持久交互,网站与浏览器之前在刚建立会话时将在服务 器内存中建立一个Session,该Session标识了该用户(浏览器),每一个Session都有一个唯一的ID,第一次建立会话时服务器将生成的这 个ID传给浏览器,浏览器在接下来的浏览中每一个发向服务器的请求中都将包含该SessionID,从而标识了自己的身份。服 阅读全文
posted @ 2012-12-14 20:40 一些记录 阅读(436) 评论(0) 推荐(0)

摘要: //没有标题 this.FormBorderStyle = FormBorderStyle.None; //任务栏不显示 this.ShowInTaskbar = false;//不知道你要哪样,都写给你了 阅读全文
posted @ 2012-12-14 16:58 一些记录 阅读(1117) 评论(0) 推荐(0)

摘要: load事件里 :this.MaximizeBox = false;属性 MaximizeBox : false 阅读全文
posted @ 2012-12-14 16:32 一些记录 阅读(294) 评论(0) 推荐(0)

摘要: 1、int n;string str="xxx";if(int.TryParse(str,out n)){//为数字}else{//非数字}2、1、string pat=@"[\u4e00-\u9fa5]";Regex rg=new Regex(pat);Match mh=rg.Match(textBox1.Text);if(mh.Success){//是汉字}2、function fucCheckNUM(NUM){var i,j,strTemp;strTemp="0123456789.";if ( NUM.length== 0)re 阅读全文
posted @ 2012-12-14 16:03 一些记录 阅读(8771) 评论(0) 推荐(0)

摘要: 在要获取字典的值的时候 应该先判断是否有 否则有异常 阅读全文
posted @ 2012-12-14 16:02 一些记录 阅读(197) 评论(0) 推荐(0)

摘要: paramentDictionary[this.comboBoxParament.Text]Dictionary<key,value> 是一种泛型集合就是通过一种小标访问方式来获取另一种对应的值假如我们用1表示男 2表示女Dictionary<int,string> dic = new Dictionary<int,string>();dic.add(1,"男");dic.add(2,"女");我们要访问的时候就可以像数组一样dic[1]表示男 dic[2]表示女也可以绑定不同的类的对象 像方法的参数一样remove 阅读全文
posted @ 2012-12-14 14:47 一些记录 阅读(2008) 评论(0) 推荐(0)

摘要: itemList.ToArray() 阅读全文
posted @ 2012-12-14 14:19 一些记录 阅读(221) 评论(0) 推荐(0)

摘要: 第一步 先建立一个xml文档 看文档如下 也可以用代码来写入xml<?xml version="1.0" encoding="gb2312"?><paramentList> <paramentEntity id="niname"> <id>{$Niname$}</id> <value>称呼</value> </paramentEntity> <paramentEntity id="sign"> <id& 阅读全文
posted @ 2012-12-14 14:08 一些记录 阅读(368) 评论(0) 推荐(0)

摘要: private void DeleteListNoneSendEmail(string newEmails) { List<QQEntity> qqEntityListTemp = QqEntityList;//存放到临时list for (int i = 0; i < QqEntityList.Count; i++) { if (!newEmails.Contains(QqEntityList[i].Name)) { ... 阅读全文
posted @ 2012-12-14 11:55 一些记录 阅读(174) 评论(0) 推荐(0)

摘要: radioButton放在同一个groupbox里面 就可以只能单选 阅读全文
posted @ 2012-12-14 11:09 一些记录 阅读(863) 评论(0) 推荐(0)

摘要: private void radioButtonSendRightNow_CheckedChanged(object sender, EventArgs e) { this.buttonSendRightNow.Enabled = this.radioButtonSendRightNow.Checked; } 阅读全文
posted @ 2012-12-14 11:05 一些记录 阅读(297) 评论(0) 推荐(0)

摘要: this.listView1.GridLines = true; //显示表格线 this.listView1.View = View.Details;//显示表格细节 this.listView1.LabelEdit = true; //是否可编辑,ListView只可编辑第一列。 this.listView1.Scrollable = true;//有滚动条 this.listView1.HeaderStyle = ColumnHeaderStyle.Clickable;//对表... 阅读全文
posted @ 2012-12-14 10:52 一些记录 阅读(802) 评论(0) 推荐(0)

摘要: private void FormTemplatePreview_Load(object sender, EventArgs e) { this.textBoxReviewTitle.Text = this.Title.Trim(); this.webBrowser1.Url = new Uri(WriteHtmlToPath()); } //将html代码写入临时文件夹下面的 然后发来给webbrowser使用 private string WriteHtmlToPath() ... 阅读全文
posted @ 2012-12-14 09:51 一些记录 阅读(289) 评论(0) 推荐(0)

上一页 1 ··· 9 10 11 12 13 14 下一页