科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网软件频道使用C#编写的一个定时关机程序之二

使用C#编写的一个定时关机程序之二

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

   this.dateTimePicker.CalendarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Dr

作者:中国IT实验室 来源:中国IT实验室 2007年9月11日

关键字: C# 使用 编程

  • 评论
  • 分享微博
  • 分享邮件
  

   this.dateTimePicker.CalendarFont = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.dateTimePicker.Cursor = System.Windows.Forms.Cursors.Arrow;
   this.dateTimePicker.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.dateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Time;
   this.dateTimePicker.Location = new System.Drawing.Point(184, 32);
   this.dateTimePicker.Name = "dateTimePicker";
   this.dateTimePicker.RightToLeft = System.Windows.Forms.RightToLeft.No;
   this.dateTimePicker.Size = new System.Drawing.Size(112, 21);
   this.dateTimePicker.TabIndex = 1;
   this.dateTimePicker.Value = new System.DateTime(2002, 9, 27, 0, 0, 0, 0);
   this.dateTimePicker.ValueChanged += new System.EventHandler(this.dateTimePicker_ValueChanged);
   //
   // labelDateTimeNow
   //
   this.labelDateTimeNow.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.labelDateTimeNow.Location = new System.Drawing.Point(8, 8);
   this.labelDateTimeNow.Name = "labelDateTimeNow";
   this.labelDateTimeNow.Size = new System.Drawing.Size(120, 16);
   this.labelDateTimeNow.TabIndex = 4;
   this.labelDateTimeNow.Text = "当前时间:";
   this.labelDateTimeNow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
   //
   // labelDateTimeShutdown
   //
   this.labelDateTimeShutdown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.labelDateTimeShutdown.Location = new System.Drawing.Point(8, 32);
   this.labelDateTimeShutdown.Name = "labelDateTimeShutdown";
   this.labelDateTimeShutdown.Size = new System.Drawing.Size(120, 16);
   this.labelDateTimeShutdown.TabIndex = 5;
   this.labelDateTimeShutdown.Text = "任务时间:";
   this.labelDateTimeShutdown.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
   //
   // labelNow
   //
   this.labelNow.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.labelNow.ForeColor = System.Drawing.SystemColors.ControlText;
   this.labelNow.Location = new System.Drawing.Point(136, 8);
   this.labelNow.Name = "labelNow";
   this.labelNow.Size = new System.Drawing.Size(136, 16);
   this.labelNow.TabIndex = 1;
   this.labelNow.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
   //
   // labelShutdown
   //
   this.labelShutdown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.labelShutdown.ForeColor = System.Drawing.SystemColors.ControlText;
   this.labelShutdown.Location = new System.Drawing.Point(136, 32);
   this.labelShutdown.Name = "labelShutdown";
   this.labelShutdown.Size = new System.Drawing.Size(136, 16);
   this.labelShutdown.TabIndex = 8;
   this.labelShutdown.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
   //
   // panelParent
   //
   this.panelParent.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
   this.panelParent.Controls.Add(this.panelChild);
   this.panelParent.Location = new System.Drawing.Point(8, 60);
   this.panelParent.Name = "panelParent";
   this.panelParent.Size = new System.Drawing.Size(288, 60);
   this.panelParent.TabIndex = 6;
   //
   // panelChild
   //
   this.panelChild.Controls.Add(this.labelNow);
   this.panelChild.Controls.Add(this.labelShutdown);
   this.panelChild.Controls.Add(this.labelDateTimeShutdown);
   this.panelChild.Controls.Add(this.labelDateTimeNow);
   this.panelChild.Location = new System.Drawing.Point(0, 0);
   this.panelChild.Name = "panelChild";
   this.panelChild.Size = new System.Drawing.Size(280, 56);
   this.panelChild.TabIndex = 8;
   //
   // buttonCancel
   //
   this.buttonCancel.Cursor = System.Windows.Forms.Cursors.Hand;
   this.buttonCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
   this.buttonCancel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.buttonCancel.Location = new System.Drawing.Point(176, 128);
   this.buttonCancel.Name = "buttonCancel";
   this.buttonCancel.Size = new System.Drawing.Size(56, 23);
   this.buttonCancel.TabIndex = 4;
   this.buttonCancel.Text = "取消&C";
   this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
   //
   // buttonInvoke
   //
   this.buttonInvoke.Cursor = System.Windows.Forms.Cursors.Hand;
   this.buttonInvoke.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
   this.buttonInvoke.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.buttonInvoke.Location = new System.Drawing.Point(240, 128);
   this.buttonInvoke.Name = "buttonInvoke";
   this.buttonInvoke.Size = new System.Drawing.Size(56, 23);
   this.buttonInvoke.TabIndex = 3;
   this.buttonInvoke.Text = "确定&O";
   this.buttonInvoke.Click += new System.EventHandler(this.buttonInvoke_Click);
   //
   // checkBox
   //
   this.checkBox.Cursor = System.Windows.Forms.Cursors.Hand;
   this.checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
   this.checkBox.Location = new System.Drawing.Point(8, 128);
   this.checkBox.Name = "checkBox";
   this.checkBox.Size = new System.Drawing.Size(66, 24);
   this.checkBox.TabIndex = 2;
   this.checkBox.Text = "强制&B";
   //
   // TimerComputerShutdown
   //
   this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
   this.BackColor = System.Drawing.Color.GhostWhite;
   this.ClientSize = new System.Drawing.Size(306, 159);
   this.Controls.Add(this.checkBox);
   this.Controls.Add(this.comboBox);
   this.Controls.Add(this.labelWhatDoYouWantTheComputerToDo);
   this.Controls.Add(this.panelParent);
   this.Controls.Add(this.buttonCancel);
   this.Controls.Add(this.buttonInvoke);
   this.Controls.Add(this.dateTimePicker);
   this.Controls.Add(this.labelSelectDateTimeToShutdownComputer);
   this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
   this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
   this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
   this.MaximizeBox = false;
   this.Name = "TimerComputerShutdown";
   this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
   this.Text = "Timer Computer Shutdown";
   this.TopMost = true;
   this.Load += new System.EventHandler(this.TimerComputerShutdown_Load);
   this.panelParent.ResumeLayout(false);
   this.panelChild.ResumeLayout(false);
   this.ResumeLayout(false);

  }

 

查看本文来源

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章