Skip to content

Commit e9538bf

Browse files
Merge pull request #1 from PiruthivirajM/master
Sample modified
2 parents 433aa59 + 8c34d87 commit e9538bf

14 files changed

+698
-793
lines changed

App.xaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<Application
2-
x:Class="DataBinding.App"
3-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
StartupUri="MainWindow.xaml">
6-
</Application>
1+
<Application
2+
x:Class="DataBinding.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
StartupUri="MainWindow.xaml">
6+
</Application>

App.xaml.cs

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
using System.IO;
2-
using System.Reflection;
3-
using System.Text;
4-
using System.Windows;
5-
6-
namespace DataBinding
7-
{
8-
/// <summary>
9-
/// Interaction logic for App.xaml
10-
/// </summary>
11-
public partial class App : Application
12-
{
13-
public App()
14-
{
15-
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(FindLicenseKey());
16-
}
17-
18-
/// <summary>
19-
/// Helper method to find a syncfusion license key from the Common folder
20-
/// </summary>
21-
/// <returns></returns>
22-
public static string FindLicenseKey()
23-
{
24-
int levelsToCheck = 12;
25-
string filePath = @"Common\SyncfusionLicense.txt";
26-
27-
string rootPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase.Replace(@"file:///", ""));
28-
29-
for (int n = 0; n < levelsToCheck; n++)
30-
{
31-
string fileDataPath = System.IO.Path.Combine(rootPath, filePath);
32-
if (System.IO.File.Exists(fileDataPath))
33-
return File.ReadAllText(fileDataPath, Encoding.UTF8);
34-
DirectoryInfo rootDirectory = Directory.GetParent(rootPath);
35-
if (rootDirectory == null)
36-
break;
37-
rootPath = rootDirectory.FullName;
38-
39-
}
40-
return string.Empty;
41-
}
42-
}
43-
}
1+
using System.IO;
2+
using System.Reflection;
3+
using System.Text;
4+
using System.Windows;
5+
6+
namespace DataBinding
7+
{
8+
/// <summary>
9+
/// Interaction logic for App.xaml
10+
/// </summary>
11+
public partial class App : Application
12+
{
13+
public App()
14+
{
15+
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(FindLicenseKey());
16+
}
17+
18+
/// <summary>
19+
/// Helper method to find a syncfusion license key from the Common folder
20+
/// </summary>
21+
/// <returns></returns>
22+
public static string FindLicenseKey()
23+
{
24+
int levelsToCheck = 12;
25+
string filePath = @"Common\SyncfusionLicense.txt";
26+
27+
string rootPath = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().CodeBase.Replace(@"file:///", ""));
28+
29+
for (int n = 0; n < levelsToCheck; n++)
30+
{
31+
string fileDataPath = System.IO.Path.Combine(rootPath, filePath);
32+
if (System.IO.File.Exists(fileDataPath))
33+
return File.ReadAllText(fileDataPath, Encoding.UTF8);
34+
DirectoryInfo rootDirectory = Directory.GetParent(rootPath);
35+
if (rootDirectory == null)
36+
break;
37+
rootPath = rootDirectory.FullName;
38+
39+
}
40+
return string.Empty;
41+
}
42+
}
43+
}

DataBinding_2010.csproj

