登录
首页 » C# » C# delegate、Func、Action 使用示例

C# delegate、Func、Action 使用示例

于 2014-06-07 发布
0 272
下载积分: 1 下载次数: 0

代码说明:

C# delegate、Func、Action 使用示例

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 统计word和Excel的页数
    大量文档打印前,统计word和Excel的页数
    2015-02-08下载
    积分:1
  • asp.net 手机微网站源码 下载(含数据库)
    企业门户网站微网站,有列表页、内容详细页、在线留言、联系我们等模块,没有完善后台操作管理
    2014-11-12下载
    积分:1
  • C++实战源码-音频采集1(入门级实例566).zip
    C++实战源码-音频采集1(入门级实例566).zip
    2019-10-01下载
    积分:1
  • C# delegate、Func、Action 使用示例
    C# delegate、Func、Action 使用示例
    2014-06-07下载
    积分:1
  • DotRas EnablingDiagnosticLogging示例源码
    DotRas EnablingDiagnosticLogging示例源码
    2014-03-17下载
    积分:1
  • C++ 数字温度计程序设计例子
    C++ 数字温度计程序设计例子
    2015-05-20下载
    积分:1
  • C# 套打Demo
    套打Demo 【核心代码】using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.Printing;namespace Print_Demo{ public partial class Form1 : Form { public PrintDocument printDt = new PrintDocument(); //打印文档对象 Font printFont; //打印使用的字体 public Form1() { InitializeComponent(); } void printDt_PrintPage(object sender, PrintPageEventArgs e) { float pointX = 10; float pointY = 10; e.Graphics.DrawString("打印内容", new Font("宋体", 16F), Brushes.Black, pointX 60, pointY); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 26,pointX 300,pointY 26); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 35); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 56, pointX 300, pointY 56); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 65); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 86, pointX 300, pointY 86); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 95); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 116, pointX 300, pointY 116); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 125); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 146, pointX 300, pointY 146); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 155); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 176, pointX 300, pointY 176); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 185); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 206, pointX 300, pointY 206); e.Graphics.DrawString("检测结果", printFont, Brushes.Black, pointX, pointY 233); e.Graphics.DrawString("通过", new Font("宋体",22F,FontStyle.Bold), Brushes.Black, pointX 90, pointY 225); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 265, pointX 300, pointY 265); e.Graphics.DrawString("单位名称", printFont, Brushes.Black, pointX, pointY 275); } private void Form1_Load(object sender, EventArgs e) { printDt.PrintPage = new PrintPageEventHandler(printDt_PrintPage); printFont = new Font("宋体", 12F); } private void btnPrint_Click(object sender, EventArgs e) { //PrintDialog printDlg = new PrintDialog(); //printDlg.Document = printDt; //printDlg.AllowPrintToFile = true; //printDlg.AllowCurrentPage = true; //printDlg.AllowSelection = true; //printDlg.ShowDialog(); //printDlg.ShowDialog(); printDt.Print(); } private void btnLook_Click(object sender, EventArgs e) { PrintPreviewDialog printPreview = new PrintPreviewDialog(); printPreview.PrintPreviewControl.Document = printDt; printPreview.ShowDialog(this); } }}
    2021-05-06下载
    积分:1
  • 大话设计模式(带目录完整版)[中文PDF+源代码].zip
    大话设计模式(带目录完整版)[中文PDF+源代码].zip
    2019-10-12下载
    积分:1
  • 7Z压缩文件的 解压缩例子源码
    7Z压缩解压缩.zip
    2016-10-25下载
    积分:1
  • C#获取并连接wifi(于NativeWifi)
    managedwifi.zip
    2021-05-06下载
    积分:1
  • 696516资源总数
  • 106927会员总数
  • 1今日下载