Ejemplo n.º 1
0
		public InplaceEditForm(Node oNode, TreeViewDesigner oDesigner)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			m_oNode = oNode;
			m_oDesigner = oDesigner;

			textBox1.Text = m_oNode.Text;
			textBox1.SelectAll();

			textBox1.LostFocus += new EventHandler(textBox1_LostFocus);
			textBox1.Focus();
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Sets the parent for the node
		/// </summary>
		/// <param name="oNode"></param>
		internal void SetParent(Node oNode)
		{
			m_oParentNode = oNode;
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{			
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ColorSchemePickerForm));
			PureComponents.TreeView.ContextMenuStrings contextMenuStrings1 = new PureComponents.TreeView.ContextMenuStrings();
			PureComponents.TreeView.TreeViewStyle treeViewStyle1 = new PureComponents.TreeView.TreeViewStyle();
			PureComponents.TreeView.NodeStyle nodeStyle1 = new PureComponents.TreeView.NodeStyle();
			PureComponents.TreeView.CheckBoxStyle checkBoxStyle1 = new PureComponents.TreeView.CheckBoxStyle();
			PureComponents.TreeView.ExpandBoxStyle expandBoxStyle1 = new PureComponents.TreeView.ExpandBoxStyle();
			PureComponents.TreeView.NodeTooltipStyle nodeTooltipStyle1 = new PureComponents.TreeView.NodeTooltipStyle();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.panel1 = new System.Windows.Forms.Panel();
			this.label1 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.panel2 = new System.Windows.Forms.Panel();
			this.button3 = new System.Windows.Forms.Button();
			this.m_rbDefault = new System.Windows.Forms.RadioButton();
			this.m_rbSky = new System.Windows.Forms.RadioButton();
			this.m_rbOcean = new System.Windows.Forms.RadioButton();
			this.m_rbForest = new System.Windows.Forms.RadioButton();
			this.m_rbSunset = new System.Windows.Forms.RadioButton();
			this.m_rbRose = new System.Windows.Forms.RadioButton();
			this.m_rbGold = new System.Windows.Forms.RadioButton();
			this.m_rbWood = new System.Windows.Forms.RadioButton();
			this.m_rbSilver = new System.Windows.Forms.RadioButton();
			this.treeView1 = new PureComponents.TreeView.TreeView();
			this.Node1 = new PureComponents.TreeView.Node();
			this.Node2 = new PureComponents.TreeView.Node();
			this.Node3 = new PureComponents.TreeView.Node();
			this.Node4 = new PureComponents.TreeView.Node();
			this.Node5 = new PureComponents.TreeView.Node();
			this.Node6 = new PureComponents.TreeView.Node();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.label2 = new System.Windows.Forms.Label();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.m_chkTooltipStyle = new System.Windows.Forms.CheckBox();
			this.m_chkCheckBoxStyle = new System.Windows.Forms.CheckBox();
			this.m_chkExpandBoxStyle = new System.Windows.Forms.CheckBox();
			this.m_chkNodeStyle = new System.Windows.Forms.CheckBox();
			this.m_chkTreeViewStyle = new System.Windows.Forms.CheckBox();
			this.panel1.SuspendLayout();
			this.panel2.SuspendLayout();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.SuspendLayout();
			// 
			// button1
			// 
			this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.button1.Location = new System.Drawing.Point(216, 6);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(75, 24);
			this.button1.TabIndex = 3;
			this.button1.Text = "OK";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.button2.Location = new System.Drawing.Point(296, 6);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(75, 24);
			this.button2.TabIndex = 3;
			this.button2.Text = "Cancel";
			// 
			// panel1
			// 
			this.panel1.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("panel1.BackgroundImage")));
			this.panel1.Controls.AddRange(new System.Windows.Forms.Control[] {
																				 this.label1,
																				 this.label3});
			this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(458, 88);
			this.panel1.TabIndex = 4;
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
			this.label1.Location = new System.Drawing.Point(88, 48);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(368, 32);
			this.label1.TabIndex = 4;
			this.label1.Text = "Choose the color scheme, you can review the result immediately in the TreeView\'s " +
				"preview.";
			// 
			// label3
			// 
			this.label3.BackColor = System.Drawing.Color.Transparent;
			this.label3.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(238)));
			this.label3.ForeColor = System.Drawing.Color.White;
			this.label3.Location = new System.Drawing.Point(88, 8);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(232, 24);
			this.label3.TabIndex = 11;
			this.label3.Text = "Color Scheme Picker";
			// 
			// panel2
			// 
			this.panel2.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("panel2.BackgroundImage")));
			this.panel2.Controls.AddRange(new System.Windows.Forms.Control[] {
																				 this.button1,
																				 this.button2,
																				 this.button3});
			this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
			this.panel2.Location = new System.Drawing.Point(0, 306);
			this.panel2.Name = "panel2";
			this.panel2.Size = new System.Drawing.Size(458, 36);
			this.panel2.TabIndex = 5;
			// 
			// button3
			// 
			this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.button3.Location = new System.Drawing.Point(376, 6);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(75, 24);
			this.button3.TabIndex = 3;
			this.button3.Text = "Apply";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// m_rbDefault
			// 
			this.m_rbDefault.Checked = true;
			this.m_rbDefault.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbDefault.Location = new System.Drawing.Point(16, 16);
			this.m_rbDefault.Name = "m_rbDefault";
			this.m_rbDefault.Size = new System.Drawing.Size(72, 24);
			this.m_rbDefault.TabIndex = 7;
			this.m_rbDefault.TabStop = true;
			this.m_rbDefault.Text = "Default";
			this.m_rbDefault.CheckedChanged += new System.EventHandler(this.m_rbDefault_CheckedChanged);
			// 
			// m_rbSky
			// 
			this.m_rbSky.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbSky.Location = new System.Drawing.Point(16, 40);
			this.m_rbSky.Name = "m_rbSky";
			this.m_rbSky.Size = new System.Drawing.Size(72, 16);
			this.m_rbSky.TabIndex = 7;
			this.m_rbSky.Text = "Sky";
			this.m_rbSky.CheckedChanged += new System.EventHandler(this.m_rbSky_CheckedChanged);
			// 
			// m_rbOcean
			// 
			this.m_rbOcean.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbOcean.Location = new System.Drawing.Point(16, 56);
			this.m_rbOcean.Name = "m_rbOcean";
			this.m_rbOcean.Size = new System.Drawing.Size(72, 24);
			this.m_rbOcean.TabIndex = 7;
			this.m_rbOcean.Text = "Ocean";
			this.m_rbOcean.CheckedChanged += new System.EventHandler(this.m_rbOcean_CheckedChanged);
			// 
			// m_rbForest
			// 
			this.m_rbForest.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbForest.Location = new System.Drawing.Point(16, 79);
			this.m_rbForest.Name = "m_rbForest";
			this.m_rbForest.Size = new System.Drawing.Size(72, 16);
			this.m_rbForest.TabIndex = 7;
			this.m_rbForest.Text = "Forest";
			this.m_rbForest.CheckedChanged += new System.EventHandler(this.m_rbForest_CheckedChanged);
			// 
			// m_rbSunset
			// 
			this.m_rbSunset.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbSunset.Location = new System.Drawing.Point(16, 96);
			this.m_rbSunset.Name = "m_rbSunset";
			this.m_rbSunset.Size = new System.Drawing.Size(72, 24);
			this.m_rbSunset.TabIndex = 7;
			this.m_rbSunset.Text = "Sunset";
			this.m_rbSunset.CheckedChanged += new System.EventHandler(this.m_rbSunset_CheckedChanged);
			// 
			// m_rbRose
			// 
			this.m_rbRose.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbRose.Location = new System.Drawing.Point(16, 112);
			this.m_rbRose.Name = "m_rbRose";
			this.m_rbRose.Size = new System.Drawing.Size(72, 32);
			this.m_rbRose.TabIndex = 7;
			this.m_rbRose.Text = "Rose";
			this.m_rbRose.CheckedChanged += new System.EventHandler(this.m_rbRose_CheckedChanged);
			// 
			// m_rbGold
			// 
			this.m_rbGold.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbGold.Location = new System.Drawing.Point(16, 136);
			this.m_rbGold.Name = "m_rbGold";
			this.m_rbGold.Size = new System.Drawing.Size(72, 24);
			this.m_rbGold.TabIndex = 7;
			this.m_rbGold.Text = "Gold";
			this.m_rbGold.CheckedChanged += new System.EventHandler(this.m_rbGold_CheckedChanged);
			// 
			// m_rbWood
			// 
			this.m_rbWood.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbWood.Location = new System.Drawing.Point(16, 152);
			this.m_rbWood.Name = "m_rbWood";
			this.m_rbWood.Size = new System.Drawing.Size(72, 32);
			this.m_rbWood.TabIndex = 7;
			this.m_rbWood.Text = "Wood";
			this.m_rbWood.CheckedChanged += new System.EventHandler(this.m_rbWood_CheckedChanged);
			// 
			// m_rbSilver
			// 
			this.m_rbSilver.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_rbSilver.Location = new System.Drawing.Point(16, 176);
			this.m_rbSilver.Name = "m_rbSilver";
			this.m_rbSilver.Size = new System.Drawing.Size(72, 24);
			this.m_rbSilver.TabIndex = 7;
			this.m_rbSilver.Text = "Silver";
			this.m_rbSilver.CheckedChanged += new System.EventHandler(this.m_rbSilver_CheckedChanged);
			// 
			// treeView1
			// 
			this.treeView1.AllowAdding = true;
			this.treeView1.AllowArranging = true;
			this.treeView1.AllowDeleting = true;
			this.treeView1.AllowEditing = true;
			this.treeView1.AutoDragDrop = true;
			this.treeView1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
			this.treeView1.CheckBoxes = false;
			this.treeView1.ContextMenuArranging = false;
			this.treeView1.ContextMenuEditing = false;
			contextMenuStrings1.AddNode = "Add Node";
			contextMenuStrings1.Collapse = "Collapse";
			contextMenuStrings1.Copy = "Copy";
			contextMenuStrings1.DeleteNode = "Delete Node";
			contextMenuStrings1.EditNode = "Edit Node";
			contextMenuStrings1.Expand = "Expand";
			contextMenuStrings1.LoadXml = "Load Xml...";
			contextMenuStrings1.MoveBottom = "Move Bottom";
			contextMenuStrings1.MoveDown = "Move Down";
			contextMenuStrings1.MoveLeft = "Move Left";
			contextMenuStrings1.MoveRight = "Move Right";
			contextMenuStrings1.MoveTop = "Move Top";
			contextMenuStrings1.MoveUp = "Move Up";
			contextMenuStrings1.Paste = "Paste";
			contextMenuStrings1.SaveXml = "Save Xml...";
			this.treeView1.ContextMenuStrings = contextMenuStrings1;
			this.treeView1.ContextMenuXmlOperations = false;
			this.treeView1.ExpandOnDblClick = true;
			this.treeView1.Flags = false;
			this.treeView1.HideSelection = false;
			this.treeView1.ImageList = null;
			this.treeView1.LabelEdit = true;
			this.treeView1.Location = new System.Drawing.Point(280, 112);
			this.treeView1.Multiline = true;
			this.treeView1.Name = "treeView1";
			this.treeView1.NodeAutoNumbering = false;
			this.treeView1.Nodes.AddRange(new PureComponents.TreeView.Node[] {
																				 this.Node1});
			this.treeView1.PathSeparator = "\\";
			this.treeView1.Size = new System.Drawing.Size(152, 187);
			this.treeView1.Sorted = false;
			treeViewStyle1.AutoCollapse = false;
			treeViewStyle1.BackColor = System.Drawing.Color.White;
			treeViewStyle1.BorderColor = System.Drawing.Color.Black;
			treeViewStyle1.BorderStyle = PureComponents.TreeView.BorderStyle.Solid;
			treeViewStyle1.FadeColor = System.Drawing.Color.White;
			treeViewStyle1.FillStyle = PureComponents.TreeView.FillStyle.Flat;
			treeViewStyle1.FlashColor = System.Drawing.Color.Red;
			treeViewStyle1.HighlightSelectedPath = false;
			treeViewStyle1.LineColor = System.Drawing.Color.Gray;
			treeViewStyle1.LineStyle = PureComponents.TreeView.LineStyle.Dot;
			checkBoxStyle1.BackColor = System.Drawing.Color.White;
			checkBoxStyle1.BorderColor = System.Drawing.Color.Black;
			checkBoxStyle1.BorderStyle = PureComponents.TreeView.CheckBoxBorderStyle.Solid;
			checkBoxStyle1.CheckColor = System.Drawing.Color.Black;
			checkBoxStyle1.HoverBackColor = System.Drawing.Color.White;
			checkBoxStyle1.HoverBorderColor = System.Drawing.Color.Black;
			checkBoxStyle1.HoverCheckColor = System.Drawing.Color.Black;
			nodeStyle1.CheckBoxStyle = checkBoxStyle1;
			expandBoxStyle1.BackColor = System.Drawing.Color.SkyBlue;
			expandBoxStyle1.BorderColor = System.Drawing.Color.Black;
			expandBoxStyle1.ForeColor = System.Drawing.Color.Black;
			expandBoxStyle1.Shape = PureComponents.TreeView.ExpandBoxShape.XP;
			nodeStyle1.ExpandBoxStyle = expandBoxStyle1;
			nodeStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F);
			nodeStyle1.ForeColor = System.Drawing.Color.Black;
			nodeStyle1.HoverBackColor = System.Drawing.Color.LightGray;
			nodeStyle1.HoverForeColor = System.Drawing.Color.Black;
			nodeStyle1.Parent = null;
			nodeStyle1.SelectedBackColor = System.Drawing.Color.FromArgb(((System.Byte)(183)), ((System.Byte)(175)), ((System.Byte)(255)));
			nodeStyle1.SelectedBorderColor = System.Drawing.Color.FromArgb(((System.Byte)(135)), ((System.Byte)(127)), ((System.Byte)(255)));
			nodeStyle1.SelectedFillStyle = PureComponents.TreeView.FillStyle.Flat;
			nodeStyle1.SelectedForeColor = System.Drawing.Color.Black;
			nodeTooltipStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
			nodeTooltipStyle1.BorderColor = System.Drawing.Color.FromArgb(((System.Byte)(170)), ((System.Byte)(142)), ((System.Byte)(125)));
			nodeTooltipStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F);
			nodeTooltipStyle1.ForeColor = System.Drawing.Color.Black;
			nodeStyle1.TooltipStyle = nodeTooltipStyle1;
			nodeStyle1.UnderlineColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(0)), ((System.Byte)(0)));
			nodeStyle1.UnderlineStyle = PureComponents.TreeView.UnderlineStyle.Solid;
			treeViewStyle1.NodeStyle = nodeStyle1;
			treeViewStyle1.ShowLines = true;
			treeViewStyle1.ShowPlusMinus = true;
			treeViewStyle1.ShowSubitemsIndicator = false;
			treeViewStyle1.TrackNodeHover = true;
			this.treeView1.Style = treeViewStyle1;
			this.treeView1.TabIndex = 8;
			this.treeView1.TooltipPopDelay = 1500;
			// 
			// Node1
			// 
			this.Node1._TreeView = this.treeView1;
			this.Node1.CheckBoxVisible = true;
			this.Node1.Checked = false;
			this.Node1.ContextMenu = null;
			this.Node1.ContextMenuSource = PureComponents.TreeView.ContextMenuSource.None;
			this.Node1.Flag = null;
			this.Node1.FlagVisible = false;
			this.Node1.Image = null;
			this.Node1.IsEditing = false;
			this.Node1.Key = null;
			this.Node1.NodeStyle = null;
			this.Node1.NodeStyleSource = PureComponents.TreeView.NodeStyleSource.Default;
			this.Node1.Parent = null;
			this.Node1.Tag = null;
			this.Node1.Text = "Node1";
			this.Node1.Tooltip = null;
			this.Node1.TreeView = this.treeView1;
			this.Node1.Underline = false;
			this.Node1.Visible = true;
			this.Node1.YOrder = 0;
			// 
			// Node2
			// 
			this.Node2._TreeView = this.treeView1;
			this.Node2.CheckBoxVisible = true;
			this.Node2.Checked = false;
			this.Node2.ContextMenu = null;
			this.Node2.ContextMenuSource = PureComponents.TreeView.ContextMenuSource.None;
			this.Node2.Flag = null;
			this.Node2.FlagVisible = false;
			this.Node2.Image = null;
			this.Node2.IsEditing = false;
			this.Node2.Key = null;
			this.Node2.NodeStyle = null;
			this.Node2.NodeStyleSource = PureComponents.TreeView.NodeStyleSource.Default;
			this.Node2.Parent = this.Node1;
			this.Node2.Tag = null;
			this.Node2.Text = "Node2";
			this.Node2.Tooltip = null;
			this.Node2.TreeView = this.treeView1;
			this.Node2.Underline = false;
			this.Node2.Visible = true;
			this.Node2.YOrder = 0;
			// 
			// Node3
			// 
			this.Node3._TreeView = this.treeView1;
			this.Node3.CheckBoxVisible = true;
			this.Node3.Checked = false;
			this.Node3.ContextMenu = null;
			this.Node3.ContextMenuSource = PureComponents.TreeView.ContextMenuSource.None;
			this.Node3.Flag = null;
			this.Node3.FlagVisible = false;
			this.Node3.Image = null;
			this.Node3.IsEditing = false;
			this.Node3.Key = null;
			this.Node3.NodeStyle = null;
			this.Node3.NodeStyleSource = PureComponents.TreeView.NodeStyleSource.Default;
			this.Node3.Parent = this.Node2;
			this.Node3.Tag = null;
			this.Node3.Text = "Node3";
			this.Node3.Tooltip = null;
			this.Node3.TreeView = this.treeView1;
			this.Node3.Underline = false;
			this.Node3.Visible = true;
			this.Node3.YOrder = 0;
			// 
			// Node4
			// 
			this.Node4._TreeView = this.treeView1;
			this.Node4.CheckBoxVisible = true;
			this.Node4.Checked = false;
			this.Node4.ContextMenu = null;
			this.Node4.ContextMenuSource = PureComponents.TreeView.ContextMenuSource.None;
			this.Node4.Flag = null;
			this.Node4.FlagVisible = false;
			this.Node4.Image = null;
			this.Node4.IsEditing = false;
			this.Node4.Key = null;
			this.Node4.NodeStyle = null;
			this.Node4.NodeStyleSource = PureComponents.TreeView.NodeStyleSource.Default;
			this.Node4.Parent = this.Node2;
			this.Node4.Tag = null;
			this.Node4.Text = "Node4";
			this.Node4.Tooltip = null;
			this.Node4.TreeView = this.treeView1;
			this.Node4.Underline = false;
			this.Node4.Visible = true;
			this.Node4.YOrder = 1;
			// 
			// Node5
			// 
			this.Node5._TreeView = this.treeView1;
			this.Node5.CheckBoxVisible = true;
			this.Node5.Checked = false;
			this.Node5.ContextMenu = null;
			this.Node5.ContextMenuSource = PureComponents.TreeView.ContextMenuSource.None;
			this.Node5.Flag = null;
			this.Node5.FlagVisible = false;
			this.Node5.Image = null;
			this.Node5.IsEditing = false;
			this.Node5.Key = null;
			this.Node5.NodeStyle = null;
			this.Node5.NodeStyleSource = PureComponents.TreeView.NodeStyleSource.Default;
			this.Node5.Parent = this.Node2;
			this.Node5.Tag = null;
			this.Node5.Text = "Node5";
			this.Node5.Tooltip = null;
			this.Node5.TreeView = this.treeView1;
			this.Node5.Underline = false;
			this.Node5.Visible = true;
			this.Node5.YOrder = 2;
			// 
			// Node6
			// 
			this.Node6._TreeView = this.treeView1;
			this.Node6.CheckBoxVisible = true;
			this.Node6.Checked = false;
			this.Node6.ContextMenu = null;
			this.Node6.ContextMenuSource = PureComponents.TreeView.ContextMenuSource.None;
			this.Node6.Flag = null;
			this.Node6.FlagVisible = false;
			this.Node6.Image = null;
			this.Node6.IsEditing = false;
			this.Node6.Key = null;
			this.Node6.NodeStyle = null;
			this.Node6.NodeStyleSource = PureComponents.TreeView.NodeStyleSource.Default;
			this.Node6.Parent = this.Node4;
			this.Node6.Tag = null;
			this.Node6.Text = "Node6";
			this.Node6.Tooltip = null;
			this.Node6.TreeView = this.treeView1;
			this.Node6.Underline = false;
			this.Node6.Visible = true;
			this.Node6.YOrder = 0;
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.m_rbSunset,
																					this.m_rbGold,
																					this.m_rbSilver,
																					this.m_rbSky,
																					this.m_rbForest,
																					this.m_rbWood,
																					this.m_rbDefault,
																					this.m_rbOcean,
																					this.m_rbRose});
			this.groupBox1.Location = new System.Drawing.Point(8, 92);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(112, 208);
			this.groupBox1.TabIndex = 9;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Color scheme";
			// 
			// label2
			// 
			this.label2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
			this.label2.Location = new System.Drawing.Point(280, 95);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(48, 16);
			this.label2.TabIndex = 5;
			this.label2.Text = "Preview";
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.m_chkTooltipStyle,
																					this.m_chkCheckBoxStyle,
																					this.m_chkExpandBoxStyle,
																					this.m_chkNodeStyle,
																					this.m_chkTreeViewStyle});
			this.groupBox2.Location = new System.Drawing.Point(129, 92);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(143, 208);
			this.groupBox2.TabIndex = 10;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "Apply to";
			// 
			// m_chkTooltipStyle
			// 
			this.m_chkTooltipStyle.Checked = true;
			this.m_chkTooltipStyle.CheckState = System.Windows.Forms.CheckState.Checked;
			this.m_chkTooltipStyle.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_chkTooltipStyle.Location = new System.Drawing.Point(5, 100);
			this.m_chkTooltipStyle.Name = "m_chkTooltipStyle";
			this.m_chkTooltipStyle.Size = new System.Drawing.Size(130, 24);
			this.m_chkTooltipStyle.TabIndex = 15;
			this.m_chkTooltipStyle.Text = "TooltipStyle";
			// 
			// m_chkCheckBoxStyle
			// 
			this.m_chkCheckBoxStyle.Checked = true;
			this.m_chkCheckBoxStyle.CheckState = System.Windows.Forms.CheckState.Checked;
			this.m_chkCheckBoxStyle.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_chkCheckBoxStyle.Location = new System.Drawing.Point(5, 79);
			this.m_chkCheckBoxStyle.Name = "m_chkCheckBoxStyle";
			this.m_chkCheckBoxStyle.Size = new System.Drawing.Size(130, 24);
			this.m_chkCheckBoxStyle.TabIndex = 14;
			this.m_chkCheckBoxStyle.Text = "CheckBoxStyle";
			// 
			// m_chkExpandBoxStyle
			// 
			this.m_chkExpandBoxStyle.Checked = true;
			this.m_chkExpandBoxStyle.CheckState = System.Windows.Forms.CheckState.Checked;
			this.m_chkExpandBoxStyle.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_chkExpandBoxStyle.Location = new System.Drawing.Point(5, 59);
			this.m_chkExpandBoxStyle.Name = "m_chkExpandBoxStyle";
			this.m_chkExpandBoxStyle.Size = new System.Drawing.Size(130, 24);
			this.m_chkExpandBoxStyle.TabIndex = 13;
			this.m_chkExpandBoxStyle.Text = "ExpandBoxStyle";
			// 
			// m_chkNodeStyle
			// 
			this.m_chkNodeStyle.Checked = true;
			this.m_chkNodeStyle.CheckState = System.Windows.Forms.CheckState.Checked;
			this.m_chkNodeStyle.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_chkNodeStyle.Location = new System.Drawing.Point(5, 40);
			this.m_chkNodeStyle.Name = "m_chkNodeStyle";
			this.m_chkNodeStyle.Size = new System.Drawing.Size(130, 24);
			this.m_chkNodeStyle.TabIndex = 12;
			this.m_chkNodeStyle.Text = "NodeStyle";
			// 
			// m_chkTreeViewStyle
			// 
			this.m_chkTreeViewStyle.Checked = true;
			this.m_chkTreeViewStyle.CheckState = System.Windows.Forms.CheckState.Checked;
			this.m_chkTreeViewStyle.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
			this.m_chkTreeViewStyle.Location = new System.Drawing.Point(5, 22);
			this.m_chkTreeViewStyle.Name = "m_chkTreeViewStyle";
			this.m_chkTreeViewStyle.Size = new System.Drawing.Size(130, 24);
			this.m_chkTreeViewStyle.TabIndex = 11;
			this.m_chkTreeViewStyle.Text = "TreeViewStyle";
			// 
			// ColorSchemePickerForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(212)), ((System.Byte)(208)), ((System.Byte)(200)));
			this.ClientSize = new System.Drawing.Size(458, 342);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.treeView1,
																		  this.panel2,
																		  this.panel1,
																		  this.groupBox1,
																		  this.label2,
																		  this.groupBox2});
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
			this.Name = "ColorSchemePickerForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Color Scheme Picker";
			this.panel1.ResumeLayout(false);
			this.panel2.ResumeLayout(false);
			this.groupBox1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.ResumeLayout(false);

		}
