错误弹窗记录
publicpartialclassErrorForm:Form{privatestaticstringerror_str系统错误;publicErrorForm(){InitializeComponent();pictureBox1.ImageSystemIcons.Error.ToBitmap();pictureBox1.SizeModePictureBoxSizeMode.StretchImage;label1.TextError_str;}publicstaticstringError_str{geterror_str;seterror_strvalue;}privatevoidbutton1_Click(objectsender,EventArgse){this.Close();this.Dispose();}publicvoidUpdateErrorMessage(stringnewMessage){if(label1!null){label1.TextnewMessage;}}privatevoidbutton2_Click(objectsender,EventArgse){button2.BackColorColor.White;for(inti0;i10;i)PLC_RUN.set_SYSTEM_info(PLC_DB_info.Err_Reset,false);this.Close();this.Dispose();}}partial class ErrorForm{////// Required designer variable.///private System.ComponentModel.IContainer components null;/// summary /// Clean up any resources being used. /// /summary /// param namedisposingtrue if managed resources should be disposed; otherwise, false./param protected override void Dispose(bool disposing) { if (disposing (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.pictureBox1 new System.Windows.Forms.PictureBox(); this.panel1 new System.Windows.Forms.Panel(); this.button1 new System.Windows.Forms.Button(); this.label1 new System.Windows.Forms.Label(); this.button2 new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // pictureBox1 // this.pictureBox1.Location new System.Drawing.Point(347, 12); this.pictureBox1.Name pictureBox1; this.pictureBox1.Size new System.Drawing.Size(98, 98); this.pictureBox1.TabIndex 0; this.pictureBox1.TabStop false; // // panel1 // this.panel1.Anchor ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panel1.AutoScroll true; this.panel1.Controls.Add(this.label1); this.panel1.Location new System.Drawing.Point(12, 116); this.panel1.Name panel1; this.panel1.Size new System.Drawing.Size(776, 279); this.panel1.TabIndex 1; // // button1 // this.button1.Anchor System.Windows.Forms.AnchorStyles.Bottom; this.button1.BackColor System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); this.button1.Font new System.Drawing.Font(宋体, 12F); this.button1.Location new System.Drawing.Point(263, 401); this.button1.Name button1; this.button1.Size new System.Drawing.Size(110, 40); this.button1.TabIndex 2; this.button1.Text 关 闭; this.button1.UseVisualStyleBackColor false; this.button1.Click new System.EventHandler(this.button1_Click); // // label1 // this.label1.AutoSize true; this.label1.Font new System.Drawing.Font(宋体, 13F); this.label1.ForeColor System.Drawing.Color.Red; this.label1.Location new System.Drawing.Point(33, 22); this.label1.Name label1; this.label1.Size new System.Drawing.Size(76, 22); this.label1.TabIndex 0; this.label1.Text label1; this.label1.TextAlign System.Drawing.ContentAlignment.MiddleLeft; // // button2 // this.button2.BackColor System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); this.button2.Font new System.Drawing.Font(宋体, 10F); this.button2.ForeColor System.Drawing.Color.Black; this.button2.Location new System.Drawing.Point(396, 400); this.button2.Name button2; this.button2.Size new System.Drawing.Size(110, 40); this.button2.TabIndex 3; this.button2.Text 复位错误; this.button2.UseVisualStyleBackColor false; this.button2.Click new System.EventHandler(this.button2_Click); // // ErrorForm // this.AutoScaleDimensions new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode System.Windows.Forms.AutoScaleMode.Font; this.BackColor System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); this.ClientSize new System.Drawing.Size(800, 450); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.panel1); this.Controls.Add(this.pictureBox1); this.ForeColor System.Drawing.Color.White; this.FormBorderStyle System.Windows.Forms.FormBorderStyle.None; this.Name ErrorForm; this.ShowInTaskbar false; this.StartPosition System.Windows.Forms.FormStartPosition.CenterParent; this.Text ErrorForm; this.TopMost true; ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Button button1; private Label label1; private Button button2; }
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2434047.html
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!