|
/*
* Patrick Bounaix
* www.L0g1c4L.com
*
* See AssemblyInfo.cs
* for License Information
* */
#region using
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
#endregion
namespace L0g1c4L.ResxWriter.UI
{
/// <summary>
/// Summary description for FrmMessage.
/// </summary>
public class FrmMessage : System.Windows.Forms.Form
{
#region Private...
#region Properties
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.RichTextBox rtbMessage;
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.PictureBox pbBanner;
private System.Windows.Forms.Panel panel1;
private System.ComponentModel.IContainer components;
#endregion
#region Methods
#region Dispose
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#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.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FrmMessage));
this.btnOk = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.rtbMessage = new System.Windows.Forms.RichTextBox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.pbBanner = new System.Windows.Forms.PictureBox();
this.panel1 = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// btnOk
//
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.btnOk.Location = new System.Drawing.Point(92, 372);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(304, 40);
this.btnOk.TabIndex = 0;
this.btnOk.Text = "OK";
this.toolTip.SetToolTip(this.btnOk, "Click \'OK\' to close this window.");
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Location = new System.Drawing.Point(16, 356);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(456, 3);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
//
// rtbMessage
//
this.rtbMessage.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.rtbMessage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.rtbMessage.Location = new System.Drawing.Point(16, 80);
this.rtbMessage.Name = "rtbMessage";
this.rtbMessage.ReadOnly = true;
this.rtbMessage.Size = new System.Drawing.Size(456, 264);
this.rtbMessage.TabIndex = 2;
this.rtbMessage.Text = "";
this.rtbMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.rtbMessage_LinkClicked);
//
// pbBanner
//
this.pbBanner.BackColor = System.Drawing.Color.Transparent;
this.pbBanner.Dock = System.Windows.Forms.DockStyle.Right;
this.pbBanner.Image = ((System.Drawing.Image)(resources.GetObject("pbBanner.Image")));
this.pbBanner.Location = new System.Drawing.Point(-12, 0);
this.pbBanner.Name = "pbBanner";
this.pbBanner.Size = new System.Drawing.Size(500, 72);
this.pbBanner.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbBanner.TabIndex = 3;
this.pbBanner.TabStop = false;
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.pbBanner);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(488, 72);
this.panel1.TabIndex = 4;
//
// FrmMessage
//
this.AcceptButton = this.btnOk;
this.AutoScaleBaseSize = new System.Drawing.Size(7, 19);
this.ClientSize = new System.Drawing.Size(488, 429);
this.Controls.Add(this.panel1);
this.Controls.Add(this.rtbMessage);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnOk);
this.Font = new System.Drawing.Font("Tahoma", 11.25F);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmMessage";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
#region btnOk_Click
private void btnOk_Click(object sender, System.EventArgs e)
{
this.Close();
}
#endregion
#region btnOk_Click
private void rtbMessage_LinkClicked(object sender, System.Windows.Forms.LinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(e.LinkText);
}
#endregion
#endregion
#endregion
#region Public...
#region Constructor
/// <summary>
/// Default Constructor.
/// </summary>
public FrmMessage()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
}
#endregion
#region Methods
/// <summary>
/// Sets title and message text displayed in RichTextBox.
/// </summary>
/// <param name="title">string</param>
/// <param name="message">string</param>
public void SetMessageText(string title, string message)
{
this.Text = title;
this.rtbMessage.Text = "*\n\n" + message + "\n\n*";
}
#endregion
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.