Ejemplo n.º 4
0
		/// <summary>
		/// Sets the parent of the style
		/// </summary>		
		internal void SetParent(Node oParent)
		{	
			m_oParent = oParent;
		}
Ejemplo n.º 5
0
		/// <summary>
		/// Initializes the parent node object
		/// </summary>
		/// <param name="oParent">Node object to be associated with the style</param>
		public NodeStyle(Node oParent)
		{
			m_oParent = oParent;

			m_oCheckBoxStyle = new CheckBoxStyle(oParent);
			m_oExpandBoxStyle = new ExpandBoxStyle(oParent);
			m_oTooltipStyle = new NodeTooltipStyle(oParent);
		}
Ejemplo n.º 6
0
		public NodeTooltipStyle(Node oParent)
		{			
			m_oParent = oParent;
		}
Ejemplo n.º 7
0
			/// <summary>
			/// 
			/// </summary>
			/// <returns></returns>
			public Node ToTreeNode()
			{
				Node ToTreeNode = new Node();
				ToTreeNode.Text = this.Text;

				ToTreeNode.CheckBoxVisible = this.CheckBoxVisible;
				ToTreeNode.Visible = this.Visible;
				ToTreeNode.ShowPlusMinus = this.ShowPlusMinus;
				ToTreeNode.Checked = this.Checked;
				ToTreeNode.Underline = this.Underline;
				ToTreeNode.Image = this.Image;
				ToTreeNode.ImageIndex = this.ImageIndex;
					
				if (this.Nodes == null && this.Nodes.Length == 0) 
				{
					return null;
				}
				if(ToTreeNode != null && this.Nodes.Length == 0)
				{
					return ToTreeNode;
				}
				for (int i = 0; i <= this.Nodes.Length - 1; i++) 
				{
					ToTreeNode.Nodes.Add(this.Nodes[i].ToTreeNode());
				}
				return ToTreeNode;
			}
