MyNes_src/MyNes/MMB.Forms/Form_ManagedMesssageBox.cs
2024-07-03 10:36:42 +08:00

141 lines
5.1 KiB
C#

using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
using MyNes.Properties;
namespace MMB.Forms;
public class Form_ManagedMesssageBox : Form
{
private IContainer components;
private Panel panel1;
public Label label_icon;
public Label label_message;
public TableLayoutPanel tableLayoutPanel1;
private Panel panel2;
public CheckBox checkBox1;
public RichTextBox richTextBox1;
public Form_ManagedMesssageBox()
{
InitializeComponent();
}
private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e)
{
try
{
Process.Start(e.LinkText);
}
catch
{
}
}
protected override void Dispose(bool disposing)
{
if (disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.label_icon = new System.Windows.Forms.Label();
this.label_message = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.panel2 = new System.Windows.Forms.Panel();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
base.SuspendLayout();
this.label_icon.Dock = System.Windows.Forms.DockStyle.Left;
this.label_icon.Image = MyNes.Properties.Resources.MessageIcon_Error;
this.label_icon.Location = new System.Drawing.Point(0, 0);
this.label_icon.Name = "label_icon";
this.label_icon.Size = new System.Drawing.Size(125, 127);
this.label_icon.TabIndex = 1;
this.label_message.Dock = System.Windows.Forms.DockStyle.Fill;
this.label_message.Font = new System.Drawing.Font("Tahoma", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
this.label_message.Location = new System.Drawing.Point(125, 0);
this.label_message.Name = "label_message";
this.label_message.Size = new System.Drawing.Size(308, 127);
this.label_message.TabIndex = 2;
this.label_message.Text = "Message";
this.label_message.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.panel1.Controls.Add(this.tableLayoutPanel1);
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 127);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(433, 31);
this.panel1.TabIndex = 3;
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(187, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100f));
this.tableLayoutPanel1.Size = new System.Drawing.Size(246, 31);
this.tableLayoutPanel1.TabIndex = 1;
this.panel2.Controls.Add(this.checkBox1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(187, 31);
this.panel2.TabIndex = 0;
this.checkBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.checkBox1.Location = new System.Drawing.Point(0, 0);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(187, 31);
this.checkBox1.TabIndex = 0;
this.checkBox1.Text = "checkBox1";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.Visible = false;
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(125, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(308, 127);
this.richTextBox1.TabIndex = 4;
this.richTextBox1.Text = "";
this.richTextBox1.Visible = false;
this.richTextBox1.WordWrap = false;
this.richTextBox1.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(richTextBox1_LinkClicked);
base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
base.ClientSize = new System.Drawing.Size(433, 158);
base.ControlBox = false;
base.Controls.Add(this.richTextBox1);
base.Controls.Add(this.label_message);
base.Controls.Add(this.label_icon);
base.Controls.Add(this.panel1);
base.MaximizeBox = false;
base.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(449, 197);
base.Name = "Form_ManagedMesssageBox";
base.ShowIcon = false;
base.ShowInTaskbar = false;
base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "...";
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
base.ResumeLayout(false);
}
}