AboutForm.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /*
  2. * Mentalis.org Packet Monitor
  3. *
  4. * Copyright ?2003, The KPD-Team
  5. * All rights reserved.
  6. * http://www.mentalis.org/
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * - Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. *
  15. * - Neither the name of the KPD-Team, nor the names of its contributors
  16. * may be used to endorse or promote products derived from this
  17. * software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
  23. * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  24. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  25. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  26. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  28. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  29. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  30. * OF THE POSSIBILITY OF SUCH DAMAGE.
  31. */
  32. using System;
  33. using System.Drawing;
  34. using System.Collections;
  35. using System.ComponentModel;
  36. using System.Windows.Forms;
  37. using System.Reflection;
  38. namespace Org.Mentalis.Network.PacketMonitor {
  39. public class AboutForm : System.Windows.Forms.Form {
  40. private System.Windows.Forms.Button button1;
  41. private System.Windows.Forms.Label TitleLabel;
  42. private System.Windows.Forms.Label VersionLabel;
  43. private System.Windows.Forms.Label InfoLabel;
  44. private System.Windows.Forms.Label ImageLabel;
  45. private System.ComponentModel.Container components = null;
  46. public AboutForm() {
  47. // Required for Windows Form Designer support
  48. InitializeComponent();
  49. }
  50. protected override void Dispose( bool disposing ) {
  51. if( disposing ) {
  52. if(components != null) {
  53. components.Dispose();
  54. }
  55. }
  56. base.Dispose( disposing );
  57. }
  58. #region Windows Form Designer generated code
  59. /// <summary>
  60. /// Required method for Designer support - do not modify
  61. /// the contents of this method with the code editor.
  62. /// </summary>
  63. private void InitializeComponent() {
  64. System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(AboutForm));
  65. this.TitleLabel = new System.Windows.Forms.Label();
  66. this.VersionLabel = new System.Windows.Forms.Label();
  67. this.InfoLabel = new System.Windows.Forms.Label();
  68. this.button1 = new System.Windows.Forms.Button();
  69. this.ImageLabel = new System.Windows.Forms.Label();
  70. this.SuspendLayout();
  71. //
  72. // TitleLabel
  73. //
  74. this.TitleLabel.Font = new System.Drawing.Font("Times New Roman", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  75. this.TitleLabel.Location = new System.Drawing.Point(88, 24);
  76. this.TitleLabel.Name = "TitleLabel";
  77. this.TitleLabel.Size = new System.Drawing.Size(216, 32);
  78. this.TitleLabel.TabIndex = 1;
  79. this.TitleLabel.Text = "Packet Monitor";
  80. //
  81. // VersionLabel
  82. //
  83. this.VersionLabel.Location = new System.Drawing.Point(96, 56);
  84. this.VersionLabel.Name = "VersionLabel";
  85. this.VersionLabel.Size = new System.Drawing.Size(176, 16);
  86. this.VersionLabel.TabIndex = 2;
  87. this.VersionLabel.Text = "Version x.y";
  88. this.VersionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
  89. //
  90. // InfoLabel
  91. //
  92. this.InfoLabel.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
  93. this.InfoLabel.Location = new System.Drawing.Point(40, 80);
  94. this.InfoLabel.Name = "InfoLabel";
  95. this.InfoLabel.Size = new System.Drawing.Size(320, 72);
  96. this.InfoLabel.TabIndex = 3;
  97. this.InfoLabel.Text = "- Mentalis.org Packet Monitor -";
  98. this.InfoLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  99. //
  100. // button1
  101. //
  102. this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
  103. this.button1.Location = new System.Drawing.Point(280, 176);
  104. this.button1.Name = "button1";
  105. this.button1.Size = new System.Drawing.Size(80, 24);
  106. this.button1.TabIndex = 4;
  107. this.button1.Text = "OK";
  108. //
  109. // ImageLabel
  110. //
  111. this.ImageLabel.Image = ((System.Drawing.Bitmap)(resources.GetObject("ImageLabel.Image")));
  112. this.ImageLabel.Location = new System.Drawing.Point(16, 16);
  113. this.ImageLabel.Name = "ImageLabel";
  114. this.ImageLabel.Size = new System.Drawing.Size(48, 64);
  115. this.ImageLabel.TabIndex = 5;
  116. //
  117. // AboutForm
  118. //
  119. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  120. this.ClientSize = new System.Drawing.Size(378, 216);
  121. this.Controls.AddRange(new System.Windows.Forms.Control[] {
  122. this.ImageLabel,
  123. this.button1,
  124. this.InfoLabel,
  125. this.VersionLabel,
  126. this.TitleLabel});
  127. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
  128. this.MaximizeBox = false;
  129. this.MinimizeBox = false;
  130. this.Name = "AboutForm";
  131. this.ShowInTaskbar = false;
  132. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  133. this.Text = "About Mentalis.org Packet Monitor...";
  134. this.Load += new System.EventHandler(this.AboutForm_Load);
  135. this.ResumeLayout(false);
  136. }
  137. #endregion
  138. private void AboutForm_Load(object sender, System.EventArgs e) {
  139. VersionLabel.Text = "Version " + Assembly.GetCallingAssembly().GetName().Version.ToString(3);
  140. InfoLabel.Text = "- Mentalis.org Packet Monitor -\r\n-written by the Mentalis.org Team, ?2003 -\r\n- visit our website at http://www.mentalis.org/ -\r\n- or email us at info@mentalis.org -";
  141. }
  142. }
  143. }