Ejemplo n.º 8
0
		/// <summary>
		/// Construction of the drag drop mode object
		/// </summary>
		/// <param name="oDragNode"></param>
		/// <param name="oDropNode"></param>
		/// <param name="eDropNode"></param>
		public NodeDragDrop(Node oDragNode, Node oDropNode, NodeDropMode eDropNode)
		{
			m_oDragNode = oDragNode;
			m_oDropNode = oDropNode;
			m_eDropMode = eDropNode;
		}
Ejemplo n.º 9
0
		public Node Add(string sNodeText)
		{
			Node oNode = new Node();
			oNode._TreeView = this.ParentTree;

			oNode.Text = sNodeText;

			Add(oNode);
			oNode.SetParent(ParentNode);
			oNode.TreeView = ParentTree;

			return oNode;
		}
Ejemplo n.º 10
0
		public NodeCollection(Node[] aItems) : this()
		{
			AddRange(aItems);
		}
Ejemplo n.º 11
0
		public NodeCollection(Node oParent) : this()
		{			
			ParentNode = oParent;			
		}
Ejemplo n.º 12
0
		/// <summary>
		/// Gets the array of nodes in the Node object by their Tag object.
		/// </summary>
		/// <param name="oTag">Tag object to find the nodes</param>
		/// <returns>Array of Node objects that have the Tag specified</returns>
		public Node [] GetNodesByTag(object oTag)
		{
			ArrayList aNodes = new ArrayList();			

			foreach (Node oNode in Nodes)
			{
				Node [] aGroupNodes = oNode.GetNodesByTag(oTag);

				if (aGroupNodes != null && aGroupNodes.Length > 0)
					aNodes.AddRange(aGroupNodes);
			}

			if (this.Tag == null && oTag == null)
				aNodes.Add(this);
			else
			{			
				if (this.Tag != null && this.Tag.Equals(oTag))
					aNodes.Add(this);
			}

			Node [] aData = new Node[aNodes.Count];
			aNodes.CopyTo(aData);

			return aData;
		}
