Skip to content

Commit 5584a2a

Browse files
authored
Merge pull request #1 from DuraimuruganVedagiri/master
WPF-50907
2 parents e24b26d + 782b164 commit 5584a2a

File tree

15 files changed

+586
-0
lines changed

15 files changed

+586
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2035
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HierarchyNavigator", "HierarchyNavigator\HierarchyNavigator.csproj", "{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {4C652CA6-1760-40C1-9434-E5DDCD18BBFA}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5+
</startup>
6+
</configuration>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="HieNavi.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:HieNavi"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace HierarchyNavigator
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>HieNavi</RootNamespace>
10+
<AssemblyName>HieNavi</AssemblyName>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="Syncfusion.Licensing, Version=17.4460.0.55, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
38+
<HintPath>..\packages\Syncfusion.Licensing.17.4.0.55\lib\net46\Syncfusion.Licensing.dll</HintPath>
39+
</Reference>
40+
<Reference Include="Syncfusion.Shared.WPF, Version=17.4460.0.55, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
41+
<HintPath>..\packages\Syncfusion.Shared.WPF.17.4.0.55\lib\net46\Syncfusion.Shared.WPF.dll</HintPath>
42+
</Reference>
43+
<Reference Include="Syncfusion.Tools.WPF, Version=17.4460.0.55, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
44+
<HintPath>..\packages\Syncfusion.Tools.WPF.17.4.0.55\lib\net46\Syncfusion.Tools.WPF.dll</HintPath>
45+
</Reference>
46+
<Reference Include="System" />
47+
<Reference Include="System.Data" />
48+
<Reference Include="System.Drawing" />
49+
<Reference Include="System.Runtime.Serialization.Formatters.Soap" />
50+
<Reference Include="System.Windows.Forms" />
51+
<Reference Include="System.Xml" />
52+
<Reference Include="Microsoft.CSharp" />
53+
<Reference Include="System.Core" />
54+
<Reference Include="System.Xml.Linq" />
55+
<Reference Include="System.Data.DataSetExtensions" />
56+
<Reference Include="System.Net.Http" />
57+
<Reference Include="System.Xaml">
58+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
59+
</Reference>
60+
<Reference Include="UIAutomationProvider" />
61+
<Reference Include="UIAutomationTypes" />
62+
<Reference Include="WindowsBase" />
63+
<Reference Include="PresentationCore" />
64+
<Reference Include="PresentationFramework" />
65+
<Reference Include="WindowsFormsIntegration" />
66+
</ItemGroup>
67+
<ItemGroup>
68+
<ApplicationDefinition Include="App.xaml">
69+
<Generator>MSBuild:Compile</Generator>
70+
<SubType>Designer</SubType>
71+
</ApplicationDefinition>
72+
<Compile Include="Model\HierarchicalModel.cs" />
73+
<Compile Include="ViewModel\HierarchicalViewModel.cs" />
74+
<Page Include="MainWindow.xaml">
75+
<Generator>MSBuild:Compile</Generator>
76+
<SubType>Designer</SubType>
77+
</Page>
78+
<Compile Include="App.xaml.cs">
79+
<DependentUpon>App.xaml</DependentUpon>
80+
<SubType>Code</SubType>
81+
</Compile>
82+
<Compile Include="MainWindow.xaml.cs">
83+
<DependentUpon>MainWindow.xaml</DependentUpon>
84+
<SubType>Code</SubType>
85+
</Compile>
86+
</ItemGroup>
87+
<ItemGroup>
88+
<Compile Include="Properties\AssemblyInfo.cs">
89+
<SubType>Code</SubType>
90+
</Compile>
91+
<Compile Include="Properties\Resources.Designer.cs">
92+
<AutoGen>True</AutoGen>
93+
<DesignTime>True</DesignTime>
94+
<DependentUpon>Resources.resx</DependentUpon>
95+
</Compile>
96+
<Compile Include="Properties\Settings.Designer.cs">
97+
<AutoGen>True</AutoGen>
98+
<DependentUpon>Settings.settings</DependentUpon>
99+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
100+
</Compile>
101+
<EmbeddedResource Include="Properties\Resources.resx">
102+
<Generator>ResXFileCodeGenerator</Generator>
103+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
104+
</EmbeddedResource>
105+
<None Include="packages.config" />
106+
<None Include="Properties\Settings.settings">
107+
<Generator>SettingsSingleFileGenerator</Generator>
108+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
109+
</None>
110+
</ItemGroup>
111+
<ItemGroup>
112+
<None Include="App.config" />
113+
</ItemGroup>
114+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
115+
</Project>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2035
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HierarchyNavigator", "HierarchyNavigator.csproj", "{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{BDB7A091-232A-4B9C-967B-0D4D527BD9C1}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {5A2AEE98-E49F-48D8-9E64-EAAE6050A561}
24+
EndGlobalSection
25+
EndGlobal
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Window
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:local="clr-namespace:HierarchyNavigator"
7+
xmlns:syncfusion="http://schemas.syncfusion.com/wpf" x:Class="HierarchyNavigator.MainWindow"
8+
mc:Ignorable="d"
9+
Title="MainWindow" Height="450" Width="800">
10+
<Window.DataContext>
11+
<local:HierarchicalViewModel/>
12+
</Window.DataContext>
13+
<Grid>
14+
<syncfusion:HierarchyNavigator ItemsSource="{Binding HierarchyItems}" x:Name="hierarchy" Height="50" Width="500" HierarchyNavigatorSelectedItemChanged="Hierarchy_HierarchyNavigatorSelectedItemChanged">
15+
<syncfusion:HierarchyNavigator.ItemTemplate>
16+
<HierarchicalDataTemplate ItemsSource="{Binding FileItems}">
17+
<TextBlock Text="{Binding Content}"/>
18+
</HierarchicalDataTemplate>
19+
</syncfusion:HierarchyNavigator.ItemTemplate>
20+
</syncfusion:HierarchyNavigator>
21+
</Grid>
22+
</Window>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System.IO;
2+
using System.Windows;
3+
4+
namespace HierarchyNavigator
5+
{
6+
/// <summary>
7+
/// Interaction logic for MainWindow.xaml
8+
/// </summary>
9+
public partial class MainWindow : Window
10+
{
11+
public MainWindow()
12+
{
13+
InitializeComponent();
14+
}
15+
16+
private void Hierarchy_HierarchyNavigatorSelectedItemChanged(object sender, Syncfusion.Windows.Tools.Controls.HierarchyNavigatorSelectedItemChangedEventArgs e)
17+
{
18+
if (hierarchy.SelectedItem == null)
19+
return;
20+
HierarchicalModel selectedItem = hierarchy.SelectedItem as HierarchicalModel;
21+
string[] dirs = Directory.GetDirectories(selectedItem.Content, "*", SearchOption.TopDirectoryOnly);
22+
foreach (string dir in dirs)
23+
{
24+
selectedItem.FileItems.Add(new HierarchicalModel(dir));
25+
}
26+
}
27+
}
28+
}
29+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System.Collections.ObjectModel;
2+
3+
namespace HierarchyNavigator
4+
{
5+
public class HierarchicalModel
6+
{
7+
public HierarchicalModel(string content, params HierarchicalModel[] items)
8+
{
9+
Content = content;
10+
fileItems = new ObservableCollection<HierarchicalModel>();
11+
foreach (var item in items)
12+
{
13+
fileItems.Add(item);
14+
}
15+
}
16+
17+
private ObservableCollection<HierarchicalModel> fileItems;
18+
19+
public ObservableCollection<HierarchicalModel> FileItems
20+
{
21+
get { return fileItems; }
22+
set
23+
{
24+
if (fileItems != value)
25+
{
26+
fileItems = value;
27+
}
28+
}
29+
}
30+
31+
public string Content { get; set; }
32+
}
33+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System.Reflection;
2+
using System.Resources;
3+
using System.Runtime.CompilerServices;
4+
using System.Runtime.InteropServices;
5+
using System.Windows;
6+
7+
// General Information about an assembly is controlled through the following
8+
// set of attributes. Change these attribute values to modify the information
9+
// associated with an assembly.
10+
[assembly: AssemblyTitle("HieNavi")]
11+
[assembly: AssemblyDescription("")]
12+
[assembly: AssemblyConfiguration("")]
13+
[assembly: AssemblyCompany("")]
14+
[assembly: AssemblyProduct("HieNavi")]
15+
[assembly: AssemblyCopyright("Copyright © 2020")]
16+
[assembly: AssemblyTrademark("")]
17+
[assembly: AssemblyCulture("")]
18+
19+
// Setting ComVisible to false makes the types in this assembly not visible
20+
// to COM components. If you need to access a type in this assembly from
21+
// COM, set the ComVisible attribute to true on that type.
22+
[assembly: ComVisible(false)]
23+
24+
//In order to begin building localizable applications, set
25+
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
26+
//inside a <PropertyGroup>. For example, if you are using US english
27+
//in your source files, set the <UICulture> to en-US. Then uncomment
28+
//the NeutralResourceLanguage attribute below. Update the "en-US" in
29+
//the line below to match the UICulture setting in the project file.
30+
31+
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32+
33+
34+
[assembly: ThemeInfo(
35+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
36+
//(used if a resource is not found in the page,
37+
// or application resource dictionaries)
38+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
39+
//(used if a resource is not found in the page,
40+
// app, or any theme specific resource dictionaries)
41+
)]
42+
43+
44+
// Version information for an assembly consists of the following four values:
45+
//
46+
// Major Version
47+
// Minor Version
48+
// Build Number
49+
// Revision
50+
//
51+
// You can specify all the values or you can default the Build and Revision Numbers
52+
// by using the '*' as shown below:
53+
// [assembly: AssemblyVersion("1.0.*")]
54+
[assembly: AssemblyVersion("1.0.0.0")]
55+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)