本文整理汇总了C#中System.Windows.Forms.TreeView.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# TreeView.GetHashCode方法的具体用法?C# TreeView.GetHashCode怎么用?C# TreeView.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TreeView
的用法示例。
在下文中一共展示了TreeView.GetHashCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PopulateRecordBar
public override void PopulateRecordBar(RecordList list)
{
CheckDisposed();
if (this.IsShowing)
{
m_fOutOfDate = false;
}
else
{
m_fOutOfDate = true;
return;
}
m_list = list;
XWindow window = (XWindow)m_mediator.PropertyTable.GetValue("window");
window.Cursor = Cursors.WaitCursor;
window.TreeBarControl.IsFlatList = false;
TreeView tree = (TreeView)window.TreeStyleRecordList;
Set<int> expandedItems = new Set<int>();
if (m_tree != null && !m_expand)
GetExpandedItems(m_tree.Nodes, expandedItems);
m_tree = tree;
id = nextID++;
treeHash = m_tree.GetHashCode();
// Removing the handlers first seems to be necessary because multiple tree handlers are
// working with one treeview. Only this active one should have handlers connected.
// If we fail to do this, switching to a different list causes drag and drop to stop working.
ReleaseRecordBar();
tree.NodeMouseClick += new TreeNodeMouseClickEventHandler(tree_NodeMouseClick);
tree.MouseDown += new MouseEventHandler(tree_MouseDown);
tree.MouseMove += new MouseEventHandler(tree_MouseMove);
tree.DragDrop += new DragEventHandler(tree_DragDrop);
tree.DragOver += new DragEventHandler(tree_DragOver);
tree.GiveFeedback += new GiveFeedbackEventHandler(tree_GiveFeedback);
tree.ContextMenuStrip = CreateTreebarContextMenuStrip();
tree.ContextMenuStrip.MouseClick += new MouseEventHandler(tree_MouseClicked);
tree.AllowDrop = true;
tree.BeginUpdate();
window.ClearRecordBarList(); //don't want to directly clear the nodes, because that causes an event to be fired as every single note is removed!
m_hvoToTreeNodeTable.Clear();
// type size must be set before AddTreeNodes is called
m_typeSize = list.TypeSize;
AddTreeNodes(list.SortedObjects, tree);
tree.Font = new System.Drawing.Font(list.FontName, m_typeSize);
tree.ShowRootLines = m_hierarchical;
if (m_expand)
tree.ExpandAll();
else
{
tree.CollapseAll();
ExpandItems(tree.Nodes, expandedItems);
}
// Set the selection after expanding/collapsing the tree. This allows the true
// selection to be visible even when the tree is collapsed but the selection is
// an internal node. (See LT-4508.)
UpdateSelection(list.CurrentObject);
tree.EndUpdate();
EnsureSelectedNodeVisible(tree);
window.Cursor = Cursors.Default;
}