随笔分类 - C#
摘要:/// /// 计算时间差值 /// /// /// /// private string DateDiff(DateTime DateTime1, DateTime DateTime2) { string dateDiff = null; TimeSpan ts1 = new TimeSpan(DateTime1.Ticks); TimeSpan ts2 = new TimeSpan(DateTime2.Ticks);...
阅读全文
摘要:FolderBrowserDialog path = new FolderBrowserDialog(); path.ShowDialog(); MessageBox.Show(path.SelectedPath);
阅读全文
摘要: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...
阅读全文
摘要:#region 加入checkBox /// /// 加入checkBox /// /// private void chekBox(DataGridView datagridview) { DataGridViewCheckBoxColumn newColumn = new DataGridViewCheckBoxColumn();//添加CHECKBOX newColumn.HeaderText = "选择"; data...
阅读全文
摘要: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...
阅读全文
摘要:#region 获取本机默认打印机名称 ArrayList al1=new ArrayLIst(); private static PrintDocument fPrintDocument = new PrintDocument(); /// /// 获取本机默认打印机名称 /// public static String DefaultPrinter { get { return fPrintDocument...
阅读全文

浙公网安备 33010602011771号