using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace PropertyTreeTest
{
/// <summary>
/// Summary description for Form3.
/// </summary>
public class Form3 : System.Windows.Forms.Form
{
private PropTree.PropertyTree ptExample;
private System.Windows.Forms.CheckBox chkAutoNavigate;
private PropTree.PropertyPane ppSettings;
private PropTree.PropertyPane ppJava;
private PropTree.PropertyPane ppCSharp;
private PropTree.PropertyPane ppCPP;
private PropTree.PropertyPane ppRarely;
private PropTree.PropertyPane ppAbout;
private PropTree.PropertyPane ppLanguages;
private PropTree.PropertyPane ppAlgol;
private PropTree.PropertyPane ppPascal;
private PropTree.PropertyPane ppPROLOG;
private PropTree.PropertyPane ppOften;
private PropTree.PropertyPane ppYourFavorite;
private System.Windows.Forms.RadioButton optCPP;
private System.Windows.Forms.Button cmdCPP;
private System.Windows.Forms.RadioButton optCSharp;
private System.Windows.Forms.Button cmdCSharp;
private System.Windows.Forms.RadioButton optAlgol;
private System.Windows.Forms.Button cmdAlgol;
private System.Windows.Forms.RadioButton optJava;
private System.Windows.Forms.Button cmdJava;
private System.Windows.Forms.RadioButton optPascal;
private System.Windows.Forms.Button cmdPascal;
private System.Windows.Forms.RadioButton optPROLOG;
private System.Windows.Forms.Button cmdPROLOG;
private System.Windows.Forms.RadioButton optOther;
private System.Windows.Forms.TextBox txtOther;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private PropTree.PropertyPane ppLisp;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtCPP;
private System.Windows.Forms.TextBox txtCSharp;
private System.Windows.Forms.TextBox txtAlgol;
private System.Windows.Forms.TextBox txtJava;
private System.Windows.Forms.TextBox txtPascal;
private System.Windows.Forms.TextBox txtPROLOG;
private System.Windows.Forms.TextBox txtLISP;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.CheckBox chkShowLines;
private System.Windows.Forms.CheckBox chkShowPlusMinus;
private System.Windows.Forms.CheckBox chkShowRootLines;
private System.Windows.Forms.Button cmdToAbout;
private System.Windows.Forms.Label label9;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form3()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
FillTextboxes();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txtCPP = new System.Windows.Forms.TextBox();
this.cmdPROLOG = new System.Windows.Forms.Button();
this.cmdCPP = new System.Windows.Forms.Button();
this.ppPROLOG = new PropTree.PropertyPane("Programming languages\\Rarely used", "PROLOG", 6);
this.txtPROLOG = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.ppCSharp = new PropTree.PropertyPane("Programming languages\\Often used", "C#", 1);
this.txtCSharp = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.chkShowLines = new System.Windows.Forms.CheckBox();
this.txtJava = new System.Windows.Forms.TextBox();
this.optCPP = new System.Windows.Forms.RadioButton();
this.cmdCSharp = new System.Windows.Forms.Button();
this.ppSettings = new PropTree.PropertyPane("", "Settings...", 1);
this.chkShowRootLines = new System.Windows.Forms.CheckBox();
this.chkShowPlusMinus = new System.Windows.Forms.CheckBox();
this.chkAutoNavigate = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.cmdJava = new System.Windows.Forms.Button();
this.optAlgol = new System.Windows.Forms.RadioButton();
this.optJava = new System.Windows.Forms.RadioButton();
this.optPascal = new System.Windows.Forms.RadioButton();
this.optOther = new System.Windows.Forms.RadioButton();
this.optCSharp = new System.Windows.Forms.RadioButton();
this.cmdToAbout = new System.Windows.Forms.Button();
this.ppCPP = new PropTree.PropertyPane("Programming languages\\Often used", "C++", 0);
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.optPROLOG = new System.Windows.Forms.RadioButton();
this.label7 = new System.Windows.Forms.Label();
this.ppYourFavorite = new PropTree.PropertyPane("Programming languages", "What\'s your favorite?", 4);
this.txtOther = new System.Windows.Forms.TextBox();
this.cmdPascal = new System.Windows.Forms.Button();
this.cmdAlgol = new System.Windows.Forms.Button();
this.ptExample = new PropTree.PropertyTree();
this.ppRarely = new PropTree.PropertyPane("Programming languages", "Rarely used", 3);
this.ppLanguages = new PropTree.PropertyPane("", "Programming languages", 4);
this.ppOften = new PropTree.PropertyPane("Programming languages", "Often used", 2);
this.ppAbout = new PropTree.PropertyPane("Programming languages", "About", 1);
this.ppAlgol = new PropTree.PropertyPane("Programming languages\\Rarely used", "Algol 68", 0);
this.txtAlgol = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.ppJava = new PropTree.PropertyPane("Programming languages\\Rarely used", "Java", 2);
this.ppLisp = new PropTree.PropertyPane("Programming languages\\Rarely used", "Lisp", 3);
this.txtLISP = new System.Windows.Forms.TextBox();
this.ppPascal = new PropTree.PropertyPane("Programming languages\\Rarely used", "Pascal", 5);
this.txtPascal = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.ppPROLOG.SuspendLayout();
this.ppCSharp.SuspendLayout();
this.ppSettings.SuspendLayout();
this.ppCPP.SuspendLayout();
this.ppYourFavorite.SuspendLayout();
this.ppLanguages.SuspendLayout();
this.ppAbout.SuspendLayout();
this.ppAlgol.SuspendLayout();
this.ppJava.SuspendLayout();
this.ppLisp.SuspendLayout();
this.ppPascal.SuspendLayout();
this.SuspendLayout();
//
// txtCPP
//
this.txtCPP.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.txtCPP.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtCPP.Location = new System.Drawing.Point(8, 100);
this.txtCPP.Multiline = true;
this.txtCPP.Name = "txtCPP";
this.txtCPP.ReadOnly = true;
this.txtCPP.Size = new System.Drawing.Size(360, 184);
this.txtCPP.TabIndex = 0;
this.txtCPP.Text = "";
//
// cmdPROLOG
//
this.cmdPROLOG.Location = new System.Drawing.Point(192, 168);
this.cmdPROLOG.Name = "cmdPROLOG";
this.cmdPROLOG.Size = new System.Drawing.Size(24, 20);
this.cmdPROLOG.TabIndex = 1;
this.cmdPROLOG.Text = "->";
this.cmdPROLOG.Click += new System.EventHandler(this.cmdPROLOG_Click);
//
// cmdCPP
//
this.cmdCPP.Location = new System.Drawing.Point(192, 48);
this.cmdCPP.Name = "cmdCPP";
this.cmdCPP.Size = new System.Drawing.Size(24, 20);
this.cmdCPP.TabIndex = 1;
this.cmdCPP.Text = "->";
this.cmdCPP.Click += new System.EventHandler(this.cmdCPP_Click);
//
// ppPROLOG
//
this.ppPROLOG.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppPROLOG.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtPROLOG,
this.label6});
this.ppPROLOG.ImageIndex = -1;
this.ppPROLOG.Index = 6;
this.ppPROLOG.Name = "ppPROLOG";
this.ppPROLOG.Path = "Programming languages\\Rarely used";
this.ppPROLOG.SelectedImageIndex = -1;
this.ppPROLOG.Size = new System.Drawing.Size(496, 268);
this.ppPROLOG.TabIndex = 20;
this.ppPROLOG.Title = "PROLOG";
//
// txtPROLOG
//
this.txtPROLOG.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.txtPROLOG.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtPROLOG.Location = new System.Drawing.Point(8, 100);
this.txtPROLOG.Multiline = true;
this.txtPROLOG.Name = "txtPROLOG";
this.txtPROLOG.ReadOnly = true;
this.txtPROLOG.Size = new System.Drawing.Size(360, 184);
this.txtPROLOG.TabIndex = 0;
this.txtPROLOG.Text = "";
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.label6.Location = new System.Drawing.Point(8, 8);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(360, 88);
this.label6.TabIndex = 1;
this.label6.Text = "PROLOG - I forget the programming paradigm this language fits into. I wish I cou" +
"ld forget PROLOG.";
//
// ppCSharp
//
this.ppCSharp.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppCSharp.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtCSharp,
this.label2});
this.ppCSharp.ImageIndex = -1;
this.ppCSharp.Index = 1;
this.ppCSharp.Name = "ppCSharp";
this.ppCSharp.Path = "Programming languages\\Often used";
this.ppCSharp.SelectedImageIndex = -1;
this.ppCSharp.Size = new System.Drawing.Size(536, 260);
this.ppCSharp.TabIndex = 16;
this.ppCSharp.Title = "C#";
//
// txtCSharp
//
this.txtCSharp.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.txtCSharp.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtCSharp.Location = new System.Drawing.Point(8, 100);
this.txtCSharp.Multiline = true;
this.txtCSharp.Name = "txtCSharp";
this.txtCSharp.ReadOnly = true;
this.txtCSharp.Size = new System.Drawing.Size(360, 184);
this.txtCSharp.TabIndex = 0;
this.txtCSharp.Text = "";
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.label2.Location = new System.Drawing.Point(8, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(360, 88);
this.label2.TabIndex = 1;
this.label2.Text = "C# - the very Java-ish and C++-ish new language from Microsoft. Where will it fi" +
"t in? I have no idea, but I sure do like programming with it.";
//
// chkShowLines
//
this.chkShowLines.Checked = true;
this.chkShowLines.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkShowLines.Location = new System.Drawing.Point(76, 72);
this.chkShowLines.Name = "chkShowLines";
this.chkShowLines.Size = new System.Drawing.Size(224, 24);
this.chkShowLines.TabIndex = 0;
this.chkShowLines.Text = "Show lines";
this.chkShowLines.CheckedChanged += new System.EventHandler(this.chkShowLines_CheckedChanged);
//
// txtJava
//
this.txtJava.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.txtJava.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtJava.Location = new System.Drawing.Point(8, 100);
this.txtJava.Multiline = true;
this.txtJava.Name = "txtJava";
this.txtJava.ReadOnly = true;
this.txtJava.Size = new System.Drawing.Size(360, 184);
this.txtJava.TabIndex = 0;
this.txtJava.Text = "";
//
// optCPP
//
this.optCPP.Location = new System.Drawing.Point(100, 48);
this.optCPP.Name = "optCPP";
this.optCPP.Size = new System.Drawing.Size(88, 20);
this.optCPP.TabIndex = 0;
this.optCPP.Text = "C++:";
//
// cmdCSharp
//
this.cmdCSharp.Location = new System.Drawing.Point(192, 72);
this.cmdCSharp.Name = "cmdCSharp";
this.cmdCSharp.Size = new System.Drawing.Size(24, 20);
this.cmdCSharp.TabIndex = 1;
this.cmdCSharp.Text = "->";
this.cmdCSharp.Click += new System.EventHandler(this.cmdCSharp_Click);
//
// ppSettings
//
this.ppSettings.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppSettings.Controls.AddRange(new System.Windows.Forms.Control[] {
this.chkShowRootLines,
this.chkShowPlusMinus,
this.chkShowLines,
this.chkAutoNavigate});
this.ppSettings.ImageIndex = -1;
this.ppSettings.Index = 1;
this.ppSettings.Name = "ppSettings";
this.ppSettings.SelectedImageIndex = -1;
this.ppSettings.Size = new System.Drawing.Size(416, 284);
this.ppSettings.TabIndex = 10;
this.ppSettings.Title = "Settings...";
//
// chkShowRootLines
//
this.chkShowRootLines.Checked = true;
this.chkShowRootLines.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkShowRootLines.Location = new System.Drawing.Point(76, 120);
this.chkShowRootLines.Name = "chkShowRootLines";
this.chkShowRootLines.Size = new System.Drawing.Size(224, 24);
this.chkShowRootLines.TabIndex = 0;
this.chkShowRootLines.Text = "Show root lines";
this.chkShowRootLines.CheckedChanged += new System.EventHandler(this.chkShowRootLines_CheckedChanged);
//
// chkShowPlusMinus
//
this.chkShowPlusMinus.Checked = true;
this.chkShowPlusMinus.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkShowPlusMinus.Location = new System.Drawing.Point(76, 96);
this.chkShowPlusMinus.Name = "chkShowPlusMinus";
this.chkShowPlusMinus.Size = new System.Drawing.Size(224, 24);
this.chkShowPlusMinus.TabIndex = 0;
this.chkShowPlusMinus.Text = "Show plus-minus";
this.chkShowPlusMinus.CheckedChanged += new System.EventHandler(this.chkShowPlusMinus_CheckedChanged);
//
// chkAutoNavigate
//
this.chkAutoNavigate.Location = new System.Drawing.Point(76, 48);
this.chkAutoNavigate.Name = "chkAutoNavigate";
this.chkAutoNavigate.Size = new System.Drawing.Size(224, 24);
this.chkAutoNavigate.TabIndex = 0;
this.chkAutoNavigate.Text = "Use AutoNavigate feature";
this.chkAutoNavigate.CheckedChanged += new System.EventHandler(this.chkAutoNavigate_CheckedChanged);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(360, 88);
this.label1.TabIndex = 1;
this.label1.Text = @"C++ - The first language I learned to program in. I've used this language in 4 classes, and I've done almost all of my for-fun work in C++. I read a quote somewhere that sums up very well the attitude of most C++ programmers: C++ is too hard - that's why it's so fun to program with.";
//
// cmdJava
//
this.cmdJava.Location = new System.Drawing.Point(192, 120);
this.cmdJava.Name = "cmdJava";
this.cmdJava.Size = new System.Drawing.Size(24, 20);
this.cmdJava.TabIndex = 1;
this.cmdJava.Text = "->";
this.cmdJava.Click += new System.EventHandler(this.cmdJava_Click);
//
// optAlgol
//
this.optAlgol.Location = new System.Drawing.Point(100, 96);
this.optAlgol.Name = "optAlgol";
this.optAlgol.Size = new System.Drawing.Size(88, 20);
this.optAlgol.TabIndex = 0;
this.optAlgol.Text = "Algol 68:";
//
// optJava
//
this.optJava.Location = new System.Drawing.Point(100, 120);
this.optJava.Name = "optJava";
this.optJava.Size = new System.Drawing.Size(88, 20);
this.optJava.TabIndex = 0;
this.optJava.Text = "Java:";
//
// optPascal
//
this.optPascal.Location = new System.Drawing.Point(100, 144);
this.optPascal.Name = "optPascal";
this.optPascal.Size = new System.Drawing.Size(88, 20);
this.optPascal.TabIndex = 0;
this.optPascal.Text = "Pascal:";
//
// optOther
//
this.optOther.Location = new System.Drawing.Point(100, 192);
this.optOther.Name = "optOther";
this.optOther.Size = new System.Drawing.Size(88, 20);
this.optOther.TabIndex = 0;
this.optOther.Text = "Other:";
//
// optCSharp
//
this.optCSharp.Location = new System.Drawing.Point(100, 72);
this.optCSharp.Name = "optCSharp";
this.optCSharp.Size = new System.Drawing.Size(88, 20);
this.optCSharp.TabIndex = 0;
this.optCSharp.Text = "C#:";
//
// cmdToAbout
//
this.cmdToAbout.Location = new System.Drawing.Point(124, 141);
this.cmdToAbout.Name = "cmdToAbout";
this.cmdToAbout.Size = new System.Drawing.Size(128, 23);
this.cmdToAbout.TabIndex = 0;
this.cmdToAbout.Text = "Go to next pane ->";
this.cmdToAbout.Click += new System.EventHandler(this.cmdToAbout_Click);
//
// ppCPP
//
this.ppCPP.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppCPP.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label1,
this.txtCPP});
this.ppCPP.ImageIndex = -1;
this.ppCPP.Index = 0;
this.ppCPP.Name = "ppCPP";
this.ppCPP.Path = "Programming languages\\Often used";
this.ppCPP.SelectedImageIndex = -1;
this.ppCPP.Size = new System.Drawing.Size(456, 276);
this.ppCPP.TabIndex = 15;
this.ppCPP.Title = "C++";
//
// label8
//
this.label8.Location = new System.Drawing.Point(8, 16);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(364, 56);
this.label8.TabIndex = 0;
this.label8.Text = "In my time at college, I\'ve used a bunch of different programming languages both " +
"in class and out of class. For this example program, I\'ve written some simple \'" +
"Hello World\' programs in the languages I still half-way remember.";
//
// label9
//
this.label9.Location = new System.Drawing.Point(8, 80);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(364, 32);
this.label9.TabIndex = 1;
this.label9.Text = "I\'ve separated the programs into two categories: languages I often use, and langu" +
"ages I rarely use.";
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.label4.Location = new System.Drawing.Point(12, 8);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(356, 88);
this.label4.TabIndex = 1;
this.label4.Text = @"Java - magic bullet to some (almost everyone in academia), long running joke to others. Seems to be great on the server-side, but besides Borland's JBuilder I have yet to see any significant commercial work done with Swing. In my opinion - no magic bullet here, but still a very useful and powerful programming language.";
//
// optPROLOG
//
this.optPROLOG.Location = new System.Drawing.Point(100, 168);
this.optPROLOG.Name = "optPROLOG";
this.optPROLOG.Size = new System.Drawing.Size(88, 20);
this.optPROLOG.TabIndex = 0;
this.optPROLOG.Text = "PROLOG:";
//
// label7
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.label7.Location = new System.Drawing.Point(8, 8);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(360, 88);
this.label7.TabIndex = 1;
this.label7.Text = @"LISP - 'LISt Processing language', or to others 'Lots of Irritating Superfluous Parenthesis'. My 'Introduction to AI'-type class used this. I remember that I was always stupefied when I tried to figure out why my homework assignments worked. Code is Data. Data is Code.";
//
// ppYourFavorite
//
this.ppYourFavorite.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppYourFavorite.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtOther,
this.optOther,
this.optPROLOG,
this.cmdPROLOG,
this.optPascal,
this.cmdPascal,
this.optJava,
this.cmdJava,
this.optAlgol,
this.cmdAlgol,
this.optCSharp,
this.cmdCSharp,
this.cmdCPP,
this.optCPP});
this.ppYourFavorite.ImageIndex = -1;
this.ppYourFavorite.Index = 4;
this.ppYourFavorite.Name = "ppYourFavorite";
this.ppYourFavorite.Path = "Programming languages";
this.ppYourFavorite.SelectedImageIndex = -1;
this.ppYourFavorite.Size = new System.Drawing.Size(416, 284);
this.ppYourFavorite.TabIndex = 22;
this.ppYourFavorite.Title = "What\'s your favorite?";
//
// txtOther
//
this.txtOther.Location = new System.Drawing.Point(192, 192);
this.txtOther.Name = "txtOther";
this.txtOther.Size = new System.Drawing.Size(84, 20);
this.txtOther.TabIndex = 2;
this.txtOther.Text = "";
//
// cmdPascal
//
this.cmdPascal.Location = new System.Drawing.Point(192, 144);
this.cmdPascal.Name = "cmdPascal";
this.cmdPascal.Size = new System.Drawing.Size(24, 20);
this.cmdPascal.TabIndex = 1;
this.cmdPascal.Text = "->";
this.cmdPascal.Click += new System.EventHandler(this.cmdPascal_Click);
//
// cmdAlgol
//
this.cmdAlgol.Location = new System.Drawing.Point(192, 96);
this.cmdAlgol.Name = "cmdAlgol";
this.cmdAlgol.Size = new System.Drawing.Size(24, 20);
this.cmdAlgol.TabIndex = 1;
this.cmdAlgol.Text = "->";
this.cmdAlgol.Click += new System.EventHandler(this.cmdAlgol_Click);
//
// ptExample
//
this.ptExample.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ptExample.Controls.AddRange(new System.Windows.Forms.Control[] {
this.ppRarely,
this.ppLanguages,
this.ppSettings,
this.ppOften,
this.ppAbout,
this.ppAlgol,
this.ppCPP,
this.ppYourFavorite,
this.ppCSharp,
this.ppJava,
this.ppLisp,
this.ppPascal,
this.ppPROLOG});
this.ptExample.ImageIndex = -1;
this.ptExample.ImageList = null;
this.ptExample.Indent = 19;
this.ptExample.Name = "ptExample";
this.ptExample.SelectedImageIndex = -1;
this.ptExample.SelectedPane = this.ppLanguages;
this.ptExample.ShowLines = true;
this.ptExample.ShowPlusMinus = true;
this.ptExample.ShowRootLines = true;
this.ptExample.Size = new System.Drawing.Size(532, 292);
this.ptExample.TabIndex = 3;
this.ptExample.PaneDeactivating += new PropTree.PropertyTree.PaneDeactivatingEventHandler(this.ptExample_PaneDeactivating);
this.ptExample.PaneActivating += new PropTree.PropertyTree.PaneActivatingEventHandler(this.ptExample_PaneActivating);
//
// ppRarely
//
this.ppRarely.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppRarely.ImageIndex = -1;
this.ppRarely.Index = 3;
this.ppRarely.Name = "ppRarely";
this.ppRarely.Path = "Programming languages";
this.ppRarely.SelectedImageIndex = -1;
this.ppRarely.Size = new System.Drawing.Size(416, 284);
this.ppRarely.TabIndex = 14;
this.ppRarely.Title = "Rarely used";
//
// ppLanguages
//
this.ppLanguages.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppLanguages.Controls.AddRange(new System.Windows.Forms.Control[] {
this.cmdToAbout});
this.ppLanguages.ImageIndex = -1;
this.ppLanguages.Index = 4;
this.ppLanguages.IsExpanded = true;
this.ppLanguages.Name = "ppLanguages";
this.ppLanguages.SelectedImageIndex = -1;
this.ppLanguages.Size = new System.Drawing.Size(376, 292);
this.ppLanguages.TabIndex = 11;
this.ppLanguages.Title = "Programming languages";
//
// ppOften
//
this.ppOften.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppOften.ImageIndex = -1;
this.ppOften.Index = 2;
this.ppOften.Name = "ppOften";
this.ppOften.Path = "Programming languages";
this.ppOften.SelectedImageIndex = -1;
this.ppOften.Size = new System.Drawing.Size(416, 284);
this.ppOften.TabIndex = 13;
this.ppOften.Title = "Often used";
//
// ppAbout
//
this.ppAbout.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppAbout.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label9,
this.label8});
this.ppAbout.ImageIndex = -1;
this.ppAbout.Index = 1;
this.ppAbout.Name = "ppAbout";
this.ppAbout.Path = "Programming languages";
this.ppAbout.SelectedImageIndex = -1;
this.ppAbout.Size = new System.Drawing.Size(416, 284);
this.ppAbout.TabIndex = 21;
this.ppAbout.Title = "About";
//
// ppAlgol
//
this.ppAlgol.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppAlgol.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtAlgol,
this.label3});
this.ppAlgol.ImageIndex = -1;
this.ppAlgol.Index = 0;
this.ppAlgol.Name = "ppAlgol";
this.ppAlgol.Path = "Programming languages\\Rarely used";
this.ppAlgol.SelectedImageIndex = -1;
this.ppAlgol.Size = new System.Drawing.Size(456, 276);
this.ppAlgol.TabIndex = 18;
this.ppAlgol.Title = "Algol 68";
//
// txtAlgol
//
this.txtAlgol.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.txtAlgol.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtAlgol.Location = new System.Drawing.Point(8, 100);
this.txtAlgol.Multiline = true;
this.txtAlgol.Name = "txtAlgol";
this.txtAlgol.ReadOnly = true;
this.txtAlgol.Size = new System.Drawing.Size(360, 184);
this.txtAlgol.TabIndex = 0;
this.txtAlgol.Text = "";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.label3.Location = new System.Drawing.Point(8, 8);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(360, 88);
this.label3.TabIndex = 1;
this.label3.Text = "Algol 68 - The ancestor of so many modern programming languages today. I haven\'t" +
" heard of anyone using it outside of the DoD for quite awhile. Perhaps that\'s b" +
"ecause it sucks...";
//
// ppJava
//
this.ppJava.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppJava.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtJava,
this.label4});
this.ppJava.ImageIndex = -1;
this.ppJava.Index = 2;
this.ppJava.Name = "ppJava";
this.ppJava.Path = "Programming languages\\Rarely used";
this.ppJava.SelectedImageIndex = -1;
this.ppJava.Size = new System.Drawing.Size(536, 260);
this.ppJava.TabIndex = 17;
this.ppJava.Title = "Java";
//
// ppLisp
//
this.ppLisp.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppLisp.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtLISP,
this.label7});
this.ppLisp.ImageIndex = -1;
this.ppLisp.Index = 3;
this.ppLisp.Name = "ppLisp";
this.ppLisp.Path = "Programming languages\\Rarely used";
this.ppLisp.SelectedImageIndex = -1;
this.ppLisp.Size = new System.Drawing.Size(536, 260);
this.ppLisp.TabIndex = 23;
this.ppLisp.Title = "Lisp";
this.ppLisp.Paint += new System.Windows.Forms.PaintEventHandler(this.ppLisp_Paint);
//
// txtLISP
//
this.txtLISP.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.txtLISP.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtLISP.Location = new System.Drawing.Point(8, 100);
this.txtLISP.Multiline = true;
this.txtLISP.Name = "txtLISP";
this.txtLISP.ReadOnly = true;
this.txtLISP.Size = new System.Drawing.Size(360, 184);
this.txtLISP.TabIndex = 0;
this.txtLISP.Text = "";
//
// ppPascal
//
this.ppPascal.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.ppPascal.Controls.AddRange(new System.Windows.Forms.Control[] {
this.txtPascal,
this.label5});
this.ppPascal.ImageIndex = -1;
this.ppPascal.Index = 5;
this.ppPascal.Name = "ppPascal";
this.ppPascal.Path = "Programming languages\\Rarely used";
this.ppPascal.SelectedImageIndex = -1;
this.ppPascal.Size = new System.Drawing.Size(536, 260);
this.ppPascal.TabIndex = 19;
this.ppPascal.Title = "Pascal";
//
// txtPascal
//
this.txtPascal.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.txtPascal.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.txtPascal.Location = new System.Drawing.Point(8, 100);
this.txtPascal.Multiline = true;
this.txtPascal.Name = "txtPascal";
this.txtPascal.ReadOnly = true;
this.txtPascal.Size = new System.Drawing.Size(360, 184);
this.txtPascal.TabIndex = 0;
this.txtPascal.Text = "";
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
this.label5.Location = new System.Drawing.Point(8, 8);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(360, 88);
this.label5.TabIndex = 1;
this.label5.Text = @"Pascal - my 'Introduction to Programming' course used Pascal. I must admit that my primary reason for disliking Pascal is because it uses 'Begin' and 'End' instead of curly braces. I also dislike it because of the number of times I had to implement quicksort with it...";
//
// Form3
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(532, 293);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.ptExample});
this.Name = "Form3";
this.Text = "Around the world with \'Hello World\'";
this.ppPROLOG.ResumeLayout(false);
this.ppCSharp.ResumeLayout(false);
this.ppSettings.ResumeLayout(false);
this.ppCPP.ResumeLayout(false);
this.ppYourFavorite.ResumeLayout(false);
this.ppLanguages.ResumeLayout(false);
this.ppAbout.ResumeLayout(false);
this.ppAlgol.ResumeLayout(false);
this.ppJava.ResumeLayout(false);
this.ppLisp.ResumeLayout(false);
this.ppPascal.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void propertyTree1_Click(object sender, System.EventArgs e)
{
}
private void chkAutoNavigate_CheckedChanged(object sender, System.EventArgs e)
{
bool b = chkAutoNavigate.Checked;
ptExample.AutoNavigate = b;
if(!b)
{
chkShowLines.Enabled = true;
chkShowPlusMinus.Enabled = true;
chkShowRootLines.Enabled = true;
ptExample.ShowLines = chkShowLines.Checked;
ptExample.ShowPlusMinus = chkShowPlusMinus.Checked;
ptExample.ShowRootLines = chkShowRootLines.Checked;
}
else
{
chkShowLines.Enabled = false;
chkShowPlusMinus.Enabled = false;
chkShowRootLines.Enabled = false;
}
}
private void cmdCPP_Click(object sender, System.EventArgs e)
{
ptExample.SelectedPane = ppCPP;
}
private void cmdCSharp_Click(object sender, System.EventArgs e)
{
ptExample.SelectedPane = ppCSharp;
}
private void cmdAlgol_Click(object sender, System.EventArgs e)
{
ptExample.SelectedPane = ppAlgol;
}
private void cmdJava_Click(object sender, System.EventArgs e)
{
ptExample.SelectedPane = ppJava;
}
private void cmdPascal_Click(object sender, System.EventArgs e)
{
ptExample.SelectedPane = ppPascal;
}
private void cmdPROLOG_Click(object sender, System.EventArgs e)
{
ptExample.SelectedPane = ppPROLOG;
}
private void ptExample_PaneDeactivating(PropTree.PropertyTree sender, PropTree.PaneSelectionEventArgs psea)
{
if(psea.CurPane != ppYourFavorite)
return;
if(!(optAlgol.Checked ||
optCPP.Checked ||
optCSharp.Checked ||
optJava.Checked ||
optOther.Checked ||
optPascal.Checked ||
optPROLOG.Checked))
{
MessageBox.Show("You must tell me what your favorite programming language is!");
psea.Cancel = true;
return;
}
if(optOther.Checked && txtOther.Text == "")
{
MessageBox.Show("You checked 'Other', but didn't type in the name of a programming language!");
psea.Cancel = true;
return;
}
}
protected void FillTextboxes()
{
txtCPP.Text = "#include <iostream.h>\r\n\r\n" +
"int main(void)\r\n" +
"{\r\n" +
" cout << \"Hello World!\\n\" << endl;\r\n" +
" return 0;\r\n" +
"}\r\n";
txtCSharp.Text = "using System;\r\n\r\n" +
"namespace MyNamespace\r\n" +
"{\r\n" +
" class MyClass\r\n" +
" {\r\n" +
" static void Main(string[] args)\r\n" +
" {\r\n" +
" System.Console.WriteLine(\"Hello World!\");\r\n" +
" }\r\n" +
" }\r\n" +
"}\r\n";
txtAlgol.Text = "*LIB=..\\STDLIB\\TRANSPUT\r\n" +
"'begin'\r\n" +
" print(\"Hello World!\")\r\n" +
"'end'\r\n";
txtJava.Text = "import java.lang.*;\r\n" +
"\r\n" +
"public class HelloWorld\r\n" +
"{\r\n" +
" public static void Main(String args[])\r\n" +
" {\r\n" +
" System.out.println(\"Hello World!\");\r\n" +
" }\r\n" +
"}\r\n";
txtLISP.Text = "(defun main(arg)\r\n" +
" (format t \"Hello ~A World!\" arg))\r\n";
txtPascal.Text = "Program HelloWorld;\r\n" +
"Begin\r\n" +
"\r\n" +
"Begin\r\n" +
" WriteLn('Hello World!');\r\n" +
"End;\r\n" +
"\r\n" +
"End.\r\n";
txtPROLOG.Text = "At the end of Summer 1999, after my Programming Languages class was over, I swore that" +
"I would never again write a single line of PROLOG. Today will not be an exception.";
}
private void ppLisp_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
}
private void chkShowLines_CheckedChanged(object sender, System.EventArgs e)
{
ptExample.ShowLines = chkShowLines.Checked;
}
private void chkShowPlusMinus_CheckedChanged(object sender, System.EventArgs e)
{
ptExample.ShowPlusMinus = chkShowPlusMinus.Checked;
}
private void chkShowRootLines_CheckedChanged(object sender, System.EventArgs e)
{
ptExample.ShowRootLines = chkShowRootLines.Checked;
}
private void cmdToAbout_Click(object sender, System.EventArgs e)
{
ptExample.SelectedPane = ppAbout;
}
private void ptExample_PaneActivating(PropTree.PropertyTree sender, PropTree.PaneSelectionEventArgs psea)
{
if(psea.NewPane == ppOften)
{
psea.Cancel = true;
ptExample.SelectedPane = ppCPP;
return;
}
if(psea.NewPane == ppRarely)
{
psea.Cancel = true;
ptExample.SelectedPane = ppAlgol;
return;
}
}
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form3());
}
}
}