Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1236 → Rev 1237

/TCPproxy/trunk/AssemblyInfo.cs
29,5 → 29,5
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
/TCPproxy/trunk/AboutForm.cs
4,6 → 4,7
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
 
namespace TCPproxy
{
10,14 → 11,11
public class AboutForm : Form
{
private System.ComponentModel.IContainer components = null;
private Label appLabel;
private Label copyrightLabel;
private Label license1Label;
private Label copyrightLabel;
private Button okButton;
private LinkLabel homePageLabel;
private Label versionLabel;
private Label license2Label;
private Label warrantyLabel;
private Label versionLabel;
private Label appNameLabel;
 
#region Windows Form Designer generated code
 
27,114 → 25,87
/// </summary>
private void InitializeComponent()
{
this.appLabel = new Label();
this.copyrightLabel = new Label();
this.license1Label = new Label();
this.okButton = new Button();
this.homePageLabel = new LinkLabel();
this.versionLabel = new Label();
this.license2Label = new Label();
this.warrantyLabel = new Label();
this.SuspendLayout();
//
// appLabel
//
this.appLabel.AutoSize = true;
this.appLabel.Font = new System.Drawing.Font("Arial", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.appLabel.Location = new System.Drawing.Point(12, 16);
this.appLabel.Name = "appLabel";
this.appLabel.Size = new System.Drawing.Size(146, 32);
this.appLabel.TabIndex = 0;
this.appLabel.Text = "TCPproxy";
//
// copyrightLabel
//
this.copyrightLabel.AutoSize = true;
this.copyrightLabel.Location = new System.Drawing.Point(32, 60);
this.copyrightLabel.Name = "copyrightLabel";
this.copyrightLabel.Size = new System.Drawing.Size(195, 13);
this.copyrightLabel.TabIndex = 1;
this.copyrightLabel.Text = "Copyright (c) 2005-2006 Anatoli Klassen";
//
// license1Label
//
this.license1Label.AutoSize = true;
this.license1Label.Location = new System.Drawing.Point(32, 108);
this.license1Label.Name = "license1Label";
this.license1Label.Size = new System.Drawing.Size(126, 13);
this.license1Label.TabIndex = 2;
this.license1Label.Text = "\"Public domain\" software";
//
// okButton
//
this.okButton.Anchor = ((AnchorStyles)((AnchorStyles.Bottom | AnchorStyles.Right)));
this.okButton.DialogResult = DialogResult.OK;
this.okButton.Location = new System.Drawing.Point(205, 217);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 3;
this.okButton.Text = "OK";
//
// homePageLabel
//
this.homePageLabel.AutoSize = true;
this.homePageLabel.Location = new System.Drawing.Point(32, 188);
this.homePageLabel.Name = "homePageLabel";
this.homePageLabel.Size = new System.Drawing.Size(229, 13);
this.homePageLabel.TabIndex = 4;
this.homePageLabel.TabStop = true;
this.homePageLabel.Text = "http://www.26th.net/public/projects/tcpproxy/";
this.homePageLabel.LinkClicked += new LinkLabelLinkClickedEventHandler(this.homePageLabel_LinkClicked);
//
// versionLabel
//
this.versionLabel.AutoSize = true;
this.versionLabel.Location = new System.Drawing.Point(32, 76);
this.versionLabel.Name = "versionLabel";
this.versionLabel.Size = new System.Drawing.Size(60, 13);
this.versionLabel.TabIndex = 5;
this.versionLabel.Text = "Version 1.0";
//
// license2Label
//
this.license2Label.AutoSize = true;
this.license2Label.Location = new System.Drawing.Point(32, 124);
this.license2Label.Name = "license2Label";
this.license2Label.Size = new System.Drawing.Size(180, 13);
this.license2Label.TabIndex = 6;
this.license2Label.Text = "- you are allowed to use it in any way";
//
// warrantyLabel
//
this.warrantyLabel.AutoSize = true;
this.warrantyLabel.Location = new System.Drawing.Point(32, 156);
this.warrantyLabel.Name = "warrantyLabel";
this.warrantyLabel.Size = new System.Drawing.Size(64, 13);
this.warrantyLabel.TabIndex = 7;
this.warrantyLabel.Text = "No warranty";
//
// AboutForm
//
this.AcceptButton = this.okButton;
this.CancelButton = this.okButton;
this.ClientSize = new System.Drawing.Size(292, 252);
this.Controls.Add(this.warrantyLabel);
this.Controls.Add(this.license2Label);
this.Controls.Add(this.versionLabel);
this.Controls.Add(this.homePageLabel);
this.Controls.Add(this.okButton);
this.Controls.Add(this.license1Label);
this.Controls.Add(this.copyrightLabel);
this.Controls.Add(this.appLabel);
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutForm";
this.ShowInTaskbar = false;
this.StartPosition = FormStartPosition.CenterParent;
this.Text = "About TCPproxy";
this.ResumeLayout(false);
this.PerformLayout();
this.copyrightLabel = new System.Windows.Forms.Label();
this.okButton = new System.Windows.Forms.Button();
this.homePageLabel = new System.Windows.Forms.LinkLabel();
this.versionLabel = new System.Windows.Forms.Label();
this.appNameLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// copyrightLabel
//
this.copyrightLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.copyrightLabel.Location = new System.Drawing.Point(32, 89);
this.copyrightLabel.Name = "copyrightLabel";
this.copyrightLabel.Size = new System.Drawing.Size(248, 49);
this.copyrightLabel.TabIndex = 1;
this.copyrightLabel.Text = "Copyright [copyright notice]";
this.copyrightLabel.UseMnemonic = false;
//
// okButton
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(206, 172);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 3;
this.okButton.Text = "OK";
//
// homePageLabel
//
this.homePageLabel.AutoSize = true;
this.homePageLabel.Location = new System.Drawing.Point(32, 147);
this.homePageLabel.Name = "homePageLabel";
this.homePageLabel.Size = new System.Drawing.Size(229, 13);
this.homePageLabel.TabIndex = 4;
this.homePageLabel.TabStop = true;
this.homePageLabel.Text = "http://www.26th.net/public/projects/tcpproxy/";
this.homePageLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.homePageLabel_LinkClicked);
//
// versionLabel
//
this.versionLabel.AutoSize = true;
this.versionLabel.Location = new System.Drawing.Point(32, 64);
this.versionLabel.Name = "versionLabel";
this.versionLabel.Size = new System.Drawing.Size(111, 13);
this.versionLabel.TabIndex = 5;
this.versionLabel.Text = "Version [build number]";
this.versionLabel.UseMnemonic = false;
//
// appNameLabel
//
this.appNameLabel.AutoSize = true;
this.appNameLabel.Font = new System.Drawing.Font("Arial", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.appNameLabel.Location = new System.Drawing.Point(30, 9);
this.appNameLabel.Name = "appNameLabel";
this.appNameLabel.Size = new System.Drawing.Size(72, 29);
this.appNameLabel.TabIndex = 8;
this.appNameLabel.Text = "[title]";
this.appNameLabel.UseMnemonic = false;
//
// AboutForm
//
this.AcceptButton = this.okButton;
this.CancelButton = this.okButton;
this.ClientSize = new System.Drawing.Size(293, 207);
this.Controls.Add(this.appNameLabel);
this.Controls.Add(this.versionLabel);
this.Controls.Add(this.homePageLabel);
this.Controls.Add(this.okButton);
this.Controls.Add(this.copyrightLabel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About [title]";
this.Load += new System.EventHandler(this.AboutForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
 
}
 
#endregion
157,5 → 128,35
homePageLabel.LinkVisited = true;
System.Diagnostics.Process.Start(homePageLabel.Text);
}
 
private void AboutForm_Load(object sender, EventArgs e)
{
Assembly running = Assembly.GetExecutingAssembly();
AssemblyName name = running.GetName();
 
// get version
versionLabel.Text = string.Format("Version {0}.{1}.{2}",
name.Version.Major, name.Version.Minor, name.Version.Build);
 
// get other info
string copyright = "";
string title = "";
foreach (object a in running.GetCustomAttributes(false))
{
if (a is AssemblyCopyrightAttribute)
{
copyright = (a as AssemblyCopyrightAttribute).Copyright;
}
else if (a is AssemblyTitleAttribute)
{
title = (a as AssemblyTitleAttribute).Title;
}
}
 
// show
this.Text = string.Format("About {0}", title);
appNameLabel.Text = title;
copyrightLabel.Text = copyright;
}
}
}