随笔分类 -  Winform

摘要:1.实现批量网页下载到本地2.使用webBrowser下载结果 阅读全文
posted @ 2014-11-07 11:39 Wythe 阅读(188) 评论(0) 推荐(0) 编辑
摘要:1,需求 对象属性发生变化 更新UI2, 方法: 在对象中定义事件,在属性中调用事件 // 属性 public string EmrTitle { get { return _category.EmrTitle.Text; } set { if (_category.EmrTitle.Text != value) { // 出发事件 if (OnEmrTitleChanged ... 阅读全文
posted @ 2012-06-20 00:14 Wythe 阅读(3456) 评论(0) 推荐(0) 编辑
摘要:public class MessageUtil { /// <summary> /// 显示一般的提示信息 /// </summary> /// <param name="message">提示信息</param> public static DialogResult ShowTips(string message) { return MessageBox.Show(message, "提示信息",MessageBoxButtons.OK, MessageBoxIcon.Info... 阅读全文
posted @ 2011-11-23 08:53 Wythe 阅读(515) 评论(0) 推荐(1) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO.Pipes;using System.Security.Principal;namespace TopInfo.Metevation.Common{ public class PipeMessageUtil { private const string PipeName = "TopInfoPipe"; public static bool NeedSendMessage = fa 阅读全文
posted @ 2011-05-20 16:35 Wythe 阅读(3665) 评论(1) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;using System.Diagnostics;namespace TopInfo.Metevation.Common{ //WM_COPYDATA消息所要求的数据结构 public struct CopyDataStruct { public IntPtr dwData; public int cbData; [MarshalAs(UnmanagedTyp 阅读全文
posted @ 2011-05-20 13:29 Wythe 阅读(3708) 评论(5) 推荐(1) 编辑
摘要:调用:FtpOption ftp = new FtpOption("10.128.3.90", "21", "uid", "pwd");下载文件:bool success = ftp.DownLoadNotReName("ST/mylyb/grapes/03/11041112.003", "E:/");bool success = ftp.DownLoadReName("ST/myl-yb/grapes/03/11041112.003", "E: 阅读全文
posted @ 2011-04-22 11:09 Wythe 阅读(906) 评论(0) 推荐(0) 编辑
摘要:1.vs ->Windows服务2.创建完成后在项目下默认会创建 Program.cs 和 Service1.cs双击Service1.cs到设计,在设计区右击,选择添加安装程序产生2个组建点击ServiceInstaller1 设置相关属性3.在Service1.cs 事件:protected override void OnStart(string[] args) { }服务开启时protected override void OnStop() { }服务停止时要想在程序安装时自动启动服务:在ProjectInstaller.cs里: public ProjectInstaller 阅读全文
posted @ 2011-03-23 12:05 Wythe 阅读(309) 评论(0) 推荐(0) 编辑