随笔分类 -  Desktop Develop

C#,小脚本
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Drawing;using System.IO;using System.Linq;using System.Text;using System.Windows.Forms;using Microsoft.VisualBasic;using System.Runtime.InteropServices;using System.Net;u 阅读全文
posted @ 2012-05-21 11:22 魍魉_198x 阅读(245) 评论(0) 推荐(0)
摘要:public bool Ping(string ip) { int timeout = 1000; string data = "Test Data!"; System.Net.NetworkInformation.Ping p = new System.Net.NetworkInformation.Ping(); System.Net.NetworkInformation.PingOptions options = new System.Net.NetworkInformation.Ping... 阅读全文
posted @ 2012-05-16 15:46 魍魉_198x 阅读(248) 评论(0) 推荐(0)
摘要:进程寻找与终止 //寻找进程 public bool ExProgress(string name) { bool init = false; try { Process[] prc = Process.GetProcesses(); foreach (Process pr in prc) //遍历整个进程 { if (name == pr.ProcessNam... 阅读全文
posted @ 2012-05-16 15:40 魍魉_198x 阅读(160) 评论(0) 推荐(0)
摘要:那个 咳~ 不多说了把下列代码拷贝到记事本,修改记事本的后缀名.txt 成 .bat。双击这个bat文件就OK啦。代码不是我写的,从一个朋友那边获得了,他也忘记原作者了,如果知道原作者的欢迎拍砖,这部分作为bat的编写使用练习的范本吧。@echo offREM 准备工作,先清一下DNS缓存,再备份hostsipconfig /flushdnsclsREM 测试时有的朋友会不耐烦的点掉,咱提示一下:echo Google+ hosts自动修改脚本echo 请稍等一下,正在通过网络获取可用IPREM 然后ping www.google.cn和www.google.com以获取最新的IP,赋值%CN 阅读全文
posted @ 2011-11-21 18:00 魍魉_198x 阅读(570) 评论(0) 推荐(0)