• 最后更新 2022-08-07
  • 销量/好评 0条评论
  • 交易规则(重要)

C#初学必看的黄金实例程序100个
本站优惠价
(查看会员价格)
4.90
2.1折 原价:¥23.00

安装服务

付费安装

开发语言

C#

源码大小

3.56M

服务由"源代码分享"发货,并提供售后服务。

    担保交易,安全保证,有问题不解决可申请退款。标价只是源码价格,不包括安装费。购买前请询问清楚卖家,以卖家承诺为准! 自动发货商品,随时可以购买,付款后在订单详情下载,零等待。 不同会员等级尊享不同购买折扣。



此为资源整理价格,不提供任何技术支持不包安装。新手不要买!

源码仅供研究学习代码使用,严禁用于非法和商业用途!如需商业用途请去购买官方正版源码!

只适用于老手和技术大神!发货后谢绝退款行为!



【源码介绍】

C#初学必看的黄金实例程序100个, 压缩包中有100个文件夹,包含100个实例,带有源码。包含各种小游戏、各种控件使用Demo,对初学者非常有帮助!

【源码截图】


【源码示例】


using System;using System.Drawing;using System.Drawing.Imaging;using System.Windows.Forms;namespace GraphicsCopyright{/// <summary>/// Summary description for Form1./// </summary>public class Form1 : System.Windows.Forms.Form{Image originalimage;private System.Windows.Forms.OpenFileDialog openFileDialog1;private System.Windows.Forms.PictureBox pictureBox1;private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Button btnAddCopyright; private System.Windows.Forms.Button btnOpenFile;/// <summary>/// Required designer variable./// </summary>private System.ComponentModel.Container components = null;public Form1(){//// Required for Windows Form Designer support//InitializeComponent();//// TODO: Add any constructor code after InitializeComponent call//}/// <summary>/// Clean up any resources being used./// </summary>protected override void Dispose( bool disposing ){if( disposing ){if (components != null) {components.Dispose();}}base.Dispose( disposing );}#region Windows Form Designer generated code/// <summary>/// Required method for Designer support - do not modify/// the contents of this method with the code editor./// </summary>private void InitializeComponent(){ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.btnAddCopyright = new System.Windows.Forms.Button(); this.btnOpenFile = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.SuspendLayout(); // // btnAddCopyright // this.btnAddCopyright.Enabled = false; this.btnAddCopyright.Location = new System.Drawing.Point(216, 240); this.btnAddCopyright.Name = "btnAddCopyright"; this.btnAddCopyright.Size = new System.Drawing.Size(164, 37); this.btnAddCopyright.TabIndex = 0; this.btnAddCopyright.Text = "添加版权信息"; this.btnAddCopyright.Click = new System.EventHandler(this.btnAddCopyright_Click); // // btnOpenFile // this.btnOpenFile.Location = new System.Drawing.Point(32, 240); this.btnOpenFile.Name = "btnOpenFile"; this.btnOpenFile.Size = new System.Drawing.Size(164, 37); this.btnOpenFile.TabIndex = 0; this.btnOpenFile.Text = "打开图像文件"; this.btnOpenFile.Click = new System.EventHandler(this.btnOpenFile_Click); // // pictureBox1 // this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.pictureBox1.Location = new System.Drawing.Point(8, 0); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(400, 224); this.pictureBox1.TabIndex = 0; this.pictureBox1.TabStop = false; // // groupBox1 // this.groupBox1.Location = new System.Drawing.Point(24, 224); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(368, 64); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(416, 301); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.pictureBox1, this.btnAddCopyright, this.btnOpenFile, this.groupBox1}); this.Name = "Form1"; this.Text = "给图像添加版权信息"; this.ResumeLayout(false); }#endregion/// <summary>/// The main entry point for the application./// </summary>[STAThread]static void Main() {Application.Run(new Form1());} private void btnOpenFile_Click(object sender, System.EventArgs e) { //Stream myStream; OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = "c:\\" ; openFileDialog1.Filter= "All files (*.*)|*.*"; openFileDialog1.FilterIndex = 2 ; openFileDialog1.RestoreDirectory = true ; if(openFileDialog1.ShowDialog() == DialogResult.OK) { originalimage = System.Drawing.Image.FromFile(openFileDialog1.FileName.ToString()); Image ithumbnail = originalimage.GetThumbnailImage(200, 200, null, new IntPtr()); pictureBox1.Image=ithumbnail; btnAddCopyright.Enabled = true; } } private void btnAddCopyright_Click(object sender, System.EventArgs e) { int imagewidth; int imageheight; int fontsize=300; int x,y; int a,re,gr,bl,x1,y1,z1; int size; Bitmap pattern; SizeF sizeofstring; bool foundfont; imagewidth=originalimage.Width; imageheight=originalimage.Height; size=imagewidth*imageheight; pattern = new Bitmap(imagewidth,imageheight); Bitmap temp = new Bitmap(originalimage); Graphics g = Graphics.FromImage(pattern); Graphics tempg =Graphics.FromImage(originalimage); //find a font size that will fit in the bitmap foundfont=false; g.Clear(Color.White); while(foundfont==false) { Font fc = new Font("Georgia", fontsize, System.Drawing.FontStyle.Bold); sizeofstring=new SizeF(imagewidth,imageheight); sizeofstring=g.MeasureString("DOTNET",fc); if (sizeofstring.Width<pattern.Width) { if (sizeofstring.Height<pattern.Height) { foundfont=true; g.DrawString("DOTNET", fc, new SolidBrush(Color.Black),1,1); } } else fontsize=fontsize-1; } MessageBox.Show("已创建新文件","给图像添加版权信息"); for(x=1;x<pattern.Width;x ) { for(y=1;y<pattern.Height;y )// { if (pattern.GetPixel(x,y).ToArgb()==Color.Black.ToArgb()) { a=temp.GetPixel(x,y).A; re=temp.GetPixel(x,y).R; gr=temp.GetPixel(x,y).G; bl=temp.GetPixel(x,y).B; x1=re; y1=gr; z1=bl; if (bl 25<255) bl=bl 25; if (gr 25<255) gr=gr 25; if (re 25<255) re=re 25; if (x1-25>0) x1=x1-25; if (y1-25>0) y1=y1-25; if (z1-25>0) z1=z1-25; tempg.DrawEllipse(new Pen(new SolidBrush(Color.Black)),x,y 1,3,3); tempg.DrawEllipse(new Pen(new SolidBrush(Color.FromArgb(a,x1,y1,z1))),x,y,1,1); } } } MessageBox.Show("输出文件是c:\\output.jpeg","给图像添加版权信息"); tempg.Save(); originalimage.Save("c:\\output.jpeg",ImageFormat.Jpeg); }}}


  • 商品评价
  • 交易规则


  • 发货方式


  • 自动:在特色服务中标有自动发货的商品,拍下后,源码类 软件类 商品会在订单详情页显示来自卖家的商品下载链接,点卡类 商品会在订单详情直接显示卡号密码。

    手动:未标有自动发货的的商品,付款后,商品卖家会收到平台的手机短信、邮件提醒,卖家会尽快为您发货,如卖家长时间未发货,买家也可通过订单上的QQ或电话主动联系卖家。


  • 退款说明


  • 1、源码类:商品详情(含标题)与实际源码不一致的(例:描述PHP实际为ASP、描述的功能实际缺少、功能不能正常使用等)!有演示站时,与实际源码不一致的(但描述中有"不保证完全一样、可能有少许偏差"类似显著公告的除外);

  • 2、营销推广:未达到卖家描述标准的;

    3、点卡软件所售点卡软件无法使用的;

  • 3、发货:手动发货商品,在卖家未发货前就申请了退款的;

    4、服务:卖家不提供承诺的售后服务的;(双方提前有商定和描述中有显著声明的除外)

    5、其他:如商品或服务有质量方面的硬性常规问题的。未符合详情及卖家承诺的。

  • 注:符合上述任一情况的,均支持退款,但卖家予以积极解决问题则除外。交易中的商品,卖家无法修改描述!


  • 注意事项


  • 1、在付款前,双方在QQ上所商定的内容,也是纠纷评判依据(商定与商品描述冲突时,以商定为准);

    2、源码商品,同时有网站演示与商品详情图片演示,且网站演示与商品详情图片演示不一致的,默认按商品详情图片演示作为纠纷评判依据(卖家有特别声明或有额外商定的除外);

  • 3、点卡软件商品,默认按商品详情作为纠纷评判依据(特别声明或有商定除外);

  • 4、营销推广商品,默认按商品详情作为纠纷评判依据(特别声明或有商定除外);

    5、在有"正当退款原因和依据"的前提下,写有"一旦售出,概不支持退款"等类似的声明,视为无效声明;

    6、虽然交易产生纠纷的几率很小,卖家也肯定会给买家最完善的服务!但请买卖双方尽量保留如聊天记录这样的重要信息,以防产生纠纷时便于送码网快速介入处理。


  • 送码声明


  • 1、送码网作为第三方中介平台,依据双方交易合同(商品描述、交易前商定的内容)来保障交易的安全及买卖双方的权益;

  • 2、非平台线上交易的项目,出现任何后果均与送码网无关;无论卖家以何理由要求线下交易的(如:要求买家支付宝转账付款的,微信转账付款的等),请联系管理举报,本平台将清退卖家处理。


热门推荐
浏览记录
手机二维码手机访问领取大礼包
返回顶部