protected override void OnAfterSelect(TreeViewEventArgs e)
        {
            base.OnAfterSelect(e);

            // Check that at least one event listener is registered
            // before continuing.
            if (ProjectSelected != null)
            {
                // To determine if it's a project node,
                // you can examine the node's parent or (in this case)
                // just check the level.
                if (e.Node.Level == 1)
                {
                    Project project = ((ProjectTreeNode)e.Node).Project;
                    ProjectSelectedEventArgs arg = new ProjectSelectedEventArgs(project);
                    ProjectSelected(this, arg);
                }
            }
        }
Ejemplo n.º 2
0
			protected override void OnAfterSelect(TreeViewEventArgs e)
			{
				base.OnAfterSelect(e);

				// Check that at least one event listener is registered
				// before continuing.
				if (ProjectSelected != null)
				{
					// To determine if it's a project node,
					// you can examine the node's parent or (in this case)
					// just check the level.
					if (e.Node.Level == 1)
					{
						Project project = ((ProjectTreeNode)e.Node).Project;
						ProjectSelectedEventArgs arg = new ProjectSelectedEventArgs(project);
						ProjectSelected(this, arg);
					}
				}
			}