Ejemplo n.º 13
0
		/// <summary>
		/// Copies the one node to another
		/// </summary>
		/// <param name="oNode"></param>
		internal void Copy(Node oNode)
		{
			this._TreeView = oNode.GetTreeView();
			this.ContextMenu = oNode.ContextMenu;
			this.ContextMenuSource = oNode.ContextMenuSource;
			this.Image = oNode.Image;
			this.ImageIndex = oNode.ImageIndex;			
			this.Text = oNode.Text;
			this.Checked = oNode.Checked;
			this.CheckBoxVisible = oNode.CheckBoxVisible;

			if (oNode.Flag != null)
			{
				this.Flag = new NodeFlag();
				this.Flag.Color = oNode.Flag.Color;
				this.Flag.Data = oNode.Flag.Data;
				this.Flag.FlagStyle = oNode.Flag.FlagStyle;
				this.Flag.SetNode(this);
			}
			
			this.FlagVisible = oNode.FlagVisible;
			this.NodeStyleSource = oNode.NodeStyleSource;

			if (oNode.NodeStyle != null)
			{
				this.NodeStyle = new NodeStyle();
				this.NodeStyle.ApplyStyle(oNode.NodeStyle);
			}

			this.Tag = oNode.Tag;
			this.Tooltip = oNode.Tooltip;
			this.Underline = oNode.Underline;
		}
