PageRenderTime 153ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/NReports.RdlDesign/DialogAbout.cs

#
C# | 248 lines | 169 code | 9 blank | 70 comment | 3 complexity | 8154b20d8aa8d3a82f078c26c0c65686 MD5 | raw file
Possible License(s): Apache-2.0
  1. /* ====================================================================
  2. Copyright (C) 2004-2008 fyiReporting Software, LLC
  3. Copyright (C) 2010-2011 Krzysztof Marecki
  4. This file is part of the NReports project.
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. For additional information,email dotnetreports@gmail.com
  15. */
  16. using System;
  17. using System.Drawing;
  18. using System.Collections;
  19. using System.ComponentModel;
  20. using System.Windows.Forms;
  21. using System.Reflection;
  22. namespace NReports.RdlDesign
  23. {
  24. /// <summary>
  25. /// Summary description for DialogAbout.
  26. /// </summary>
  27. public class DialogAbout : System.Windows.Forms.Form
  28. {
  29. private System.Windows.Forms.Button bOK;
  30. private System.Windows.Forms.TextBox tbLicense;
  31. private System.Windows.Forms.LinkLabel linkLabel3;
  32. private System.Windows.Forms.LinkLabel linkLabel4;
  33. private System.Windows.Forms.Label label5;
  34. private System.Windows.Forms.Label label6;
  35. private System.Windows.Forms.Label label8;
  36. private System.Windows.Forms.PictureBox pictureBox2;
  37. private System.Windows.Forms.Label lVersion;
  38. private System.Windows.Forms.Label lVMVersion;
  39. /// <summary>
  40. /// Required designer variable.
  41. /// </summary>
  42. private System.ComponentModel.Container components = null;
  43. public DialogAbout()
  44. {
  45. //
  46. // Required for Windows Form Designer support
  47. //
  48. InitializeComponent();
  49. tbLicense.Text = @"RDL Designer creates reports defined using the Report Definition Language Specification.
  50. Copyright (C) 2004-2008 fyiReporting Software, LLC
  51. Copyright (C) 2010-2011 Krzysztof Marecki
  52. Licensed under the Apache License, Version 2.0 (the ""License"");
  53. you may not use this file except in compliance with the License.
  54. You may obtain a copy of the License at
  55. http://www.apache.org/licenses/LICENSE-2.0
  56. Unless required by applicable law or agreed to in writing, software
  57. distributed under the License is distributed on an ""AS IS"" BASIS,
  58. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  59. See the License for the specific language governing permissions and
  60. limitations under the License.
  61. For additional information,email dotnetreports@gmail.com";
  62. lVersion.Text = "Version " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
  63. this.lVMVersion.Text = ".NET " + Environment.Version.ToString();
  64. return;
  65. }
  66. /// <summary>
  67. /// Clean up any resources being used.
  68. /// </summary>
  69. protected override void Dispose( bool disposing )
  70. {
  71. if( disposing )
  72. {
  73. if(components != null)
  74. {
  75. components.Dispose();
  76. }
  77. }
  78. base.Dispose( disposing );
  79. }
  80. #region Windows Form Designer generated code
  81. /// <summary>
  82. /// Required method for Designer support - do not modify
  83. /// the contents of this method with the code editor.
  84. /// </summary>
  85. private void InitializeComponent()
  86. {
  87. this.bOK = new System.Windows.Forms.Button();
  88. this.tbLicense = new System.Windows.Forms.TextBox();
  89. this.linkLabel3 = new System.Windows.Forms.LinkLabel();
  90. this.linkLabel4 = new System.Windows.Forms.LinkLabel();
  91. this.label5 = new System.Windows.Forms.Label();
  92. this.label6 = new System.Windows.Forms.Label();
  93. this.lVersion = new System.Windows.Forms.Label();
  94. this.label8 = new System.Windows.Forms.Label();
  95. this.pictureBox2 = new System.Windows.Forms.PictureBox();
  96. this.lVMVersion = new System.Windows.Forms.Label();
  97. ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
  98. this.SuspendLayout();
  99. //
  100. // bOK
  101. //
  102. this.bOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
  103. this.bOK.Location = new System.Drawing.Point(200, 272);
  104. this.bOK.Name = "bOK";
  105. this.bOK.Size = new System.Drawing.Size(75, 23);
  106. this.bOK.TabIndex = 0;
  107. this.bOK.Text = "OK";
  108. //
  109. // tbLicense
  110. //
  111. this.tbLicense.Location = new System.Drawing.Point(8, 120);
  112. this.tbLicense.Multiline = true;
  113. this.tbLicense.Name = "tbLicense";
  114. this.tbLicense.ReadOnly = true;
  115. this.tbLicense.ScrollBars = System.Windows.Forms.ScrollBars.Both;
  116. this.tbLicense.Size = new System.Drawing.Size(448, 136);
  117. this.tbLicense.TabIndex = 9;
  118. //
  119. // linkLabel3
  120. //
  121. this.linkLabel3.Location = new System.Drawing.Point(280, 88);
  122. this.linkLabel3.Name = "linkLabel3";
  123. this.linkLabel3.Size = new System.Drawing.Size(152, 16);
  124. this.linkLabel3.TabIndex = 15;
  125. this.linkLabel3.TabStop = true;
  126. this.linkLabel3.Tag = "mailto:comments@fyireporting.com";
  127. this.linkLabel3.Text = "dotnetreports@gmail.com";
  128. this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_LinkClicked);
  129. //
  130. // linkLabel4
  131. //
  132. this.linkLabel4.Location = new System.Drawing.Point(72, 88);
  133. this.linkLabel4.Name = "linkLabel4";
  134. this.linkLabel4.Size = new System.Drawing.Size(148, 16);
  135. this.linkLabel4.TabIndex = 14;
  136. this.linkLabel4.TabStop = true;
  137. this.linkLabel4.Tag = "http://nreports.codeplex.com";
  138. this.linkLabel4.Text = "http://nreports.codeplex.com";
  139. this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnk_LinkClicked);
  140. //
  141. // label5
  142. //
  143. this.label5.Location = new System.Drawing.Point(240, 88);
  144. this.label5.Name = "label5";
  145. this.label5.Size = new System.Drawing.Size(40, 23);
  146. this.label5.TabIndex = 13;
  147. this.label5.Text = "E-mail:";
  148. //
  149. // label6
  150. //
  151. this.label6.Location = new System.Drawing.Point(16, 88);
  152. this.label6.Name = "label6";
  153. this.label6.Size = new System.Drawing.Size(56, 23);
  154. this.label6.TabIndex = 12;
  155. this.label6.Text = "Website:";
  156. //
  157. // lVersion
  158. //
  159. this.lVersion.Location = new System.Drawing.Point(264, 40);
  160. this.lVersion.Name = "lVersion";
  161. this.lVersion.Size = new System.Drawing.Size(136, 16);
  162. this.lVersion.TabIndex = 11;
  163. this.lVersion.Text = "Version x.x.x";
  164. this.lVersion.TextAlign = System.Drawing.ContentAlignment.TopCenter;
  165. //
  166. // label8
  167. //
  168. this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  169. this.label8.Location = new System.Drawing.Point(240, 16);
  170. this.label8.Name = "label8";
  171. this.label8.Size = new System.Drawing.Size(184, 24);
  172. this.label8.TabIndex = 10;
  173. this.label8.Text = "NReports Designer";
  174. //
  175. // pictureBox2
  176. //
  177. this.pictureBox2.Location = new System.Drawing.Point(8, 8);
  178. this.pictureBox2.Name = "pictureBox2";
  179. this.pictureBox2.Size = new System.Drawing.Size(212, 72);
  180. this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
  181. this.pictureBox2.TabIndex = 16;
  182. this.pictureBox2.TabStop = false;
  183. //
  184. // lVMVersion
  185. //
  186. this.lVMVersion.Location = new System.Drawing.Point(256, 64);
  187. this.lVMVersion.Name = "lVMVersion";
  188. this.lVMVersion.Size = new System.Drawing.Size(144, 16);
  189. this.lVMVersion.TabIndex = 17;
  190. this.lVMVersion.Text = ".NET x.x.xxxx.xxxx";
  191. this.lVMVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  192. //
  193. // DialogAbout
  194. //
  195. this.AcceptButton = this.bOK;
  196. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  197. this.CancelButton = this.bOK;
  198. this.ClientSize = new System.Drawing.Size(466, 304);
  199. this.Controls.Add(this.lVMVersion);
  200. this.Controls.Add(this.linkLabel3);
  201. this.Controls.Add(this.linkLabel4);
  202. this.Controls.Add(this.label5);
  203. this.Controls.Add(this.label6);
  204. this.Controls.Add(this.lVersion);
  205. this.Controls.Add(this.label8);
  206. this.Controls.Add(this.pictureBox2);
  207. this.Controls.Add(this.tbLicense);
  208. this.Controls.Add(this.bOK);
  209. this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
  210. this.MaximizeBox = false;
  211. this.MinimizeBox = false;
  212. this.Name = "DialogAbout";
  213. this.ShowInTaskbar = false;
  214. this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
  215. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
  216. this.Text = "About";
  217. ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
  218. this.ResumeLayout(false);
  219. this.PerformLayout();
  220. }
  221. #endregion
  222. private void lnk_LinkClicked(object sender, LinkLabelLinkClickedEventArgs ea)
  223. {
  224. LinkLabel lnk = (LinkLabel) sender;
  225. lnk.Links[lnk.Links.IndexOf(ea.Link)].Visited = true;
  226. System.Diagnostics.Process.Start(lnk.Tag.ToString());
  227. }
  228. }
  229. }