Browse Source

fix typo

pull/19/head
PeterForstmeier 14 years ago
parent
commit
25caa3f924
  1. 27
      src/AddIns/Analysis/CodeQuality/Src/Controls/TreeMatrixControl.xaml.cs
  2. 3
      src/AddIns/Analysis/CodeQuality/Src/MainWindowTranslationModel.cs

27
src/AddIns/Analysis/CodeQuality/Src/Controls/TreeMatrixControl.xaml.cs

@ -53,12 +53,12 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
public void DrawTree(Module module) public void DrawTree(Module module)
{ {
Helper.FillTree(leftTree,module); Helper.FillTree(leftTree,module);
Helper.FillTree(topTree,module);
var leftCol = leftTree.Items.SourceCollection as INotifyCollectionChanged; var leftCol = leftTree.Items.SourceCollection as INotifyCollectionChanged;
leftCol.CollectionChanged += BuildLeftINodeList; leftCol.CollectionChanged += BuildLeftINodeList;
var rCol = leftTree.Items.SourceCollection as INotifyCollectionChanged; Helper.FillTree(topTree,module);
rCol.CollectionChanged += BuildRightINodeList; var topCol = topTree.Items.SourceCollection as INotifyCollectionChanged;
topCol.CollectionChanged += BuildTopINodeList;
} }
@ -71,6 +71,7 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
topScrollViewer = Helper.FindVisualChild<ScrollViewer>(topTree); topScrollViewer = Helper.FindVisualChild<ScrollViewer>(topTree);
} }
bool rebuildLeftNodeListRequested; bool rebuildLeftNodeListRequested;
void BuildLeftINodeList (object sender,NotifyCollectionChangedEventArgs e) void BuildLeftINodeList (object sender,NotifyCollectionChangedEventArgs e)
@ -87,35 +88,31 @@ namespace ICSharpCode.CodeQualityAnalysis.Controls
var n = element.INode; var n = element.INode;
leftNodes.Add(n); leftNodes.Add(n);
} }
rebuildLeftNodeListRequested = false; rebuildLeftNodeListRequested = false;
Console.WriteLine("List {0}",leftNodes.Count);
matrixControl.SetVisibleItems(HeaderType.Rows,leftNodes); matrixControl.SetVisibleItems(HeaderType.Rows,leftNodes);
} }
)); ));
} }
bool rebuildRightNodeListRequested; bool rebuildTopNodeListRequested;
void BuildRightINodeList (object sender,NotifyCollectionChangedEventArgs e) void BuildTopINodeList (object sender,NotifyCollectionChangedEventArgs e)
{ {
if (rebuildRightNodeListRequested) if (rebuildTopNodeListRequested)
return; return;
rebuildRightNodeListRequested = true; rebuildTopNodeListRequested = true;
Dispatcher.BeginInvoke( Dispatcher.BeginInvoke(
DispatcherPriority.DataBind, DispatcherPriority.DataBind,
new Action( new Action(
delegate { delegate {
List <INode> rNodes = new List<INode>(); List <INode> topNodes = new List<INode>();
foreach (DependecyTreeNode element in topTree.Items) { foreach (DependecyTreeNode element in topTree.Items) {
var n = element.INode; var n = element.INode;
rNodes.Add(n); topNodes.Add(n);
} }
rebuildTopNodeListRequested = false;
rebuildRightNodeListRequested = false; matrixControl.SetVisibleItems(HeaderType.Columns,topNodes);
matrixControl.SetVisibleItems(HeaderType.Columns,rNodes);
} }
)); ));
} }

3
src/AddIns/Analysis/CodeQuality/Src/MainWindowTranslationModel.cs

@ -30,12 +30,15 @@ namespace ICSharpCode.CodeQualityAnalysis
this.DependencyGraph = "Dependency Graph"; this.DependencyGraph = "Dependency Graph";
} }
public string Title {get;private set;} public string Title {get;private set;}
public string OpenAssembly {get; private set;} public string OpenAssembly {get; private set;}
public string DependencyGraph {get; private set;} public string DependencyGraph {get; private set;}
#region OpenAssembly #region OpenAssembly
/* /*
public ICommand OpenAssemblyCommand public ICommand OpenAssemblyCommand

Loading…
Cancel
Save