Sylloge
A C# helper library
code/Forms/About.cs
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 using System;
00017 using System.Collections.Generic;
00018 using System.ComponentModel;
00019 using System.Drawing;
00020 using System.Reflection;
00021 using System.Windows.Forms;
00022 
00023 namespace Sylloge
00024 {
00025     namespace Forms
00026     {
00030         public partial class About : Form
00031         {
00032 
00033             #region Local Attributes
00034 
00035             private volatile bool _IsShown;
00036 
00037             #endregion
00038 
00039             #region Class Methods and Properties
00040 
00044             public About()
00045             {
00046                 this._initialize(Sylloge.App.Info.Logo);
00047             }
00048 
00053             public About(System.Drawing.Image img)
00054             {
00055                 this._initialize(img);
00056             }
00057 
00061             public new void Hide()
00062             {
00063                 this.IsShown = false;
00064             }
00065 
00069             public bool IsShown
00070             {
00071                 get
00072                 {
00073                     return this._IsShown;
00074                 }
00075                 set
00076                 {
00077                     this._IsShown = value;
00078                     this.Visible = value;
00079                 }
00080             }
00081 
00085             public new void Show()
00086             {
00087                 this.IsShown = true;
00088             }
00089 
00094             private void _initialize(System.Drawing.Image img)
00095             {
00096                 this.InitializeComponent();
00097                 this.c_PictureBoxLogo.Image = img;
00098                 this.Text = String.Format("About {0}", Sylloge.App.Info.Title);
00099                 this.c_LabelProductName.Text = Sylloge.App.Info.Product;
00100                 this.c_LabelVersion.Text = String.Format("Version {0}", Sylloge.App.Info.Version);
00101                 this.c_LabelCopyright.Text = Sylloge.App.Info.Copyright;
00102                 this.c_LabelCompanyName.Text = Sylloge.App.Info.Company;
00103                 this.c_TextBoxDescription.Text = Sylloge.App.Info.Description;
00104             }
00105 
00106             #endregion
00107 
00108             #region Form Event Handlers
00109 
00110             private void f_About_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
00111             {
00112                 e.Cancel = true;
00113                 this.IsShown = false;
00114             }
00115 
00116             private void f_About_Shown(object sender, System.EventArgs e)
00117             {
00118                 this._IsShown = true;
00119             }
00120 
00121             private void c_ButtonOk_Click(object sender, EventArgs e)
00122             {
00123                 this.IsShown = false;
00124             }
00125 
00126             #endregion
00127         }
00128     }
00129 }
 All Classes Namespaces Files Functions Variables Enumerations Properties Events