随笔分类 -  C#

摘要:/// /// 计算时间差值 /// /// /// /// private string DateDiff(DateTime DateTime1, DateTime DateTime2) { string dateDiff = null; TimeSpan ts1 = new TimeSpan(DateTime1.Ticks); TimeSpan ts2 = new TimeSpan(DateTime2.Ticks);... 阅读全文
posted @ 2014-01-02 11:35 秋千,为谁荡 阅读(250) 评论(0) 推荐(0)
摘要:FolderBrowserDialog path = new FolderBrowserDialog(); path.ShowDialog(); MessageBox.Show(path.SelectedPath); 阅读全文
posted @ 2013-12-23 09:30 秋千,为谁荡 阅读(324) 评论(0) 推荐(0)
摘要:1 DateTime dt = DateTime.Now; 2 // Label1.Text = dt.ToString();//2005-11-5 13:21:25 3 // Label2.Text = dt.ToFileTime().ToString();//127756416859912816 4 // Label3.Text = dt.ToFileTimeUtc().ToString();//127756704859912816 5 // Label4.Text = dt.ToLocalTime().ToString();//2005-11-5 21:21:2... 阅读全文
posted @ 2013-12-07 23:59 秋千,为谁荡 阅读(273) 评论(0) 推荐(0)
摘要:#region 加入checkBox /// /// 加入checkBox /// /// private void chekBox(DataGridView datagridview) { DataGridViewCheckBoxColumn newColumn = new DataGridViewCheckBoxColumn();//添加CHECKBOX newColumn.HeaderText = "选择"; data... 阅读全文
posted @ 2013-11-30 10:12 秋千,为谁荡 阅读(480) 评论(0) 推荐(0)
摘要:private void dataGridView(DataGridView dataGridView) { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.Dat... 阅读全文
posted @ 2013-11-30 10:11 秋千,为谁荡 阅读(4466) 评论(0) 推荐(0)
摘要:#region 获取本机默认打印机名称 ArrayList al1=new ArrayLIst(); private static PrintDocument fPrintDocument = new PrintDocument(); /// /// 获取本机默认打印机名称 /// public static String DefaultPrinter { get { return fPrintDocument... 阅读全文
posted @ 2013-11-30 10:08 秋千,为谁荡 阅读(478) 评论(0) 推荐(0)