home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2005 November / PCWELT_11_2005.ISO / pcwsoft / Commandbar-Source.z.exe / CommandBar / About.cs next >
Encoding:
Text File  |  2002-06-10  |  4.8 KB  |  141 lines

  1. // Pavel Zolnikov[http://www.codeproject.com/script/profile/whos_who.asp?id=35980], 2002
  2.  
  3. using System;
  4. using System.Drawing;
  5. using System.Collections;
  6. using System.Diagnostics;
  7. using System.Windows.Forms;
  8. using System.ComponentModel;
  9.  
  10. namespace CommandBar
  11. {
  12.     /// <summary>
  13.     /// About dialog.
  14.     /// </summary>
  15.     internal class About : System.Windows.Forms.Form
  16.     {
  17.         private System.Windows.Forms.Label label1;
  18.         private System.Windows.Forms.Label label2;
  19.         private System.Windows.Forms.LinkLabel pavel;
  20.         private System.Windows.Forms.LinkLabel email;
  21.         /// <summary>
  22.         /// Required designer variable.
  23.         /// </summary>
  24.         private System.ComponentModel.Container components = null;
  25.  
  26.         public About()
  27.         {
  28.             InitializeComponent();
  29.             pavel.Links[0].LinkData = "http://www.codeproject.com/script/profile/whos_who.asp?id=35980";
  30.             pavel.Links[0].Enabled = true;
  31.  
  32.             email.Links[0].LinkData = "mailto:pavelzolnikov@yahoo.com?subject=CommandBar";
  33.             email.Links[0].Enabled = true;
  34.         }
  35.  
  36.         /// <summary>
  37.         /// Clean up any resources being used.
  38.         /// </summary>
  39.         protected override void Dispose( bool disposing )
  40.         {
  41.             if( disposing )
  42.             {
  43.                 if(components != null)
  44.                 {
  45.                     components.Dispose();
  46.                 }
  47.             }
  48.             base.Dispose( disposing );
  49.         }
  50.  
  51.         #region Windows Form Designer generated code
  52.         /// <summary>
  53.         /// Required method for Designer support - do not modify
  54.         /// the contents of this method with the code editor.
  55.         /// </summary>
  56.         private void InitializeComponent()
  57.         {
  58.             System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(About));
  59.             this.label1 = new System.Windows.Forms.Label();
  60.             this.label2 = new System.Windows.Forms.Label();
  61.             this.pavel = new System.Windows.Forms.LinkLabel();
  62.             this.email = new System.Windows.Forms.LinkLabel();
  63.             this.SuspendLayout();
  64.             // 
  65.             // label1
  66.             // 
  67.             this.label1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  68.             this.label1.Location = new System.Drawing.Point(8, 8);
  69.             this.label1.Name = "label1";
  70.             this.label1.Size = new System.Drawing.Size(272, 32);
  71.             this.label1.TabIndex = 0;
  72.             this.label1.Text = "Command Prompt Explorer Bar";
  73.             // 
  74.             // label2
  75.             // 
  76.             this.label2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  77.             this.label2.Location = new System.Drawing.Point(8, 40);
  78.             this.label2.Name = "label2";
  79.             this.label2.Size = new System.Drawing.Size(272, 32);
  80.             this.label2.TabIndex = 0;
  81.             this.label2.Text = "version 1.1";
  82.             // 
  83.             // pavel
  84.             // 
  85.             this.pavel.Font = new System.Drawing.Font("Comic Sans MS", 12F);
  86.             this.pavel.Location = new System.Drawing.Point(8, 72);
  87.             this.pavel.Name = "pavel";
  88.             this.pavel.Size = new System.Drawing.Size(272, 32);
  89.             this.pavel.TabIndex = 1;
  90.             this.pavel.TabStop = true;
  91.             this.pavel.Text = "Pavel Zolnikov";
  92.             this.pavel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.pavel_LinkClicked);
  93.             // 
  94.             // email
  95.             // 
  96.             this.email.Image = ((System.Drawing.Bitmap)(resources.GetObject("email.Image")));
  97.             this.email.Location = new System.Drawing.Point(160, 62);
  98.             this.email.Name = "email";
  99.             this.email.Size = new System.Drawing.Size(72, 32);
  100.             this.email.TabIndex = 2;
  101.             this.email.TabStop = true;
  102.             this.email.Text = "e-mail";
  103.             this.email.TextAlign = System.Drawing.ContentAlignment.BottomRight;
  104.             this.email.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.email_LinkClicked);
  105.             // 
  106.             // About
  107.             // 
  108.             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  109.             this.ClientSize = new System.Drawing.Size(242, 104);
  110.             this.Controls.AddRange(new System.Windows.Forms.Control[] {
  111.                                                                           this.email,
  112.                                                                           this.pavel,
  113.                                                                           this.label1,
  114.                                                                           this.label2});
  115.             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  116.             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  117.             this.MaximizeBox = false;
  118.             this.MinimizeBox = false;
  119.             this.Name = "About";
  120.             this.ShowInTaskbar = false;
  121.             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  122.             this.Text = "About";
  123.             this.ResumeLayout(false);
  124.  
  125.         }
  126.         #endregion
  127.  
  128.         private void pavel_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
  129.         {
  130.             pavel.Links[pavel.Links.IndexOf(e.Link)].Visited = true;
  131.             System.Diagnostics.Process.Start(e.Link.LinkData.ToString());
  132.         }
  133.  
  134.         private void email_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
  135.         {
  136.             email.Links[email.Links.IndexOf(e.Link)].Visited = true;
  137.             System.Diagnostics.Process.Start(e.Link.LinkData.ToString());
  138.         }
  139.     }
  140. }
  141.