Ejemplo n.º 14
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="g"></param>
		/// <returns></returns>
		internal int GetFullHeight(Node node, Graphics g)
		{
			int height = node.GetHeight(g) + GetTreeView().Style.NodeSpaceVertical;

			if (this.IsExpanded == true)
			{
				foreach (Node subNode in node.Nodes)
					height += subNode.GetFullHeight(subNode, g);
			}

			return height;
		}
Ejemplo n.º 15
0
		/// <summary>
		/// Creates the new subnode and adds the node to the node collection
		/// </summary>
		/// <returns></returns>
		public Node CreateSubNode()
		{
			Node oNode = new Node();
			oNode.SetParent(this);

			Nodes.Add(oNode);

			return oNode;
		}		
Ejemplo n.º 16
0
		public Node [] ToNodeArray()
		{
			Node [] aNodes = new Node[List.Count];
			List.CopyTo(aNodes, 0);

			return aNodes;
		}
Ejemplo n.º 17
0
		/// <summary>
		/// Gets all nodes in the collection sorted by the m_nCollectionOrder
		/// </summary>
		/// <returns>Sorted array of Nodes</returns>
		internal Node [] GetNodesCollectionSorted()
		{
			ArrayList aSorted = new ArrayList();
			
//			SortedList aSorted = new SortedList();
//
//			foreach (Node oNode in List)
//			{
//				try
//				{
//					aSorted.Add(oNode.m_nCollectionOrder, oNode);
//				}
//				catch
//				{
//					aSorted.Add(oNode.Collection.IndexOf(oNode), oNode);
//				}
//			}

			foreach (Node oNode in List)
				aSorted.Add(oNode);

			aSorted.Sort(new NodeCollectionOrderComparer());

			Node [] aNodes = new Node[List.Count];

			for (int nIndex = 0; nIndex < aSorted.Count; nIndex ++)
				aNodes[nIndex] = aSorted[nIndex] as Node;

			return aNodes;
		}
Ejemplo n.º 18
0
		public int Add(Node value) 
		{			
			TreeView treeView = null;

			if (ParentTree != null)
				treeView = ParentTree;

			if (ParentNode != null && treeView == null)
				treeView = ParentNode.TreeView;			

			if (List.Contains(value))
				return List.IndexOf(value);

			if (treeView != null && treeView.NodePool.Contains(value) == true)
				throw new Exception("Node is already added in other nodes collection.");

			value.SetNodeTreeViewReference(treeView);								
			
			int nPos = List.Add(value);			

			if (treeView != null)
			{			
				treeView.NodePool.Add(value);
				treeView.InvokeNodeAdded(value);
			}
			
			return nPos;
		}       		
Ejemplo n.º 19
0
			/// <summary>
			/// 
			/// </summary>
			/// <param name="node"></param>
			public TreeNodeData(Node node)
			{
				this.Text = node.Text;
				
				CheckBoxVisible = node.CheckBoxVisible;
				Visible = node.Visible;
				ShowPlusMinus = node.ShowPlusMinus;
				Checked = node.Checked;
				Underline = node.Underline;
				Image = node.Image;
				ImageIndex = node.ImageIndex;

				this.Nodes = new TreeNodeData[node.Nodes.Count];

				if (node.Nodes.Count == 0) 
				{
					return;
				}
				for (int i = 0; i <= node.Nodes.Count - 1; i++) 
				{
					Nodes[i] = new TreeNodeData(node.Nodes[i]);
				}
			}
Ejemplo n.º 20
0
		public void AddRange(Node[] value) 
		{
			foreach (Node a in value) 
			{
				Add(a);
			}
		}
Ejemplo n.º 21
0
		internal void SetNode(Node node)
		{
			m_Node = node;
		}
Ejemplo n.º 22
0
		public bool Contains(Node value) 
		{
			return List.Contains(value);
		}
Ejemplo n.º 23
0
		/// <summary>
		/// Default construction
		/// </summary>
		public NodeStyle()
		{
			m_oParent = null;

			m_oCheckBoxStyle = new CheckBoxStyle(null);
			m_oExpandBoxStyle = new ExpandBoxStyle(null);
			m_oTooltipStyle = new NodeTooltipStyle(null);
		}
Ejemplo n.º 24
0
		public void CopyTo(Node[] array, int index) 
		{
			List.CopyTo(array, index);
		}
Ejemplo n.º 25
0
		public CheckBoxStyle(Node parent) : this()
		{
			m_Parent = parent;
		}
Ejemplo n.º 26
0
		public int IndexOf(Node value) 
		{
			return List.IndexOf(value);
		}
Ejemplo n.º 27
0
		public ExpandBoxStyle(Node oParent)
		{			
			m_oParent = oParent;
		}
Ejemplo n.º 28
0
		public void Insert(int index, Node value) 
		{
			if (List.Contains(value))
				throw new Exception("Node is already in collection.");

			if (this.ParentNode != null)
			{
				// check if the node is not already in the set
				if (this.ParentNode.TreeView.NodePool.Contains(value) == true)
					throw new Exception("Node is already in collection.");

				value.TreeView = ParentNode.TreeView;
				value.SetParent(ParentNode);				
			}
			else
			{
				if (ParentTree != null)
				{
					// check if the node is not already in the set
					if (ParentTree.NodePool.Contains(value) == true)
						throw new Exception("Node is already in collection.");

					value.TreeView = ParentTree;					
				}
			}

			List.Insert(index, value);

			TreeView treeView = null;

			if (ParentTree != null)
				treeView = ParentTree;

			if (ParentNode != null && treeView == null)
				treeView = ParentNode.TreeView;
			
			if (treeView != null)
			{			
				treeView.NodePool.Add(value);

				foreach (Node oCollectionNode in this)
					oCollectionNode.m_nCollectionOrder = oCollectionNode.Index;

				treeView.Invalidate();

				treeView.InvokeNodeAdded(value);
			}
		}
Ejemplo n.º 29
0
		public void Remove(Node value) 
		{
			bool bIsSelected = false;

			TreeView treeView = null;

			if (ParentTree != null)
				treeView = ParentTree;

			if (ParentNode != null && treeView == null)
				treeView = ParentNode.TreeView;			

			if (treeView != null && treeView.SelectedNode == value)
				bIsSelected = true;

			List.Remove(value);

			if (treeView != null)
			{			
				treeView.InvokeNodeRemoved(value);
				treeView.NodePool.Remove(value);
				treeView.ClearNodeKey(value.Key);

				if (bIsSelected == true)
					treeView.SetSelectedNode(null);

				treeView.Invalidate();
			}
		}
Ejemplo n.º 30
0
		/// <summary>
		/// Checks if the oNode is not some child of the current node
		/// </summary>
		/// <param name="oNode">Node to check</param>
		/// <returns>Status of the operation</returns>
		internal bool IsSomeParent(Node oNode)
		{
			while (oNode.Parent != null)
			{
				if (oNode.Parent == this)
					return true;

				oNode = oNode.Parent;
			}

			return false;
		}