diff --git a/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml b/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml
index 5f81cb44f8..f99d2cba5b 100644
--- a/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml
+++ b/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml
@@ -361,6 +361,7 @@
Height="15" />
+
+
+
+
+
+
+
+
+
diff --git a/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml.cs b/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml.cs
index 90812944a3..b3817cc24f 100644
--- a/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml.cs
+++ b/src/AddIns/Analysis/CodeQuality/Src/MainWindow.xaml.cs
@@ -84,7 +84,7 @@ namespace ICSharpCode.CodeQualityAnalysis
}
Helper.FillTree(definitionTree, metricsReader.MainModule);
- dataContext.MainModule = metricsReader.MainModule;
+ dataContext.MainModule = metricsReader.MainModule;
FillMatrix();
};
@@ -141,8 +141,6 @@ namespace ICSharpCode.CodeQualityAnalysis
var viewModel = this.DataContext as MainWindowViewModel;
//testhalber
viewModel.SelectedNode = item.INode;
-
-// viewModel.MetrixTabEnable = true;
}
}
diff --git a/src/AddIns/Analysis/CodeQuality/Src/MainWindowModel.cs b/src/AddIns/Analysis/CodeQuality/Src/MainWindowModel.cs
index 2bb8b12462..1a05515985 100644
--- a/src/AddIns/Analysis/CodeQuality/Src/MainWindowModel.cs
+++ b/src/AddIns/Analysis/CodeQuality/Src/MainWindowModel.cs
@@ -58,8 +58,6 @@ namespace ICSharpCode.CodeQualityAnalysis
this.TabMetrics = "Metrics";
#endregion
-// MetrixTabEnable = false;
-
ActivateMetrics = new RelayCommand(ActivateMetricsExecute);
ShowTreeMap = new RelayCommand(ShowTreemapExecute,CanActivateTreemap);
}
@@ -77,7 +75,6 @@ namespace ICSharpCode.CodeQualityAnalysis
#endregion
-
private string fileName;
public string FileName {
@@ -135,6 +132,12 @@ namespace ICSharpCode.CodeQualityAnalysis
get { return mainModule; }
set { mainModule = value;
base.RaisePropertyChanged(() =>this.MainModule);
+ Summary = String.Format("Module Name: {0} Namespaces: {1} Types {2} Methods: {3} Fields: {4}",
+ mainModule.Name,
+ mainModule.Namespaces.Count,
+ mainModule.TypesCount,
+ mainModule.MethodsCount,
+ mainModule.FieldsCount);
}
}
@@ -145,9 +148,34 @@ namespace ICSharpCode.CodeQualityAnalysis
get { return selectedNode; }
set { selectedNode = value;
base.RaisePropertyChanged(() =>this.SelectedNode);
- base.RaisePropertyChanged(() =>this.MetrixTabEnable);}
+ base.RaisePropertyChanged(() =>this.MetrixTabEnable);
+ Summary = UpdateToolStrip();
+ }
+ }
+
+
+ string UpdateToolStrip()
+ {
+ var t = SelectedNode as Type;
+ if (t != null)
+ {
+ return string.Format("Type Namer {0} Methods {1} Fields {2}",
+ t.Name,
+ t.GetAllMethods().Count(),
+ t.GetAllFields().Count());
+ }
+ var ns = SelectedNode as Namespace;
+ if ( ns != null) {
+ return string.Format("Namespace Name {0} Types : {1} Methods: {2} Fields : {3}",
+ ns.Name,
+ ns.Types.Count,
+ ns.GetAllMethods().Count(),
+ ns.GetAllFields().Count());
+ }
+ return String.Empty;
}
+
private ObservableCollection nodes;
public ObservableCollection Nodes {
@@ -231,7 +259,6 @@ namespace ICSharpCode.CodeQualityAnalysis
}
}
-
#endregion
#region ShowTreeMap Treemap
@@ -306,5 +333,18 @@ namespace ICSharpCode.CodeQualityAnalysis
}
#endregion
+
+ #region ToolStrip and ToolTip
+
+ string summary;
+
+ public string Summary {
+ get { return summary; }
+ set { summary = value;
+ base.RaisePropertyChanged(() => Summary);
+ }
+ }
+
+ #endregion
}
}