using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Samsung_Playlist_Creator
{
///
/// Summary description for SplashScreen.
///
public class SplashScreen : System.Windows.Forms.Form
{
private System.Windows.Forms.LinkLabel lnkClose;
public const String BUILD_DATE = "6-3-2007";
private System.Windows.Forms.RichTextBox txtAbout;
private System.Windows.Forms.Timer closeTime;
private System.Windows.Forms.Timer fadeOutClose;
private System.ComponentModel.IContainer components;
public SplashScreen(bool autoExit)
{
InitializeComponent();
closeTime.Enabled = autoExit;
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.lnkClose = new System.Windows.Forms.LinkLabel();
this.txtAbout = new System.Windows.Forms.RichTextBox();
this.closeTime = new System.Windows.Forms.Timer(this.components);
this.fadeOutClose = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// lnkClose
//
this.lnkClose.AutoSize = true;
this.lnkClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lnkClose.LinkColor = System.Drawing.Color.Red;
this.lnkClose.Location = new System.Drawing.Point(430, 240);
this.lnkClose.Name = "lnkClose";
this.lnkClose.Size = new System.Drawing.Size(174, 25);
this.lnkClose.TabIndex = 1;
this.lnkClose.TabStop = true;
this.lnkClose.Text = "Click Here to Close";
this.lnkClose.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkClose_LinkClicked);
//
// txtAbout
//
this.txtAbout.BackColor = System.Drawing.Color.LightSteelBlue;
this.txtAbout.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtAbout.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtAbout.ForeColor = System.Drawing.Color.Black;
this.txtAbout.Location = new System.Drawing.Point(16, 16);
this.txtAbout.Name = "txtAbout";
this.txtAbout.ReadOnly = true;
this.txtAbout.Size = new System.Drawing.Size(592, 200);
this.txtAbout.TabIndex = 2;
this.txtAbout.Text = "";
this.txtAbout.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.txtAbout_LinkClicked);
//
// closeTime
//
this.closeTime.Enabled = true;
this.closeTime.Interval = 3000;
this.closeTime.Tick += new System.EventHandler(this.closeTime_Tick);
//
// fadeOutClose
//
this.fadeOutClose.Interval = 50;
this.fadeOutClose.Tick += new System.EventHandler(this.fadeOutClose_Tick);
//
// SplashScreen
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.Color.MidnightBlue;
this.ClientSize = new System.Drawing.Size(624, 280);
this.Controls.Add(this.txtAbout);
this.Controls.Add(this.lnkClose);
this.ForeColor = System.Drawing.Color.Linen;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "SplashScreen";
this.Opacity = 0.86;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "About";
this.TopMost = true;
this.Load += new System.EventHandler(this.SplashScreen_Load);
this.ResumeLayout(false);
}
#endregion
private void lnkClose_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
closeTime.Enabled = false;
fadeOutClose.Enabled = true;
}
private void SplashScreen_Load(object sender, System.EventArgs e)
{
txtAbout.Text = "Samsung Playlist Creator, Build Date: "+ BUILD_DATE +",\rCopyright (C) 2007 Jmaxxz" +
"\rSamsung Playlist Creator comes with ABSOLUTELY NO WARRANTY; See GPL version 2 for details."+
"\r\rThis is free software, and you are welcome to redistribute it"
+ "\runder certain conditions; See GPL version 2 for details."+
"\r\rPlease visit us at: http://www.jmaxxz.com";
}
private void txtAbout_LinkClicked(object sender, System.Windows.Forms.LinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(e.LinkText);
}
private void closeTime_Tick(object sender, System.EventArgs e)
{
closeTime.Enabled = false;
fadeOutClose.Enabled = true;
}
private void fadeOutClose_Tick(object sender, System.EventArgs e)
{
if (this.Opacity > .05)
this.Opacity = this.Opacity - .05;
else
this.Close();
}
}
}