本文整理汇总了C#中Aga.Controls.Tree.TreeModelEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# TreeModelEventArgs类的具体用法?C# TreeModelEventArgs怎么用?C# TreeModelEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TreeModelEventArgs类属于Aga.Controls.Tree命名空间,在下文中一共展示了TreeModelEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StructureChanged_event_should_bubble_up
public void StructureChanged_event_should_bubble_up()
{
var flag = false;
decorator.StructureChanged += (s, e) => { flag = true; };
var eventArgs = new TreeModelEventArgs(new TreePath(), new object[0]);
treeModel.Raise(tm => tm.StructureChanged += null, null, eventArgs);
Assert.IsTrue(flag);
}
示例2: model_NodesInserted
void model_NodesInserted(object sender, TreeModelEventArgs e)
{
insert++;
}
示例3: OnNodeRemoved
internal void OnNodeRemoved(Node parent, int index, Node node)
{
if (NodesRemoved != null)
{
TreeModelEventArgs args = new TreeModelEventArgs(GetPath(parent), new int[] { index }, new object[] { node });
NodesRemoved(this, args);
}
}
示例4: OnNodesChanged
internal protected virtual void OnNodesChanged(Node parent, int index, Node node)
{
if (NodesChanged != null)
{
TreePath path = GetPath(parent);
if (path == null) return;
TreeModelEventArgs args = new TreeModelEventArgs(path, new int[] { index }, new object[] { node });
NodesChanged(this, args);
}
}
示例5: NotifyNodesChanged
private void NotifyNodesChanged()
{
if (!_notify)
return;
var model = FindModel();
if (model != null)
{
TreePath path = model.GetPath(this);
if (path != null)
{
var args = new TreeModelEventArgs(path, new object[] { this });
model.RaiseNodesChanged(args);
}
}
}
示例6: OnNodeRemoved
public void OnNodeRemoved(TreeModelEventArgs args)
{
if (NodesRemoved != null)
NodesRemoved(this, args);
}
示例7: ClearNodesSize
private void ClearNodesSize(TreeModelEventArgs e, TreeNodeAdv parent)
{
if (e.Indices != null)
{
foreach (int index in e.Indices)
{
if (index >= 0 && index < parent.Nodes.Count)
{
TreeNodeAdv node = parent.Nodes[index];
node.Height = node.RightBounds = null;
}
else
throw new ArgumentOutOfRangeException("Index out of range");
}
}
else
{
foreach (TreeNodeAdv node in parent.Nodes)
{
foreach (object obj in e.Children)
if (node.Tag == obj)
{
node.Height = node.RightBounds = null;
}
}
}
}
示例8: _model_NodesInserted
private void _model_NodesInserted(object sender, TreeModelEventArgs e)
{
if (e.Indices == null)
throw new ArgumentNullException("Indices");
TreeNodeAdv parent = FindNode(e.Path);
if (parent != null)
{
for (int i = 0; i < e.Children.Length; i++)
AddNewNode(parent, e.Children[i], e.Indices[i]);
}
SmartFullUpdate();
}
示例9: TreeNodesRemoved
private void TreeNodesRemoved(object sender, TreeModelEventArgs e)
{
OnNodesRemoved(e);
}
示例10: TreeNodesInserted
private void TreeNodesInserted(object sender, TreeModelEventArgs e)
{
OnNodesInserted(e);
}
示例11: mTreeModel_NodesRemoved
/// <summary>
/// Nodes have been removed. Remove the event handlers
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mTreeModel_NodesRemoved(object sender, TreeModelEventArgs e)
{
foreach (Node node in e.Children)
{
SetHandlers(node, false);
}
}
示例12: mTreeModel_NodesInserted
/// <summary>
/// Called when new nodes were inserted into the tree model.
/// We need to set the nodes' event handlers accordingly.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void mTreeModel_NodesInserted(object sender, TreeModelEventArgs e)
{
foreach (Node node in e.Children)
{
SetHandlers(node, true);
}
}
示例13: OnNodesRemoved
protected void OnNodesRemoved(TreeModelEventArgs args)
{
if (NodesRemoved != null)
NodesRemoved(this, args);
}
示例14: RaiseNodesChanged
internal void RaiseNodesChanged(TreeModelEventArgs args)
{
base.OnNodesChanged(args);
}
示例15: model_NodesRemoved
void model_NodesRemoved(object sender, TreeModelEventArgs e)
{
remove++;
}