|
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace TenTec.Utils.Forms
{
/// <summary>
/// This form is used to add a meber to a project.
/// </summary>
internal class NewConceptualTopic : System.Windows.Forms.Form
{
#region Designer Fields
private System.Windows.Forms.RadioButton fRadioButtonRoot;
private System.Windows.Forms.RadioButton fRadioButtonSelected;
private System.Windows.Forms.TextBox fTextBoxName;
private System.Windows.Forms.Label fLabelName;
private System.Windows.Forms.Button fButtonCancel;
private System.Windows.Forms.Button fButtonOK;
#endregion
#region Windows Form Designer generated code
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NewConceptualTopic));
this.fRadioButtonRoot = new System.Windows.Forms.RadioButton();
this.fRadioButtonSelected = new System.Windows.Forms.RadioButton();
this.fTextBoxName = new System.Windows.Forms.TextBox();
this.fLabelName = new System.Windows.Forms.Label();
this.fButtonCancel = new System.Windows.Forms.Button();
this.fButtonOK = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// fRadioButtonRoot
//
this.fRadioButtonRoot.Checked = true;
this.fRadioButtonRoot.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.fRadioButtonRoot.Location = new System.Drawing.Point(8, 8);
this.fRadioButtonRoot.Name = "fRadioButtonRoot";
this.fRadioButtonRoot.Size = new System.Drawing.Size(104, 24);
this.fRadioButtonRoot.TabIndex = 0;
this.fRadioButtonRoot.TabStop = true;
this.fRadioButtonRoot.Text = "Add to Root";
//
// fRadioButtonSelected
//
this.fRadioButtonSelected.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.fRadioButtonSelected.Location = new System.Drawing.Point(8, 32);
this.fRadioButtonSelected.Name = "fRadioButtonSelected";
this.fRadioButtonSelected.Size = new System.Drawing.Size(168, 24);
this.fRadioButtonSelected.TabIndex = 1;
this.fRadioButtonSelected.Text = "Add to Selected Node";
//
// fTextBoxName
//
this.fTextBoxName.Location = new System.Drawing.Point(5, 84);
this.fTextBoxName.Name = "fTextBoxName";
this.fTextBoxName.Size = new System.Drawing.Size(399, 23);
this.fTextBoxName.TabIndex = 4;
//
// fLabelName
//
this.fLabelName.Location = new System.Drawing.Point(5, 62);
this.fLabelName.Name = "fLabelName";
this.fLabelName.Size = new System.Drawing.Size(100, 23);
this.fLabelName.TabIndex = 3;
this.fLabelName.Text = "Topic Title:";
//
// fButtonCancel
//
this.fButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.fButtonCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.fButtonCancel.Location = new System.Drawing.Point(329, 115);
this.fButtonCancel.Name = "fButtonCancel";
this.fButtonCancel.Size = new System.Drawing.Size(75, 24);
this.fButtonCancel.TabIndex = 6;
this.fButtonCancel.Text = "Cancel";
//
// fButtonOK
//
this.fButtonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.fButtonOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.fButtonOK.Location = new System.Drawing.Point(246, 115);
this.fButtonOK.Name = "fButtonOK";
this.fButtonOK.Size = new System.Drawing.Size(75, 24);
this.fButtonOK.TabIndex = 5;
this.fButtonOK.Text = "OK";
//
// NewConceptualTopic
//
this.AcceptButton = this.fButtonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.fButtonCancel;
this.ClientSize = new System.Drawing.Size(410, 147);
this.Controls.Add(this.fButtonOK);
this.Controls.Add(this.fButtonCancel);
this.Controls.Add(this.fRadioButtonSelected);
this.Controls.Add(this.fRadioButtonRoot);
this.Controls.Add(this.fTextBoxName);
this.Controls.Add(this.fLabelName);
this.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "NewConceptualTopic";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Add New Conceptual Topic";
this.Load += new System.EventHandler(this.FormAddMember_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
/// <summary>
/// Creates an instance of the FormAddMember class.
/// </summary>
/// <param name="selectedMemberTypes">
/// The type of memebers that can be added to the currently selected member.
/// </param>
public NewConceptualTopic(bool canAddToSelectedNode)
{
InitializeComponent();
fRadioButtonSelected.Enabled = canAddToSelectedNode;
if (canAddToSelectedNode)
fRadioButtonSelected.Checked = true;
}
private void FormAddMember_Load(object sender, System.EventArgs e)
{
fTextBoxName.Select();
}
public bool AddToRoot
{
get
{
return fRadioButtonRoot.Checked;
}
}
public bool AddToSelected
{
get
{
return fRadioButtonSelected.Checked;
}
}
public string TopicTitle
{
get
{
return fTextBoxName.Text;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.