C#添加Windows服务 定时任务

2019-12-30 16:01:57于丽

5.2 Form1.Designer.cs 代码


partial class Form1
 {
 /// <summary>
 /// 必需的设计器变量。 Form1.Designer.cs
 /// </summary>
 private System.ComponentModel.IContainer components = null;

 /// <summary>
 /// 清理所有正在使用的资源。
 /// </summary>
 /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
 protected override void Dispose(bool disposing)
 {
  if (disposing && (components != null))
  {
  components.Dispose();
  }
  base.Dispose(disposing);
 }

 #region Windows 窗体设计器生成的代码

 /// <summary>
 /// 设计器支持所需的方法 - 不要
 /// 使用代码编辑器修改此方法的内容。
 /// </summary>
 private void InitializeComponent()
 {
  System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
  this.button1 = new System.Windows.Forms.Button();
  this.button2 = new System.Windows.Forms.Button();
  this.textBox1 = new System.Windows.Forms.TextBox();
  this.button3 = new System.Windows.Forms.Button();
  this.SuspendLayout();
  // 
  // button1
  // 
  this.button1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  this.button1.Location = new System.Drawing.Point(12, 90);
  this.button1.Name = "button1";
  this.button1.Size = new System.Drawing.Size(134, 60);
  this.button1.TabIndex = 0;
  this.button1.Text = "启动服务";
  this.button1.UseVisualStyleBackColor = true;
  this.button1.Click += new System.EventHandler(this.button1_Click);
  // 
  // button2
  // 
  this.button2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  this.button2.Location = new System.Drawing.Point(280, 90);
  this.button2.Name = "button2";
  this.button2.Size = new System.Drawing.Size(134, 60);
  this.button2.TabIndex = 0;
  this.button2.Text = "停止服务";
  this.button2.UseVisualStyleBackColor = true;
  this.button2.Click += new System.EventHandler(this.button2_Click);
  // 
  // textBox1
  // 
  this.textBox1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  this.textBox1.ForeColor = System.Drawing.Color.Maroon;
  this.textBox1.Location = new System.Drawing.Point(108, 13);
  this.textBox1.Multiline = true;
  this.textBox1.Name = "textBox1";
  this.textBox1.Size = new System.Drawing.Size(306, 67);
  this.textBox1.TabIndex = 2;
  // 
  // button3
  // 
  this.button3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  this.button3.ForeColor = System.Drawing.Color.Blue;
  this.button3.Location = new System.Drawing.Point(12, 12);
  this.button3.Name = "button3";
  this.button3.Size = new System.Drawing.Size(90, 68);
  this.button3.TabIndex = 3;
  this.button3.Text = "请选择服务路径";
  this.button3.UseVisualStyleBackColor = true;
  this.button3.Click += new System.EventHandler(this.button3_Click);
  // 
  // Form1
  // 
  this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
  this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
  this.ClientSize = new System.Drawing.Size(419, 155);
  this.Controls.Add(this.button3);
  this.Controls.Add(this.textBox1);
  this.Controls.Add(this.button2);
  this.Controls.Add(this.button1);
  this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  this.Name = "Form1";
  this.Text = "选择服务程序";
  this.Load += new System.EventHandler(this.Form1_Load);
  this.ResumeLayout(false);
  this.PerformLayout();

 }

 #endregion

 private System.Windows.Forms.Button button1;
 private System.Windows.Forms.Button button2;
 private System.Windows.Forms.TextBox textBox1;
 private System.Windows.Forms.Button button3;
 }