summaryrefslogtreecommitdiff
path: root/GPL.cs
diff options
context:
space:
mode:
Diffstat (limited to 'GPL.cs')
-rw-r--r--GPL.cs94
1 files changed, 94 insertions, 0 deletions
diff --git a/GPL.cs b/GPL.cs
new file mode 100644
index 0000000..cdb1a51
--- /dev/null
+++ b/GPL.cs
@@ -0,0 +1,94 @@
+// Noddybox.GUI - various GUI support routines
+// Copyright (C) 2004 Ian Cowburn
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// $Id$
+//
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Text;
+using System.Resources;
+using System.Reflection;
+
+namespace Noddybox.GUI
+{
+ /// <summary>
+ /// Displays the GPL.
+ /// </summary>
+ internal class GPL : System.Windows.Forms.Form
+ {
+ private System.Windows.Forms.RichTextBox m_gpl;
+
+ /// <summary>
+ /// Constructs the GPL License form
+ /// </summary>
+ public GPL()
+ {
+ //
+ // The InitializeComponent() call is required for Windows Forms designer support.
+ //
+ InitializeComponent();
+
+ ResourceManager mgr=new ResourceManager("Noddybox.GUI",
+ Assembly.GetExecutingAssembly());
+
+ byte[] gpl=(byte[])mgr.GetObject("GPL");
+
+ if (gpl!=null)
+ {
+ m_gpl.Text=new ASCIIEncoding().GetString(gpl);
+ }
+ else
+ {
+ m_gpl.Text="Failed to read LICENSE from resources!";
+ }
+
+ }
+
+ #region Windows Forms Designer generated code
+ /// <summary>
+ /// This method is required for Windows Forms designer support.
+ /// Do not change the method contents inside the source code editor. The Forms designer might
+ /// not be able to load this method if it was changed manually.
+ /// </summary>
+ private void InitializeComponent() {
+ this.m_gpl = new System.Windows.Forms.RichTextBox();
+ this.SuspendLayout();
+ //
+ // m_gpl
+ //
+ this.m_gpl.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.m_gpl.Location = new System.Drawing.Point(0, 0);
+ this.m_gpl.Name = "m_gpl";
+ this.m_gpl.Size = new System.Drawing.Size(576, 352);
+ this.m_gpl.TabIndex = 0;
+ this.m_gpl.Text = "GPL";
+ //
+ // GPL
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+ this.ClientSize = new System.Drawing.Size(576, 352);
+ this.Controls.Add(this.m_gpl);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+ this.Name = "GPL";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "GNU General Public License Version 2";
+ this.ResumeLayout(false);
+ }
+ #endregion
+ }
+}