您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 一款C#开发的国外FTP软件源代码
  所属分类: FTP
  开发工具:
  文件大小: 464kb
  下载次数: 0
  上传时间: 2010-01-13
  提 供 者: china******
 详细说明: using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace WinFormClient { /// /// remove dir dialog /// public class RemoveDir : System.Windows.Forms.Form { private System.Windows.Forms.Label lblMsg; private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnCancel; private System.ComponentModel.Container components = null; private string m_strDirectory=null; // directory name priv ate bool m_bOK=false; // true=form confirmed false=cancelled public string Directory { set { m_strDirectory=value; if (m_strDirectory!=null) lblMsg.Text="remove directory \""+m_strDirectory+"\" ?"; } get {return m_strDirectory;} } public bool OK { get {return m_bOK;} } // ------------------------------------------------------------------------- public RemoveDir() { InitializeComponent(); } // ------------------------------------------------------------------------- /// /// clean up any resources being used /// protected override void Dispose( bool disposing ) { if (disposing) { if (components!=null) { components.Dispose(); } } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.lblMsg = new System.Windows.Forms.Label(); this.btnOK = new System.Windows.Forms.Button(); this.btnCancel = new System.Windows.Forms.Button(); this.SuspendLayout(); // // lblMsg // this.lblMsg.Location = new System.Drawing.Point(16, 8); this.lblMsg.Name = "lblMsg"; this.lblMsg.Size = new System.Drawing.Size(320, 23); this.lblMsg.TabIndex = 0; // // btnOK // this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnOK.Location = new System.Drawing.Point(184, 40); this.btnOK.Name = "btnOK"; this.btnOK.TabIndex = 1; this.btnOK.Text = "OK"; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // btnCancel // this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnCancel.Location = new System.Drawing.Point(264, 40); this.btnCancel.Name = "btnCancel"; this.btnCancel.TabIndex = 2; this.btnCancel.Text = "Cancel"; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // RemoveDir // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(346, 72); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.btnCancel, this.btnOK, this.lblMsg}); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.KeyPreview = true; this.Name = "RemoveDir"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Remove directory"; this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.RemoveDir_KeyPress); this.ResumeLayout(false); } #endregion // ------------------------------------------------------------------------- /// /// form confirmation by clicking 'ok' button /// /// /// private void btnOK_Click(object sender, System.EventArgs e) { m_bOK=true; this.Close(); } // ------------------------------------------------------------------------- /// /// form cancellation /// /// /// private void btnCancel_Click(object sender, System.EventArgs e) { m_bOK=false; this.Close(); } // ------------------------------------------------------------------------- /// /// global key handler /// /// /// private void RemoveDir_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { // when 'enter' is pressed the form is closed if (e.KeyChar=='\r') { m_bOK=true; this.Close(); } // when 'esc' is pressed the form is closed if ((int)(e.KeyChar)==Convert.ToChar(Keys.Escape)) { this.Close(); } } } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 输入关键字,在本站1000多万海量源码库中尽情搜索: