摘要: <script src="http://www.cnblogs.com/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $("#btnJson").click(function () { $.get('<%= Url.Action("Json") %>', { d 阅读全文
posted @ 2011-08-10 15:49 biubiubiu 阅读(304) 评论(0) 推荐(1) 编辑
摘要: <script src="http://www.cnblogs.com/Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script> <script type="text/javascript"> // $(function () { // $("#update").click(function () { // $.ajax({ // type: "post", // url: '< 阅读全文
posted @ 2011-08-10 13:25 biubiubiu 阅读(1758) 评论(0) 推荐(1) 编辑
摘要: <span id=localtime></span><script type="text/javascript">function showLocale(objD){ var str,colorhead,colorfoot; var yy = objD.getYear(); if(yy<1900) yy = yy+1900; var MM = objD.getMonth()+1; if(MM<10) MM = '0' + MM; var dd = objD.getDate(); if(dd<10) dd 阅读全文
posted @ 2011-08-08 15:32 biubiubiu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: //本地路径转换成URL相对路径privatestringurlconvertor(stringimagesurl1){stringtmpRootDir=Server.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath.ToString());//获取程序根目录stringimagesurl2=imagesurl1.Replace(tmpRootDir,"");//转换成相对路径imagesurl2=imagesurl2.Replace(@"\",@"/");r 阅读全文
posted @ 2011-08-05 11:07 biubiubiu 阅读(341) 评论(0) 推荐(0) 编辑
摘要: public class SaveInfor { public string inipath; [DllImport("kernel32")] private static extern long WritePrivateProfileString(string section, string key, string val, string filePath); [DllImport("kernel32")] private static extern int GetPrivateProfileString(string section, string 阅读全文
posted @ 2011-07-29 11:38 biubiubiu 阅读(392) 评论(0) 推荐(0) 编辑
摘要: static class Program { [DllImport("User32.dll")] private static extern bool ShowWindowAsync(IntPtr hWnd, int cmdShow); [DllImport("User32.dll")] private static extern bool SetForegroundWindow(IntPtr hWnd); private const int WS_SHOWNORMAL = 1; /// <summary> /// 应用程序的主入口点。 // 阅读全文
posted @ 2011-07-26 15:57 biubiubiu 阅读(373) 评论(0) 推荐(0) 编辑
摘要: DataGridView有一个属性是AutoSizeColumnMode,他有几个枚举值:AllCells 调整列宽,以适合该列中的所有单元格的内容,包括标题单元格。 AllCellsExceptHeader 调整列宽,以适合该列中的所有单元格的内容,不包括标题单元格。 ColumnHeader 调整列宽,以适合列标题单元格的内容。 DisplayedCells 调整列宽,以适合当前屏幕上显示的行的列中的所有单元格的内容,包括标题单元格。 DisplayedCellsExceptHeader 调整列宽,以适合当前屏幕上显示的行的列中的所有单元格的内容,不包括标题单元格。 Fill 调整列宽,使 阅读全文
posted @ 2011-07-21 16:06 biubiubiu 阅读(1243) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// WindowsServiceManage /// </summary> public class WindowsServiceManage { /// <summary> /// 重启服务 /// </summary> /// <param name="serviceName"></param> /// <returns></returns> public static bool RestartWindowsService(string ser 阅读全文
posted @ 2011-07-15 09:57 biubiubiu 阅读(300) 评论(0) 推荐(0) 编辑
摘要: protected override void DefWndProc(ref Message m) { switch (m.Msg) { case WM_SIZE: if(m.WParam.ToInt32() == SIZE_MAXIMIZED) { // 窗体最大化 Console.WriteLine("Maxmized"); }else if(m.WParam.ToInt32() == SIZE_MINIMIZED) { // 窗体最小花 Console.WriteLine("Minimized"); }else // 其他 base.DefWndP 阅读全文
posted @ 2011-07-08 10:34 biubiubiu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: //获取启动了应用程序的可执行文件的路径,不包括可执行文件的名称。 string str5=Application.StartupPath;//可获得当前执行的exe的文件名。 string str1 =Process.GetCurrentProcess().MainModule.FileName;// 获取和设置当前目录(即该进程从中启动的目录)的完全限定路径。 // 备注 按照定义,如果该进程在本地或网络驱动器的根目录中启动,则此属性的值为驱动器名称后跟一个尾部反斜杠(如“C:\”)。如果该进程在子目录中启动,则此属性的值为不带尾部反斜杠的驱动器和子目录路径(如“C:\mySubDirec 阅读全文
posted @ 2011-06-29 09:44 biubiubiu 阅读(259) 评论(0) 推荐(1) 编辑