/Source/HydroModeler/AboutBox.cs

# · C# · 283 lines · 169 code · 11 blank · 103 comment · 3 complexity · 3322d21db258517939513e8f6a2f4128 MD5 · raw file

  1. #region Copyright
  2. ///////////////////////////////////////////////////////////
  3. //
  4. // Copyright (C) 2006 OpenMI Association
  5. //
  6. // This library is free software; you can redistribute it and/or
  7. // modify it under the terms of the GNU Lesser General Public
  8. // License as published by the Free Software Foundation; either
  9. // version 2.1 of the License, or (at your option) any later version.
  10. //
  11. // This library is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. // Lesser General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU Lesser General Public
  17. // License along with this library; if not, write to the Free Software
  18. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. // or look at URL www.gnu.org/licenses/lgpl.html
  20. //
  21. // Contact info:
  22. // URL: www.openmi.org
  23. // Email: sourcecode@openmi.org
  24. // Discussion forum available at www.sourceforge.net
  25. //
  26. // Coordinator: Roger Moore, CEH Wallingford, Wallingford, Oxon, UK
  27. //
  28. ///////////////////////////////////////////////////////////
  29. //
  30. // Original authors: Jan Curn, DHI - Water & Environment, Prague, Czech Republic
  31. // Jan B. Gregersen, DHI - Water & Environment, Horsholm, Denmark
  32. // Created on: 1. July 2005
  33. // Version: 1.0.0
  34. //
  35. // Modification history:
  36. //
  37. //
  38. ///////////////////////////////////////////////////////////
  39. #endregion
  40. using System;
  41. using System.Diagnostics;
  42. using System.Drawing;
  43. using System.Collections;
  44. using System.ComponentModel;
  45. using System.Windows.Forms;
  46. namespace Oatc.OpenMI.Gui.ConfigurationEditor
  47. {
  48. /// <summary>
  49. /// Summary description for AboutBox.
  50. /// </summary>
  51. public class AboutBox : System.Windows.Forms.Form
  52. {
  53. private System.Windows.Forms.PictureBox pictureBox1;
  54. private System.Windows.Forms.Label label1;
  55. private System.Windows.Forms.Button buttonClose;
  56. private System.Windows.Forms.Label label5;
  57. private System.Windows.Forms.LinkLabel linkWwwOpenMIOrg;
  58. private System.Windows.Forms.Label label2;
  59. private System.Windows.Forms.Label label7;
  60. private System.Windows.Forms.LinkLabel linkWwwSourceforgeNet;
  61. private System.Windows.Forms.Label label9;
  62. private System.Windows.Forms.Label label10;
  63. private System.Windows.Forms.Label label11;
  64. private System.Windows.Forms.Label label12;
  65. /// <summary>
  66. /// Required designer variable.
  67. /// </summary>
  68. private System.ComponentModel.Container components = null;
  69. /// <summary>
  70. /// Creates a new instance of <see cref="AboutBox">AboutBox</see> dialog.
  71. /// </summary>
  72. public AboutBox()
  73. {
  74. //
  75. // Required for Windows Form Designer support
  76. //
  77. InitializeComponent();
  78. //
  79. // TODO: Add any constructor code after InitializeComponent call
  80. //
  81. }
  82. /// <summary>
  83. /// Clean up any resources being used.
  84. /// </summary>
  85. protected override void Dispose( bool disposing )
  86. {
  87. if( disposing )
  88. {
  89. if(components != null)
  90. {
  91. components.Dispose();
  92. }
  93. }
  94. base.Dispose( disposing );
  95. }
  96. #region Windows Form Designer generated code
  97. /// <summary>
  98. /// Required method for Designer support - do not modify
  99. /// the contents of this method with the code editor.
  100. /// </summary>
  101. private void InitializeComponent()
  102. {
  103. System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
  104. this.pictureBox1 = new System.Windows.Forms.PictureBox();
  105. this.label1 = new System.Windows.Forms.Label();
  106. this.linkWwwOpenMIOrg = new System.Windows.Forms.LinkLabel();
  107. this.buttonClose = new System.Windows.Forms.Button();
  108. this.label5 = new System.Windows.Forms.Label();
  109. this.label2 = new System.Windows.Forms.Label();
  110. this.label7 = new System.Windows.Forms.Label();
  111. this.linkWwwSourceforgeNet = new System.Windows.Forms.LinkLabel();
  112. this.label9 = new System.Windows.Forms.Label();
  113. this.label10 = new System.Windows.Forms.Label();
  114. this.label11 = new System.Windows.Forms.Label();
  115. this.label12 = new System.Windows.Forms.Label();
  116. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
  117. this.SuspendLayout();
  118. //
  119. // pictureBox1
  120. //
  121. this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
  122. this.pictureBox1.Location = new System.Drawing.Point(4, 4);
  123. this.pictureBox1.Name = "pictureBox1";
  124. this.pictureBox1.Size = new System.Drawing.Size(136, 436);
  125. this.pictureBox1.TabIndex = 0;
  126. this.pictureBox1.TabStop = false;
  127. //
  128. // label1
  129. //
  130. this.label1.Location = new System.Drawing.Point(148, 8);
  131. this.label1.Name = "label1";
  132. this.label1.Size = new System.Drawing.Size(380, 432);
  133. this.label1.TabIndex = 1;
  134. this.label1.Text = resources.GetString("label1.Text");
  135. this.label1.Click += new System.EventHandler(this.label1_Click);
  136. //
  137. // linkWwwOpenMIOrg
  138. //
  139. this.linkWwwOpenMIOrg.Location = new System.Drawing.Point(60, 459);
  140. this.linkWwwOpenMIOrg.Name = "linkWwwOpenMIOrg";
  141. this.linkWwwOpenMIOrg.Size = new System.Drawing.Size(164, 16);
  142. this.linkWwwOpenMIOrg.TabIndex = 2;
  143. this.linkWwwOpenMIOrg.TabStop = true;
  144. this.linkWwwOpenMIOrg.Text = "http://www.openmi.org";
  145. this.linkWwwOpenMIOrg.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkWwwOpenMIOrg_LinkClicked);
  146. //
  147. // buttonClose
  148. //
  149. this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  150. this.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
  151. this.buttonClose.Location = new System.Drawing.Point(413, 522);
  152. this.buttonClose.Name = "buttonClose";
  153. this.buttonClose.Size = new System.Drawing.Size(92, 32);
  154. this.buttonClose.TabIndex = 10;
  155. this.buttonClose.Text = "Close";
  156. //
  157. // label5
  158. //
  159. this.label5.Location = new System.Drawing.Point(12, 443);
  160. this.label5.Name = "label5";
  161. this.label5.Size = new System.Drawing.Size(80, 16);
  162. this.label5.TabIndex = 8;
  163. this.label5.Text = "Contact info:";
  164. //
  165. // label2
  166. //
  167. this.label2.Location = new System.Drawing.Point(20, 459);
  168. this.label2.Name = "label2";
  169. this.label2.Size = new System.Drawing.Size(36, 16);
  170. this.label2.TabIndex = 11;
  171. this.label2.Text = "URL:";
  172. //
  173. // label7
  174. //
  175. this.label7.Location = new System.Drawing.Point(20, 491);
  176. this.label7.Name = "label7";
  177. this.label7.Size = new System.Drawing.Size(156, 16);
  178. this.label7.TabIndex = 13;
  179. this.label7.Text = "Discussion forum available at:";
  180. //
  181. // linkWwwSourceforgeNet
  182. //
  183. this.linkWwwSourceforgeNet.Location = new System.Drawing.Point(180, 491);
  184. this.linkWwwSourceforgeNet.Name = "linkWwwSourceforgeNet";
  185. this.linkWwwSourceforgeNet.Size = new System.Drawing.Size(207, 16);
  186. this.linkWwwSourceforgeNet.TabIndex = 15;
  187. this.linkWwwSourceforgeNet.TabStop = true;
  188. this.linkWwwSourceforgeNet.Text = "http://sourceforge.net/projects/openmi/";
  189. this.linkWwwSourceforgeNet.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkWwwSourceforgeNet_LinkClicked);
  190. //
  191. // label9
  192. //
  193. this.label9.Location = new System.Drawing.Point(12, 512);
  194. this.label9.Name = "label9";
  195. this.label9.Size = new System.Drawing.Size(68, 16);
  196. this.label9.TabIndex = 17;
  197. this.label9.Text = "Created on:";
  198. //
  199. // label10
  200. //
  201. this.label10.Location = new System.Drawing.Point(84, 512);
  202. this.label10.Name = "label10";
  203. this.label10.Size = new System.Drawing.Size(92, 16);
  204. this.label10.TabIndex = 18;
  205. this.label10.Text = "December 2007";
  206. //
  207. // label11
  208. //
  209. this.label11.Location = new System.Drawing.Point(84, 532);
  210. this.label11.Name = "label11";
  211. this.label11.Size = new System.Drawing.Size(80, 16);
  212. this.label11.TabIndex = 20;
  213. this.label11.Text = "1.4.0.0";
  214. //
  215. // label12
  216. //
  217. this.label12.Location = new System.Drawing.Point(12, 532);
  218. this.label12.Name = "label12";
  219. this.label12.Size = new System.Drawing.Size(68, 16);
  220. this.label12.TabIndex = 19;
  221. this.label12.Text = "Version:";
  222. //
  223. // AboutBox
  224. //
  225. this.AcceptButton = this.buttonClose;
  226. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  227. this.CancelButton = this.buttonClose;
  228. this.ClientSize = new System.Drawing.Size(534, 563);
  229. this.Controls.Add(this.label11);
  230. this.Controls.Add(this.label12);
  231. this.Controls.Add(this.label10);
  232. this.Controls.Add(this.label9);
  233. this.Controls.Add(this.linkWwwSourceforgeNet);
  234. this.Controls.Add(this.label7);
  235. this.Controls.Add(this.label2);
  236. this.Controls.Add(this.label5);
  237. this.Controls.Add(this.buttonClose);
  238. this.Controls.Add(this.linkWwwOpenMIOrg);
  239. this.Controls.Add(this.label1);
  240. this.Controls.Add(this.pictureBox1);
  241. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
  242. this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  243. this.MaximizeBox = false;
  244. this.MinimizeBox = false;
  245. this.Name = "AboutBox";
  246. this.ShowInTaskbar = false;
  247. this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
  248. this.Text = "About...";
  249. ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
  250. this.ResumeLayout(false);
  251. }
  252. #endregion
  253. private void linkWwwOpenMIOrg_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
  254. {
  255. ProcessStartInfo info = new ProcessStartInfo( linkWwwOpenMIOrg.Text );
  256. Process.Start( info );
  257. }
  258. //private void linkWwwJanCurn_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
  259. //{
  260. // ProcessStartInfo info = new ProcessStartInfo( linkWwwJanCurn.Text );
  261. // Process.Start( info );
  262. //}
  263. private void linkWwwSourceforgeNet_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
  264. {
  265. ProcessStartInfo info = new ProcessStartInfo( linkWwwSourceforgeNet.Text );
  266. Process.Start( info );
  267. }
  268. private void label1_Click(object sender, EventArgs e)
  269. {
  270. }
  271. }
  272. }