You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.1 KiB
C#

// <copyright file="FrmAbout.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
using System;
using System.Drawing;
using System.Windows.Forms;
namespace PcgDrawR
{
/// <summary>
/// The frm about.
/// </summary>
public partial class FrmAbout : DevExpress.XtraEditors.XtraForm
{
/// <summary>
/// Initializes a new instance of the <see cref="FrmAbout"/> class.
/// </summary>
public FrmAbout()
{
InitializeComponent();
}
//protected override void WndProc(ref Message m)
//{
// Trace.WriteLine(m.Msg);
// switch (m.Msg)
// {
// case 0x0201://WM_LBUTTONDOWN
// {
// return;
// }
// case 0x0202://WM_LBUTTONUP
// {
// return;
// }
// case 0x0203://WM_LBUTTONDBLCLK
// {
// this.Close();
// return;
// }
// case 0x0204://WM_RBUTTONDOWN
// {
// return;
// }
// case 0x0205://WM_RBUTTONUP
// {
// return;
// }
// case 0x0206://WM_RBUTTONDBLCLK
// {
// return;
// }
// }
// base.WndProc(ref m);
//}
/// <summary>
/// Frms the about_ mouse click.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The e.</param>
private void FrmAbout_MouseClick(object sender, MouseEventArgs e)
{
this.Close();
}
/// <summary>
/// Frms the about_ load.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The e.</param>
private void FrmAbout_Load(object sender, EventArgs e)
{
if (Owner != null && this.StartPosition == FormStartPosition.CenterParent)
{
Location = new Point(
Owner.Location.X + (Owner.Width / 2) - (Width / 2),
Owner.Location.Y + (Owner.Height / 2) - (Height / 2));
}
lblVersion.Text = $"版本号:{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()}";
}
/// <summary>
/// Frms the about_ deactivate.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The e.</param>
private void FrmAbout_Deactivate(object sender, EventArgs e)
{
this.Close();
}
/// <summary>
/// Frms the about_ leave.
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The e.</param>
private void FrmAbout_Leave(object sender, EventArgs e)
{
this.Close();
}
}
}