style<Dashboard>: code style - nest class when it's only used by outer class

This commit is contained in:
leo 2020-12-21 16:04:44 +08:00
parent 4ee9234289
commit 8a4dee918d
2 changed files with 26 additions and 26 deletions

View file

@ -302,7 +302,7 @@
</TreeView.ItemContainerStyle> </TreeView.ItemContainerStyle>
<TreeView.Resources> <TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type local:RemoteNode}" ItemsSource="{Binding Children}"> <HierarchicalDataTemplate DataType="{x:Type local:Dashboard+RemoteNode}" ItemsSource="{Binding Children}">
<Grid Height="24"> <Grid Height="24">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="16"/> <ColumnDefinition Width="16"/>
@ -314,7 +314,7 @@
</Grid> </Grid>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
<HierarchicalDataTemplate DataType="{x:Type local:BranchNode}" ItemsSource="{Binding Children}"> <HierarchicalDataTemplate DataType="{x:Type local:Dashboard+BranchNode}" ItemsSource="{Binding Children}">
<Grid Height="24"> <Grid Height="24">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="16"/> <ColumnDefinition Width="16"/>

View file

@ -13,6 +13,15 @@ using System.Windows.Threading;
namespace SourceGit.UI { namespace SourceGit.UI {
/// <summary>
/// Dashboard for opened repository.
/// </summary>
public partial class Dashboard : UserControl {
private Git.Repository repo = null;
private List<BranchNode> cachedLocalBranches = new List<BranchNode>();
private List<RemoteNode> cachedRemotes = new List<RemoteNode>();
private string abortCommand = null;
/// <summary> /// <summary>
/// Branch node in tree. /// Branch node in tree.
/// </summary> /// </summary>
@ -37,15 +46,6 @@ namespace SourceGit.UI {
public List<BranchNode> Children { get; set; } public List<BranchNode> Children { get; set; }
} }
/// <summary>
/// Dashboard for opened repository.
/// </summary>
public partial class Dashboard : UserControl {
private Git.Repository repo = null;
private List<BranchNode> cachedLocalBranches = new List<BranchNode>();
private List<RemoteNode> cachedRemotes = new List<RemoteNode>();
private string abortCommand = null;
/// <summary> /// <summary>
/// Expand/Collapsed tags /// Expand/Collapsed tags
/// </summary> /// </summary>