+++ /dev/null
-using System;\r
-using System.Collections.Generic;\r
-using System.Text;\r
-using System.Windows.Forms;\r
-using System.ComponentModel;\r
-using System.Drawing;\r
-using DTXCreator.Properties;\r
-\r
-namespace DTXCreator.汎用\r
-{\r
- public partial class Cメッセージポップアップ : Form\r
- {\r
- public Cメッセージポップアップ( string strメッセージ )\r
- {\r
- this.InitializeComponent();\r
- this.strメッセージ = strメッセージ;\r
- this.ftフォント = new Font( "MS PGothic", 10f );\r
- }\r
-\r
- private string strメッセージ;\r
- private Font ftフォント;\r
-\r
- private void Cメッセージポップアップ_FormClosing( object sender, FormClosingEventArgs e )\r
- {\r
- this.ftフォント.Dispose();\r
- }\r
- private void Cメッセージポップアップ_Load( object sender, EventArgs e )\r
- {\r
- base.Location = new Point( base.Owner.Location.X + ( ( base.Owner.Width - base.Width ) / 2 ), base.Owner.Location.Y + ( ( base.Owner.Height - base.Height ) / 2 ) );\r
- }\r
- private void panelメッセージ_Paint( object sender, PaintEventArgs e )\r
- {\r
- SolidBrush brush = new SolidBrush( Color.Black );\r
- RectangleF layoutRectangle = new RectangleF( 0f, 0f, (float) this.panelメッセージ.ClientSize.Width, (float) this.panelメッセージ.ClientSize.Height );\r
- StringFormat format = new StringFormat();\r
- format.LineAlignment = StringAlignment.Center;\r
- format.Alignment = StringAlignment.Near;\r
- e.Graphics.DrawString( this.strメッセージ, this.ftフォント, brush, layoutRectangle, format );\r
- brush.Dispose();\r
- }\r
- }\r
-}\r