Lines changed: 139 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,140 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" 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>{20D883D2-4420-4477-B706-ABCAF9AA6BCB}</ProjectGuid>
8-
<OutputType>WinExe</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>DataBinding</RootNamespace>
11-
<AssemblyName>DataBindingDemo</AssemblyName>
12-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15-
<WarningLevel>4</WarningLevel>
16-
<TargetFrameworkProfile />
17-
</PropertyGroup>
18-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19-
<PlatformTarget>AnyCPU</PlatformTarget>
20-
<DebugSymbols>true</DebugSymbols>
21-
<DebugType>full</DebugType>
22-
<Optimize>false</Optimize>
23-
<OutputPath>bin\Debug\</OutputPath>
24-
<DefineConstants>DEBUG;TRACE</DefineConstants>
25-
<ErrorReport>prompt</ErrorReport>
26-
<WarningLevel>4</WarningLevel>
27-
</PropertyGroup>
28-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29-
<PlatformTarget>AnyCPU</PlatformTarget>
30-
<DebugType>pdbonly</DebugType>
31-
<Optimize>true</Optimize>
32-
<OutputPath>bin\Release\</OutputPath>
33-
<DefineConstants>TRACE</DefineConstants>
34-
<ErrorReport>prompt</ErrorReport>
35-
<WarningLevel>4</WarningLevel>
36-
</PropertyGroup>
37-
<PropertyGroup>
38-
<StartupObject>DataBinding.App</StartupObject>
39-
</PropertyGroup>
40-
<ItemGroup>
41-
<Reference Include="Syncfusion.Licensing" />
42-
<Reference Include="Syncfusion.SfInput.WPF"/>
43-
<Reference Include="Syncfusion.SfShared.WPF"/>
44-
<Reference Include="Syncfusion.Shared.WPF" />
45-
<Reference Include="Syncfusion.SfScheduler.WPF" />
46-
<Reference Include="Syncfusion.SfSkinManager.WPF" />
47-
<Reference Include="Syncfusion.Themes.MaterialLight.WPF">
48-
<private>True</private>
49-
</Reference>
50-
<Reference Include="System" />
51-
<Reference Include="System.Data" />
52-
<Reference Include="System.Xml" />
53-
<Reference Include="Microsoft.CSharp" />
54-
<Reference Include="System.Core" />
55-
<Reference Include="System.Xml.Linq" />
56-
<Reference Include="System.Data.DataSetExtensions" />
57-
<Reference Include="System.Xaml">
58-
<RequiredTargetFramework>4.0</RequiredTargetFramework>
59-
</Reference>
60-
<Reference Include="WindowsBase" />
61-
<Reference Include="PresentationCore" />
62-
<Reference Include="PresentationFramework" />
63-
</ItemGroup>
64-
<ItemGroup>
65-
<ApplicationDefinition Include="App.xaml">
66-
<Generator>MSBuild:Compile</Generator>
67-
<SubType>Designer</SubType>
68-
</ApplicationDefinition>
69-
<Compile Include="Model\Meeting.cs" />
70-
<Compile Include="ViewModel\ScheduleViewModel.cs" />
71-
<Page Include="MainWindow.xaml">
72-
<Generator>MSBuild:Compile</Generator>
73-
<SubType>Designer</SubType>
74-
</Page>
75-
<Compile Include="App.xaml.cs">
76-
<DependentUpon>App.xaml</DependentUpon>
77-
<SubType>Code</SubType>
78-
</Compile>
79-
<Compile Include="MainWindow.xaml.cs">
80-
<DependentUpon>MainWindow.xaml</DependentUpon>
81-
<SubType>Code</SubType>
82-
</Compile>
83-
</ItemGroup>
84-
<ItemGroup>
85-
<Compile Include="Properties\AssemblyInfo.cs">
86-
<SubType>Code</SubType>
87-
</Compile>
88-
<Compile Include="Properties\Resources.Designer.cs">
89-
<AutoGen>True</AutoGen>
90-
<DesignTime>True</DesignTime>
91-
<DependentUpon>Resources.resx</DependentUpon>
92-
</Compile>
93-
<Compile Include="Properties\Settings.Designer.cs">
94-
<AutoGen>True</AutoGen>
95-
<DependentUpon>Settings.settings</DependentUpon>
96-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
97-
</Compile>
98-
<EmbeddedResource Include="Properties\Resources.resx">
99-
<Generator>ResXFileCodeGenerator</Generator>
100-
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
101-
</EmbeddedResource>
102-
<None Include="Properties\Settings.settings">
103-
<Generator>SettingsSingleFileGenerator</Generator>
104-
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
105-
</None>
106-
<AppDesigner Include="Properties\" />
107-
</ItemGroup>
108-
<ItemGroup>
109-
<Resource Include="App.ico" />
110-
</ItemGroup>
111-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
112-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
113-
Other similar extension points exist, see Microsoft.Common.targets.
114-
<Target Name="BeforeBuild">
115-
</Target>
116-
<Target Name="AfterBuild">
117-
</Target>
118-
-->
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" 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>{20D883D2-4420-4477-B706-ABCAF9AA6BCB}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>DataBinding</RootNamespace>
11+
<AssemblyName>DataBindingDemo</AssemblyName>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15+
<WarningLevel>4</WarningLevel>
16+
<TargetFrameworkProfile />
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
19+
<PlatformTarget>AnyCPU</PlatformTarget>
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<PlatformTarget>AnyCPU</PlatformTarget>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
</PropertyGroup>
37+
<PropertyGroup>
38+
<StartupObject>DataBinding.App</StartupObject>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Include="Syncfusion.Licensing, Version=18.2400.0.44, Culture=neutral, PublicKeyToken=632609b4d040f6b4, processorArchitecture=MSIL">
42+
<HintPath>packages\Syncfusion.Licensing.18.2.0.44\lib\net40\Syncfusion.Licensing.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="Syncfusion.SfInput.WPF, Version=18.2400.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
46+
<HintPath>packages\Syncfusion.SfInput.WPF.18.2.0.44\lib\net40\Syncfusion.SfInput.WPF.dll</HintPath>
47+
<Private>True</Private>
48+
</Reference>
49+
<Reference Include="Syncfusion.SfScheduler.WPF, Version=18.2400.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
50+
<HintPath>packages\Syncfusion.SfScheduler.WPF.18.2.0.44\lib\net40\Syncfusion.SfScheduler.WPF.dll</HintPath>
51+
<Private>True</Private>
52+
</Reference>
53+
<Reference Include="Syncfusion.SfShared.WPF, Version=18.2400.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
54+
<HintPath>packages\Syncfusion.SfShared.WPF.18.2.0.44\lib\net40\Syncfusion.SfShared.WPF.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="Syncfusion.SfSkinManager.WPF, Version=18.2400.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
58+
<HintPath>packages\Syncfusion.SfSkinManager.WPF.18.2.0.44\lib\net40\Syncfusion.SfSkinManager.WPF.dll</HintPath>
59+
<Private>True</Private>
60+
</Reference>
61+
<Reference Include="Syncfusion.Shared.WPF, Version=18.2400.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
62+
<HintPath>packages\Syncfusion.Shared.WPF.18.2.0.44\lib\net40\Syncfusion.Shared.WPF.dll</HintPath>
63+
<Private>True</Private>
64+
</Reference>
65+
<Reference Include="Syncfusion.Themes.MaterialLight.WPF, Version=18.2400.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
66+
<HintPath>packages\Syncfusion.Themes.MaterialLight.WPF.18.2.0.44\lib\net40\Syncfusion.Themes.MaterialLight.WPF.dll</HintPath>
67+
<Private>True</Private>
68+
</Reference>
69+
<Reference Include="System" />
70+
<Reference Include="System.Data" />
71+
<Reference Include="System.Xml" />
72+
<Reference Include="Microsoft.CSharp" />
73+
<Reference Include="System.Core" />
74+
<Reference Include="System.Xml.Linq" />
75+
<Reference Include="System.Data.DataSetExtensions" />
76+
<Reference Include="System.Xaml">
77+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
78+
</Reference>
79+
<Reference Include="WindowsBase" />
80+
<Reference Include="PresentationCore" />
81+
<Reference Include="PresentationFramework" />
82+
</ItemGroup>
83+
<ItemGroup>
84+
<ApplicationDefinition Include="App.xaml">
85+
<Generator>MSBuild:Compile</Generator>
86+
<SubType>Designer</SubType>
87+
</ApplicationDefinition>
88+
<Compile Include="Model\Meeting.cs" />
89+
<Compile Include="ViewModel\ScheduleViewModel.cs" />
90+
<Page Include="MainWindow.xaml">
91+
<Generator>MSBuild:Compile</Generator>
92+
<SubType>Designer</SubType>
93+
</Page>
94+
<Compile Include="App.xaml.cs">
95+
<DependentUpon>App.xaml</DependentUpon>
96+
<SubType>Code</SubType>
97+
</Compile>
98+
<Compile Include="MainWindow.xaml.cs">
99+
<DependentUpon>MainWindow.xaml</DependentUpon>
100+
<SubType>Code</SubType>
101+
</Compile>
102+
</ItemGroup>
103+
<ItemGroup>
104+
<Compile Include="Properties\AssemblyInfo.cs">
105+
<SubType>Code</SubType>
106+
</Compile>
107+
<Compile Include="Properties\Resources.Designer.cs">
108+
<AutoGen>True</AutoGen>
109+
<DesignTime>True</DesignTime>
110+
<DependentUpon>Resources.resx</DependentUpon>
111+
</Compile>
112+
<Compile Include="Properties\Settings.Designer.cs">
113+
<AutoGen>True</AutoGen>
114+
<DependentUpon>Settings.settings</DependentUpon>
115+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
116+
</Compile>
117+
<EmbeddedResource Include="Properties\Resources.resx">
118+
<Generator>ResXFileCodeGenerator</Generator>
119+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
120+
<SubType>Designer</SubType>
121+
</EmbeddedResource>
122+
<None Include="packages.config" />
123+
<None Include="Properties\Settings.settings">
124+
<Generator>SettingsSingleFileGenerator</Generator>
125+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
126+
</None>
127+
<AppDesigner Include="Properties\" />
128+
</ItemGroup>
129+
<ItemGroup>
130+
<Resource Include="App.ico" />
131+
</ItemGroup>
132+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
133+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
134+
Other similar extension points exist, see Microsoft.Common.targets.
135+
<Target Name="BeforeBuild">
136+
</Target>
137+
<Target Name="AfterBuild">
138+
</Target>
139+
-->
119140
</Project>

0 commit comments

Comments
 (0)