6 changed files with 136 additions and 4 deletions
@ -0,0 +1,29 @@ |
|||||||
|
<UserControl x:Class="ICSharpCode.CodeQuality.Gui.NodeDescription" |
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
||||||
|
<Border BorderBrush="Black" CornerRadius="8" BorderThickness="3" > |
||||||
|
<Grid> |
||||||
|
<Grid Margin="5"> |
||||||
|
<Grid.ColumnDefinitions> |
||||||
|
<ColumnDefinition></ColumnDefinition> |
||||||
|
<ColumnDefinition></ColumnDefinition> |
||||||
|
</Grid.ColumnDefinitions> |
||||||
|
<Grid.RowDefinitions> |
||||||
|
<RowDefinition></RowDefinition> |
||||||
|
<RowDefinition></RowDefinition> |
||||||
|
<RowDefinition></RowDefinition> |
||||||
|
<RowDefinition></RowDefinition> |
||||||
|
</Grid.RowDefinitions> |
||||||
|
<TextBlock Text="Class" ></TextBlock> |
||||||
|
<TextBlock Text="Children" Grid.Row="1"></TextBlock> |
||||||
|
<TextBlock Text="Uses" Grid.Row="2"></TextBlock> |
||||||
|
<TextBlock Text="Usedby" Grid.Row="3"></TextBlock> |
||||||
|
|
||||||
|
<TextBlock Text="{Binding Node.Name}" Grid.Column="1"></TextBlock> |
||||||
|
<TextBlock Text="{Binding Node.Children.Count}" Grid.Column="1" Grid.Row="1" ></TextBlock> |
||||||
|
<TextBlock Text="{Binding Uses}" Grid.Column="1" Grid.Row="2"></TextBlock> |
||||||
|
<TextBlock Text="{Binding UsedBy}" Grid.Column="1" Grid.Row="3"></TextBlock> |
||||||
|
</Grid> |
||||||
|
</Grid> |
||||||
|
</Border> |
||||||
|
</UserControl> |
@ -0,0 +1,31 @@ |
|||||||
|
/* |
||||||
|
* Created by SharpDevelop. |
||||||
|
* User: Peter Forstmeier |
||||||
|
* Date: 26.01.2012 |
||||||
|
* Time: 20:20 |
||||||
|
* |
||||||
|
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||||
|
*/ |
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Text; |
||||||
|
using System.Windows; |
||||||
|
using System.Windows.Controls; |
||||||
|
using System.Windows.Data; |
||||||
|
using System.Windows.Documents; |
||||||
|
using System.Windows.Input; |
||||||
|
using System.Windows.Media; |
||||||
|
|
||||||
|
namespace ICSharpCode.CodeQuality.Gui |
||||||
|
{ |
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ClassDescription.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class NodeDescription : UserControl |
||||||
|
{ |
||||||
|
public NodeDescription() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,43 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.Collections.Specialized; |
||||||
|
using System.Linq; |
||||||
|
using System.Text; |
||||||
|
using System.Windows; |
||||||
|
using System.Windows.Controls; |
||||||
|
using System.Windows.Controls.Primitives; |
||||||
|
using System.Windows.Data; |
||||||
|
using System.Windows.Documents; |
||||||
|
using System.Windows.Input; |
||||||
|
using System.Windows.Media; |
||||||
|
using System.Windows.Shapes; |
||||||
|
using System.Windows.Threading; |
||||||
|
|
||||||
|
using ICSharpCode.CodeQuality; |
||||||
|
using ICSharpCode.CodeQuality.Engine.Dom; |
||||||
|
using ICSharpCode.SharpDevelop; |
||||||
|
using ICSharpCode.SharpDevelop.Widgets; |
||||||
|
using ICSharpCode.TreeView; |
||||||
|
|
||||||
|
namespace ICSharpCode.CodeQuality.Gui |
||||||
|
{ |
||||||
|
public class NodeDescriptionViewModel:ViewModelBase |
||||||
|
{ |
||||||
|
|
||||||
|
INode node; |
||||||
|
|
||||||
|
public INode Node { |
||||||
|
get { return node; } |
||||||
|
set { node = value; |
||||||
|
base.RaisePropertyChanged(()=>Node);} |
||||||
|
} |
||||||
|
|
||||||
|
public int Uses {get {return Node.Uses.Count();}} |
||||||
|
|
||||||
|
public int UsesBy {get {return Node.UsedBy.Count();}} |
||||||
|
|
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue