随笔分类 -  C#

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using Microsoft.Office.Interop.Word;using System.Data;namespace WebApplication1{ public static class FunctionHelp { #region Parameters private static Microsoft.Office.Interop.Word._Document MyDoc; ... 阅读全文
posted @ 2012-02-17 10:51 永远没有尽头 阅读(3838) 评论(1) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Text;using System.Data;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { Console.Write(DataTableToJson(MyTable())); Console.Read(); } //"{\"totalpage\":\... 阅读全文
posted @ 2011-11-22 13:05 永远没有尽头 阅读(4668) 评论(2) 推荐(1)
摘要:现在在网上基本上有两种方法实现winform多表头。一种是将winform表头重画,代码如下:privatevoidDataGridViewEx_CellPainting(objectsender,DataGridViewCellPaintingEventArgse){if(e.RowIndex==-1){//intw=dataGridView1.HorizontalScrollingOffset+dataGridView1.TopLeftHeaderCell.Size.Width+dataGridView1.Columns[0].Width+10;RectanglenewRect=newRe 阅读全文
posted @ 2011-09-07 13:23 永远没有尽头 阅读(2058) 评论(2) 推荐(0)
摘要:制作进度条往往分为两种:1. 真实的进度条,显示你进程的百分比。这样的话我的做法是给你的初始化函数里面设置几个点,分别取名是干什么的。然后在你跟新的时候进度条并会显示目前正在干什么。当然如果你的电脑很好,初始化很快的话就很难看出来,一闪而过,你可以设置System.Threading.Thread.Sleep(2000)停止两秒来看看效果。例子如下: /*****ProcessMesg为进度页面的一个label显示空间*******/ SetCurrentThreadCulture(); LoginProcess loginPro = new LoginProcess(); loginPro. 阅读全文
posted @ 2011-08-15 15:13 永远没有尽头 阅读(1458) 评论(2) 推荐(0)