18
2012
07

c#winform中,对DataGridView数据进行操作,一次性保存

需求:不能每加一条数据就操作数据库,要完成所有的数据加入界面,点击保存时才一次性保存。

12
2012
07

c#中程序最小化到托盘

拖一个 notifyIcon控件到界面,名为 notifyIcon1


03
2012
07

c#删除移动硬盘中$RECYCLE.BIN的文件、建立索引文件

软件界面:


24
2012
06

[转载]C#多线程BackgroundWorker使用示例

.Net WinForm Code:


using System;
using System.Collections.Generic;
using System.ComponentModel;////
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace BackgroundWorkerSample
{
    public partial class CalculateAddForm : Form
    {
        protected BackgroundWorker backgroundWorker1 = new BackgroundWorker();
        //private int numberToCompute = 0;
        //private int highestPercentageReached = 0;
        public CalculateAddForm()
        {
            InitializeComponent();
            InitializeBackgoundWorker();
           
        }
        // Set up the BackgroundWorker object by
        // attaching event handlers.
        private void InitializeBackgoundWorker()
        {
            this.backgroundWorker1.WorkerReportsProgress = true;
            this.backgroundWorker1.WorkerSupportsCancellation = true;
           
            this.backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
            this.backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged);
            this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted);
        }
        private long ComputeAdd(int n, BackgroundWorker worker, DoWorkEventArgs e)


23
2012
06

jquery插件printArea打印、corner圆角

 

<div id="testdiv" class="demo" style="width:200px;height:150px;border-width:1px;border-style:solid;border-color:Blue;">
...

22
2012
06

c#/.net用txt、in等作为数据存储的配置类


using System;

using System.Collections.Generic;

using System.Text;

using System.IO;

using System.Text.RegularExpressions;


namespace Tools

{

    #region 配置文件类 ConfigFile

22
2012
06

Excel文件与DataSet之间的转化的探索与实现

.net操作Excel的支持库下载 NPOI2.0.1.zip

15
2012
06

C#winform中只允许程序运行一个实例、显示已经运行的界面

private static System.Threading.Mutex mutex;
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
...

11
2012
06

.Net中Remoting通信的应用,有发送和返回信息

界面如图:  代码:服务端using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;u

09
2012
06

用xml操作代码配置Web.config文件

    public class Webconfig    {        private string XmlFilePath;        private XmlDocument xmldoc