imported hobo11 data... this is a fragment of vmware svn, whatever I had
[tues-crep.git] / sites / hobo11.nerdland.org / coursework / 20070 / dfontanesi / .svn / text-base / Splash.cs.svn-base
blob769d5509f51f0f906ff845a3360f296a9acd0a30
1 using System;\r
2 using System.Drawing;\r
3 using System.Collections;\r
4 using System.ComponentModel;\r
5 using System.Windows.Forms;\r
6 \r
7 namespace BlackJack\r
8 {\r
9         /// <summary>\r
10         /// Summary description for Splash.\r
11         /// </summary>\r
12         public class Splash : System.Windows.Forms.Form\r
13         {\r
14                 private System.Windows.Forms.Timer tmrSplash;\r
15                 private System.ComponentModel.IContainer components;\r
16                 private System.Windows.Forms.Label lblVersion;\r
17                 private static bool fadeOut = false;\r
19                 public Splash()\r
20                 {\r
21                         //\r
22                         // Required for Windows Form Designer support\r
23                         //\r
24                         InitializeComponent();\r
26                         this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);\r
27                         this.SetStyle(ControlStyles.UserPaint, true);\r
28                         this.SetStyle(ControlStyles.DoubleBuffer, true);\r
29                 }\r
31                 /// <summary>\r
32                 /// Clean up any resources being used.\r
33                 /// </summary>\r
34                 protected override void Dispose( bool disposing )\r
35                 {\r
36                         if( disposing )\r
37                         {\r
38                                 if(components != null)\r
39                                 {\r
40                                         components.Dispose();\r
41                                 }\r
42                         }\r
43                         base.Dispose( disposing );\r
44                 }\r
46                 #region Windows Form Designer generated code\r
47                 /// <summary>\r
48                 /// Required method for Designer support - do not modify\r
49                 /// the contents of this method with the code editor.\r
50                 /// </summary>\r
51                 private void InitializeComponent()\r
52                 {\r
53                         this.components = new System.ComponentModel.Container();\r
54                         System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Splash));\r
55                         this.tmrSplash = new System.Windows.Forms.Timer(this.components);\r
56                         this.lblVersion = new System.Windows.Forms.Label();\r
57                         this.SuspendLayout();\r
58                         // \r
59                         // tmrSplash\r
60                         // \r
61                         this.tmrSplash.Enabled = true;\r
62                         this.tmrSplash.Interval = 3000;\r
63                         this.tmrSplash.Tick += new System.EventHandler(this.tmrSplash_Tick);\r
64                         // \r
65                         // lblVersion\r
66                         // \r
67                         this.lblVersion.BackColor = System.Drawing.Color.Transparent;\r
68                         this.lblVersion.Font = new System.Drawing.Font("Times New Roman", 6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));\r
69                         this.lblVersion.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(64)), ((System.Byte)(64)), ((System.Byte)(64)));\r
70                         this.lblVersion.Location = new System.Drawing.Point(8, 309);\r
71                         this.lblVersion.Name = "lblVersion";\r
72                         this.lblVersion.Size = new System.Drawing.Size(216, 23);\r
73                         this.lblVersion.TabIndex = 0;\r
74                         this.lblVersion.Text = "version";\r
75                         // \r
76                         // Splash\r
77                         // \r
78                         this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);\r
79                         this.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.BackgroundImage")));\r
80                         this.ClientSize = new System.Drawing.Size(425, 326);\r
81                         this.ControlBox = false;\r
82                         this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
83                                                                                                                                                   this.lblVersion});\r
84                         this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;\r
85                         this.Name = "Splash";\r
86                         this.ShowInTaskbar = false;\r
87                         this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;\r
88                         this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
89                         this.Text = "Blackjack";\r
90                         this.TopMost = true;\r
91                         this.Click += new System.EventHandler(this.Splash_Click);\r
92                         this.Load += new System.EventHandler(this.Splash_Load);\r
93                         this.ResumeLayout(false);\r
95                 }\r
96                 #endregion\r
98                 private void tmrSplash_Tick(object sender, System.EventArgs e)\r
99                 {\r
100                         if( fadeOut )\r
101                         {\r
102                                 tmrSplash.Interval = 10;\r
103                                 this.Opacity -= .02;\r
104                                 if( this.Opacity == 0 )\r
105                                 {\r
106                                         tmrSplash.Enabled = false;\r
107                                         Close();\r
108                                 }\r
109                         }\r
110                         else\r
111                         {\r
112                                 fadeOut = true;\r
113                         }\r
114                 }\r
116                 private void Splash_Click(object sender, System.EventArgs e)\r
117                 {\r
118                         Close();\r
119                 }\r
121                 private void Splash_Load(object sender, System.EventArgs e)\r
122                 {\r
123                         lblVersion.Text = "version " + Application.ProductVersion.ToString();\r
124                 }\r
125         }\r