private ISelectorControl ( System.Guid id ) : void | ||
id | System.Guid | |
return | void |
void ISelectorControl.SelectNodeByGuid(Guid id)
{
var node = GetNodeControls().FirstOrDefault(q => q.ViewModelNode.Proxy.Id == id);
if (node != null)
{
RecheckIncorrectVisibility();
if (node.IsCollapsed)
{
node.IsCollapsed = false;
var listToLoop = new List<NodeControl> {node};
var needRecheck = true;
while (needRecheck)
{
needRecheck = false;
var list = new List<NodeControl>();
foreach (NodeControl nodeControl in listToLoop)
{
foreach (NodeControl parent in nodeControl.ParentNodes)
{
if (parent.IsCollapsed)
{
parent.IsCollapsed = false;
list.Add(parent);
needRecheck = true;
}
}
}
listToLoop = list.ToList();
}
}
RecheckIncorrectVisibility();
ReScanForCollapseStates();
Selector.AddNode(node);
CentraliseNode(node);
}
else
{
if (App.UserStyle == UserStyle.Reader && AllowAutoRealign)
{
//Force UI thread to realign
Deployment.Current.Dispatcher.BeginInvoke(() => AutoRealign());
}
}
}
SuperGraphControl::ISelectorControl ( ) : void |