Update examples
|
@ -126,6 +126,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MyViewModel.cs" />
|
||||
<Compile Include="ParentExportInfo.cs" />
|
||||
<Compile Include="Player.cs" />
|
||||
<Compile Include="Position.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
|
@ -150,6 +151,7 @@
|
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="Properties\" />
|
||||
<None Include="Readme.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
|
|
@ -18,14 +18,34 @@ namespace ExportHierarchy
|
|||
public class HierarchicalExportGridView : RadGridView
|
||||
{
|
||||
private int subItemsCount = 0;
|
||||
private Dictionary<int, IList> subItemsDictionary = new Dictionary<int, IList>();
|
||||
private List<ParentExportInfo> parentItemsDictionary = new List<ParentExportInfo>();
|
||||
private int headerRowCount;
|
||||
|
||||
public HierarchicalExportGridView()
|
||||
{
|
||||
this.ElementExportingToDocument += HierarchicalExportGridView_ElementExportingToDocument;
|
||||
this.ElementExportedToDocument += HierarchicalExportGridView_ElementExportedToDocument;
|
||||
}
|
||||
|
||||
private void HierarchicalExportGridView_ElementExportingToDocument(object sender, GridViewElementExportingToDocumentEventArgs e)
|
||||
{
|
||||
if (e.Element == ExportElement.HeaderRow)
|
||||
{
|
||||
(e.VisualParameters as GridViewDocumentVisualExportParameters).Style = new CellSelectionStyle()
|
||||
{
|
||||
IsBold = true,
|
||||
Fill = new PatternFill(PatternType.Solid, Color.FromArgb(255, 232, 232, 232), Colors.Transparent),
|
||||
};
|
||||
}
|
||||
else if (e.Element == ExportElement.Row)
|
||||
{
|
||||
(e.VisualParameters as GridViewDocumentVisualExportParameters).Style = new CellSelectionStyle()
|
||||
{
|
||||
Fill = new PatternFill(PatternType.Solid, Color.FromArgb(255, 255, 142, 142), Colors.Transparent),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private void HierarchicalExportGridView_ElementExportedToDocument(object sender, GridViewElementExportedToDocumentEventArgs e)
|
||||
{
|
||||
if (e.Element == ExportElement.Row && e.DataContext != null)
|
||||
|
@ -39,11 +59,19 @@ namespace ExportHierarchy
|
|||
var subItems = item.GetType().GetProperty(property).GetValue(item) as IList;
|
||||
if (subItems.Count > 0)
|
||||
{
|
||||
var index = gridView.Items.IndexOf(item) + 1 + subItemsCount;
|
||||
var originalIndex = gridView.Items.IndexOf(item);
|
||||
var newIndex = originalIndex + subItemsCount;
|
||||
subItemsCount += subItems.Count;
|
||||
this.subItemsDictionary.Add(index, subItems);
|
||||
this.parentItemsDictionary.Add(new ParentExportInfo()
|
||||
{
|
||||
OriginalIndex = originalIndex,
|
||||
ExportIndex = newIndex,
|
||||
SubItems = subItems
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +106,7 @@ namespace ExportHierarchy
|
|||
}
|
||||
|
||||
this.subItemsCount = 0;
|
||||
this.subItemsDictionary.Clear();
|
||||
this.parentItemsDictionary.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,29 +118,48 @@ namespace ExportHierarchy
|
|||
workbook = this.ExportToWorkbook();
|
||||
|
||||
var worksheet = workbook.ActiveWorksheet;
|
||||
DataTemplate dt = this.HierarchyChildTemplate;
|
||||
DependencyObject dio = dt.LoadContent();
|
||||
var childGrid = dio as RadGridView;
|
||||
worksheet.GroupingProperties.SummaryRowIsBelow = false;
|
||||
DataTemplate template = this.HierarchyChildTemplate;
|
||||
DependencyObject content = template.LoadContent();
|
||||
var childGrid = content as RadGridView;
|
||||
var parentItemCount = 0;
|
||||
|
||||
foreach (var subItem in subItemsDictionary)
|
||||
foreach (var parentItem in parentItemsDictionary)
|
||||
{
|
||||
var rowIndex = subItem.Key;
|
||||
RowSelection selection = worksheet.Rows[rowIndex + 1, rowIndex + subItem.Value.Count];
|
||||
var rowIndex = parentItem.ExportIndex + headerRowCount + parentItemCount + 1;
|
||||
parentItemCount++;
|
||||
RowSelection selection = worksheet.Rows[rowIndex, rowIndex + parentItem.SubItems.Count];
|
||||
selection.Insert();
|
||||
for (var i = 0; i < subItem.Value.Count; i++)
|
||||
for (var j = 0; j < childGrid.Columns.Count; j++)
|
||||
{
|
||||
var item = subItem.Value[i];
|
||||
for (var j = 0; j < childGrid.Columns.Count; j++)
|
||||
var column = childGrid.Columns[j] as GridViewDataColumn;
|
||||
var header = column.Header != null ? column.Header.ToString() : column.DataMemberBinding.Path.Path;
|
||||
var headerCell = worksheet.Cells[rowIndex, j];
|
||||
headerCell.SetValueAsText(header);
|
||||
var headerCellFill = new PatternFill(PatternType.Solid, Color.FromArgb(255, 150, 150, 150), Colors.Transparent);
|
||||
headerCell.SetFill(headerCellFill);
|
||||
headerCell.SetIsBold(true);
|
||||
|
||||
for (var i = 0; i < parentItem.SubItems.Count; i++)
|
||||
{
|
||||
var column = childGrid.Columns[j] as GridViewDataColumn;
|
||||
var item = parentItem.SubItems[i];
|
||||
|
||||
var cell = worksheet.Cells[rowIndex + 1 + i, j];
|
||||
var property = item.GetType().GetProperty(column.DataMemberBinding.Path.Path);
|
||||
var value = property != null ? property.GetValue(item).ToString() : string.Empty;
|
||||
cell.SetValueAsText(value);
|
||||
var solidPatternFill = new PatternFill(PatternType.Solid, Color.FromArgb(255, 46, 204, 113), Colors.Transparent);
|
||||
cell.SetFill(solidPatternFill);
|
||||
var subItemCellFill = new PatternFill(PatternType.Solid, Color.FromArgb(255, 46, 204, 113), Colors.Transparent);
|
||||
cell.SetFill(subItemCellFill);
|
||||
}
|
||||
}
|
||||
|
||||
selection.Group();
|
||||
var originalItem = this.Items[parentItem.OriginalIndex];
|
||||
var isExpanded = (bool)originalItem.GetType().GetProperty("IsExpanded").GetValue(originalItem);
|
||||
if (!isExpanded)
|
||||
{
|
||||
selection.SetHidden(true);
|
||||
}
|
||||
}
|
||||
|
||||
for (var j = 0; j < childGrid.Columns.Count; j++)
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
xmlns:my="clr-namespace:ExportHierarchy"
|
||||
Title="MainWindow" Height="700" Width="700">
|
||||
<Window.Resources>
|
||||
<my:MyViewModel x:Key="MyViewModel"/>
|
||||
</Window.Resources>
|
||||
<my:MyViewModel x:Key="MyViewModel"/>
|
||||
</Window.Resources>
|
||||
<Grid DataContext="{StaticResource MyViewModel}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
|
@ -33,6 +33,7 @@
|
|||
<my:HierarchicalExportGridView Grid.Row="0"
|
||||
x:Name="clubsGrid"
|
||||
ItemsSource="{Binding Clubs}"
|
||||
IsExpandedBinding="{Binding IsExpanded, Mode=TwoWay}"
|
||||
CanUserGroupColumns="False"
|
||||
AutoGenerateColumns="False"
|
||||
GroupRenderMode="Flat"
|
||||
|
@ -47,15 +48,15 @@
|
|||
</telerik:GridViewTableDefinition>
|
||||
</my:HierarchicalExportGridView.ChildTableDefinitions>
|
||||
<my:HierarchicalExportGridView.Columns>
|
||||
<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
|
||||
<telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
|
||||
<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
|
||||
<telerik:GridViewDataColumn DataMemberBinding="{Binding Established}"
|
||||
Header="Est."
|
||||
DataFormatString="{}{0:yyyy}"/>
|
||||
<telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"
|
||||
<telerik:GridViewDataColumn DataMemberBinding="{Binding StadiumCapacity}"
|
||||
Header="Stadium"
|
||||
DataFormatString="{}{0:N0}"/>
|
||||
</my:HierarchicalExportGridView.Columns>
|
||||
</my:HierarchicalExportGridView>
|
||||
</my:HierarchicalExportGridView.Columns>
|
||||
</my:HierarchicalExportGridView>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<Button Name="Button1"
|
||||
Content="Export to XLSX"
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections;
|
||||
|
||||
namespace ExportHierarchy
|
||||
{
|
||||
public class ParentExportInfo
|
||||
{
|
||||
public int OriginalIndex { get; set; }
|
||||
|
||||
public int ExportIndex { get; set; }
|
||||
|
||||
public IList SubItems { get; set; }
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@ namespace HighlightCustomColumn
|
|||
}
|
||||
|
||||
//Add HighlightTextBlock to keep the SearchPanel functionality
|
||||
HighlightTextBlock htb = new HighlightTextBlock();
|
||||
HighlightTextBlock htb = new HighlightTextBlock(this.DataControl.SearchStateManager);
|
||||
htb.DataType = this.DataType;
|
||||
htb.SetBinding(HighlightTextBlock.HighlightTextProperty, new Binding(this.DataMemberBinding.Path.Path));
|
||||
cell.SetBinding(GridViewCell.IsHighlightedProperty, new Binding("ContainsMatch") { Source = htb, Mode = BindingMode.TwoWay });
|
||||
|
|
|
@ -161,6 +161,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI_Virtualization_And_Wrapa
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AsyncSqlGeospatialDataReader", "AsyncSqlGeospatialDataReader\AsyncSqlGeospatialDataReader.csproj", "{D3EF7F47-6E0B-4D38-914F-120A7F975715}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileSystemMapProvider", "ProvidersFileSystemMapProvider\FileSystemMapProvider.csproj", "{A306A36B-9E6F-45F8-A181-BEF7EEF09B90}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -483,6 +485,10 @@ Global
|
|||
{D3EF7F47-6E0B-4D38-914F-120A7F975715}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D3EF7F47-6E0B-4D38-914F-120A7F975715}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D3EF7F47-6E0B-4D38-914F-120A7F975715}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A306A36B-9E6F-45F8-A181-BEF7EEF09B90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A306A36B-9E6F-45F8-A181-BEF7EEF09B90}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A306A36B-9E6F-45F8-A181-BEF7EEF09B90}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A306A36B-9E6F-45F8-A181-BEF7EEF09B90}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<Application x:Class="FileSystemMapProvider.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
|
||||
namespace FileSystemMapProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,217 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A306A36B-9E6F-45F8-A181-BEF7EEF09B90}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>FileSystemMapProvider</RootNamespace>
|
||||
<AssemblyName>FileSystemMapProvider</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
||||
|
||||
|
||||
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls.DataVisualization, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Controls.DataVisualization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Data, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>$(TELERIKWPFDIR)\Binaries\WPF40\Telerik.Windows.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FileSystemProvider.cs" />
|
||||
<Compile Include="FileSystemTileSource.cs" />
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="Properties\" />
|
||||
<Resource Include="Readme.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="OpenStreet Images\1\os_0_0_1.png" />
|
||||
<Resource Include="OpenStreet Images\1\os_0_1_1.png" />
|
||||
<Resource Include="OpenStreet Images\1\os_1_0_1.png" />
|
||||
<Resource Include="OpenStreet Images\1\os_1_1_1.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_0_1_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_0_2_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_1_1_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_1_2_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_2_1_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_2_2_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_3_1_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_3_2_2.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_4_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_4_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_4_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_4_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_4_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_4_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_4_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_3_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_4_3.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="OpenStreet Images\2\os_0_0_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_0_3_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_1_0_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_1_3_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_2_0_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_2_3_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_3_0_2.png" />
|
||||
<Resource Include="OpenStreet Images\2\os_3_3_2.png" />
|
||||
<Resource Include="OpenStreet Images\3\oc_4149_2818_13.png" />
|
||||
<Resource Include="OpenStreet Images\3\oc_4_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_0_7_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_1_7_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_2_7_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_3_7_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_4_7_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_5_7_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_6_7_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_0_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_1_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_2_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_5_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_6_3.png" />
|
||||
<Resource Include="OpenStreet Images\3\os_7_7_3.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Telerik.Windows.Controls.Map;
|
||||
|
||||
namespace FileSystemMapProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Map provider which reads map tiles from the file system.
|
||||
/// </summary>
|
||||
public class FileSystemProvider : TiledProvider
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the MyMapProvider class.
|
||||
/// </summary>
|
||||
/// <param name="tilePathFormat">Format string to access tiles in file system.</param>
|
||||
public FileSystemProvider(string tilePathFormat, bool isGrayScale, bool isInverted, bool isCustomColor)
|
||||
: base()
|
||||
{
|
||||
FileSystemTileSource source = new FileSystemTileSource(tilePathFormat) { IsGrayScale = isGrayScale, IsInverted = isInverted, IsCustomColor = isCustomColor};
|
||||
this.MapSources.Add(source.UniqueId, source);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the SpatialReference for the map provider.
|
||||
/// </summary>
|
||||
public override ISpatialReference SpatialReference
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MercatorProjection();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,187 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Telerik.Windows.Controls.Map;
|
||||
|
||||
namespace FileSystemMapProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Tile source which read map tiles from the file system.
|
||||
/// </summary>
|
||||
public class FileSystemTileSource : TiledMapSource
|
||||
{
|
||||
internal bool IsGrayScale;
|
||||
internal bool IsInverted;
|
||||
internal bool IsCustomColor;
|
||||
private string tilePathFormat;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the FileSystemTileSource class.
|
||||
/// </summary>
|
||||
/// <param name="tilePathFormat">Format string to access tiles in file system.</param>
|
||||
public FileSystemTileSource(string tilePathFormat)
|
||||
: base(1, 3, 256, 256)
|
||||
{
|
||||
this.tilePathFormat = tilePathFormat;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
this.RaiseInitializeCompleted();
|
||||
}
|
||||
|
||||
protected override void GetTileLayers(int tileLevel, int tilePositionX, int tilePositionY, IList<object> tileImageLayerSources)
|
||||
{
|
||||
base.GetTileLayers(tileLevel, tilePositionX, tilePositionY, tileImageLayerSources);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the image URI.
|
||||
/// </summary>
|
||||
/// <param name="tileLevel">Tile level.</param>
|
||||
/// <param name="tilePositionX">Tile X.</param>
|
||||
/// <param name="tilePositionY">Tile Y.</param>
|
||||
/// <returns>URI of image.</returns>
|
||||
protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
|
||||
{
|
||||
int zoomLevel = ConvertTileToZoomLevel(tileLevel);
|
||||
|
||||
string tileFileName = this.tilePathFormat.Replace("{zoom}", zoomLevel.ToString(CultureInfo.InvariantCulture));
|
||||
tileFileName = tileFileName.Replace("{x}", tilePositionX.ToString(CultureInfo.InvariantCulture));
|
||||
tileFileName = tileFileName.Replace("{y}", tilePositionY.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
if (File.Exists(tileFileName))
|
||||
{
|
||||
string result = (this.IsGrayScale || this.IsInverted || IsCustomColor) ? this.ProcessFile(tileFileName) : tileFileName;
|
||||
return new Uri(result);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Invert Colors
|
||||
private string ProcessFile(string fileName)
|
||||
{
|
||||
BitmapImage bmp = new BitmapImage(new Uri(fileName));
|
||||
Bitmap bitmap = this.BitmapImage2Bitmap(bmp);
|
||||
|
||||
ImageAttributes imageAttributes = new ImageAttributes();
|
||||
ColorMatrix matrix = this.GetColorMatrix();
|
||||
if (matrix != null)
|
||||
{
|
||||
imageAttributes.SetColorMatrix(matrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
|
||||
}
|
||||
|
||||
if (IsCustomColor)
|
||||
{
|
||||
imageAttributes.SetRemapTable(this.CreateColorMap());
|
||||
}
|
||||
Graphics g = Graphics.FromImage(bitmap);
|
||||
|
||||
Rectangle rect = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
|
||||
g.DrawImage(bitmap, rect, 0, 0, bitmap.Width, bitmap.Height, GraphicsUnit.Pixel, imageAttributes);
|
||||
g.Dispose();
|
||||
|
||||
BitmapImage grayBmp = this.Bitmap2BitmapImage(bitmap);
|
||||
bitmap.Dispose();
|
||||
bmp = null;
|
||||
|
||||
int index = fileName.LastIndexOf("\\");
|
||||
string newFileName = fileName.Substring(0, index + 1) + "gray" + fileName.Substring(index + 1);
|
||||
using (FileStream filestream = new FileStream(newFileName, FileMode.OpenOrCreate))
|
||||
{
|
||||
JpegBitmapEncoder encoder = new JpegBitmapEncoder();
|
||||
encoder.Frames.Add(BitmapFrame.Create(grayBmp));
|
||||
encoder.Save(filestream);
|
||||
}
|
||||
|
||||
return newFileName;
|
||||
}
|
||||
|
||||
|
||||
private ColorMap[] CreateColorMap()
|
||||
{
|
||||
List<ColorMap> colorMap = new List<ColorMap>();
|
||||
|
||||
//Change the water to blue color
|
||||
ColorMap waterColorMap = new ColorMap();
|
||||
waterColorMap.OldColor = Color.FromArgb(255, 170, 211, 223);
|
||||
waterColorMap.NewColor = Color.FromArgb(255, 44, 192, 255);
|
||||
colorMap.Add(waterColorMap);
|
||||
|
||||
ColorMap landColorMap = new ColorMap();
|
||||
landColorMap.OldColor = Color.FromArgb(255, 242, 239, 233);
|
||||
landColorMap.NewColor = Color.FromArgb(255, 255, 255, 255);
|
||||
colorMap.Add(landColorMap);
|
||||
|
||||
return colorMap.ToArray();
|
||||
}
|
||||
|
||||
private ColorMatrix GetColorMatrix()
|
||||
{
|
||||
if (this.IsGrayScale)
|
||||
{
|
||||
return GreyScaleMatrix;
|
||||
}
|
||||
else if (this.IsInverted)
|
||||
{
|
||||
return InvertScaleMatrix;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ColorMatrix InvertScaleMatrix = new ColorMatrix(
|
||||
new float[][]
|
||||
{
|
||||
new float[] {-1, 0, 0, 0, 0},
|
||||
new float[] {0, -1, 0, 0, 0},
|
||||
new float[] {0, 0, -1, 0, 0},
|
||||
new float[] {0, 0, 0, 1, 0},
|
||||
new float[] {1, 1, 1, 0, 1}
|
||||
});
|
||||
|
||||
public static ColorMatrix GreyScaleMatrix = new ColorMatrix(
|
||||
new float[][]
|
||||
{
|
||||
new float[] {.3f, .3f, .3f, 0, 0},
|
||||
new float[] {.59f, .59f, .59f, 0, 0},
|
||||
new float[] {.11f, .11f, .11f, 0, 0},
|
||||
new float[] {0, 0, 0, 1, 0},
|
||||
new float[] {0, 0, 0, 0, 1}
|
||||
});
|
||||
|
||||
private BitmapImage Bitmap2BitmapImage(Bitmap bitmap)
|
||||
{
|
||||
using (MemoryStream memory = new MemoryStream())
|
||||
{
|
||||
bitmap.Save(memory, ImageFormat.Png);
|
||||
memory.Position = 0;
|
||||
BitmapImage bitmapImage = new BitmapImage();
|
||||
bitmapImage.BeginInit();
|
||||
bitmapImage.StreamSource = memory;
|
||||
bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
|
||||
bitmapImage.EndInit();
|
||||
|
||||
return bitmapImage;
|
||||
}
|
||||
}
|
||||
|
||||
private Bitmap BitmapImage2Bitmap(BitmapImage bitmapImage)
|
||||
{
|
||||
|
||||
using (MemoryStream outStream = new MemoryStream())
|
||||
{
|
||||
BitmapEncoder enc = new BmpBitmapEncoder();
|
||||
enc.Frames.Add(BitmapFrame.Create(bitmapImage));
|
||||
enc.Save(outStream);
|
||||
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(outStream);
|
||||
|
||||
return new Bitmap(bitmap);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<Window x:Class="FileSystemMapProvider.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
||||
Title="MainWindow" Height="600" Width="800">
|
||||
<Grid>
|
||||
<telerik:RadMap x:Name="radMap" UseDefaultLayout="True"
|
||||
ZoomLevel="1" MaxZoomLevel="3" Margin="0 0 0 100" WrapAround="True">
|
||||
</telerik:RadMap>
|
||||
|
||||
<StackPanel VerticalAlignment="Bottom" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<telerik:RadButton Content="Set Normal" Click="RadButton_Click_2" Margin="30"/>
|
||||
<telerik:RadButton Content="Set Grey Scale" Click="RadButton_Click" Margin="30"/>
|
||||
<telerik:RadButton Content="Set Inverted Colors" Click="RadButton_Click_1" Margin="30"/>
|
||||
<telerik:RadButton Content="Set Custom Colors" Click="RadButton_Click_3" Margin="30"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
|
@ -0,0 +1,57 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
|
||||
namespace FileSystemMapProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private static string imagePattern = AssemblyDirectory + @"\..\..\OpenStreet Images\{zoom}\os_{x}_{y}_{zoom}.png";
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.radMap.Provider = new FileSystemProvider(imagePattern, false, false, false);
|
||||
}
|
||||
|
||||
private void RadButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.ChangeProvider(imagePattern, true, false, false);
|
||||
}
|
||||
|
||||
private void RadButton_Click_1(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.ChangeProvider(imagePattern, false, true, false);
|
||||
}
|
||||
|
||||
private void RadButton_Click_2(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.ChangeProvider(imagePattern, false, false, false);
|
||||
}
|
||||
|
||||
private void RadButton_Click_3(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.ChangeProvider(imagePattern, false, false, true);
|
||||
}
|
||||
|
||||
private void ChangeProvider(string format, bool isgrayscale, bool isinverted, bool isCusComColors)
|
||||
{
|
||||
this.radMap.Provider = null;
|
||||
this.radMap.Providers.Clear();
|
||||
this.radMap.Provider = new FileSystemProvider(format, isgrayscale, isinverted, isCusComColors);
|
||||
}
|
||||
|
||||
public static string AssemblyDirectory
|
||||
{
|
||||
get
|
||||
{
|
||||
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
|
||||
UriBuilder uri = new UriBuilder(codeBase);
|
||||
string path = Uri.UnescapeDataString(uri.Path);
|
||||
return System.IO.Path.GetDirectoryName(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
После Ширина: | Высота: | Размер: 11 KiB |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 11 KiB |
После Ширина: | Высота: | Размер: 3.9 KiB |
После Ширина: | Высота: | Размер: 5.9 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 9.1 KiB |
После Ширина: | Высота: | Размер: 8.6 KiB |
После Ширина: | Высота: | Размер: 4.1 KiB |
После Ширина: | Высота: | Размер: 2.2 KiB |
После Ширина: | Высота: | Размер: 5.9 KiB |
После Ширина: | Высота: | Размер: 11 KiB |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 1.4 KiB |
После Ширина: | Высота: | Размер: 3.5 KiB |
После Ширина: | Высота: | Размер: 6.5 KiB |
После Ширина: | Высота: | Размер: 4.6 KiB |
После Ширина: | Высота: | Размер: 1.5 KiB |
Двоичные данные
Map/WPF/ProvidersFileSystemMapProvider/OpenStreet Images/3/oc_4149_2818_13.png
Normal file
После Ширина: | Высота: | Размер: 42 KiB |
После Ширина: | Высота: | Размер: 32 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 2.0 KiB |
После Ширина: | Высота: | Размер: 4.5 KiB |
После Ширина: | Высота: | Размер: 842 B |
После Ширина: | Высота: | Размер: 366 B |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 11 KiB |
После Ширина: | Высота: | Размер: 5.2 KiB |
После Ширина: | Высота: | Размер: 4.0 KiB |
После Ширина: | Высота: | Размер: 288 B |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 6.4 KiB |
После Ширина: | Высота: | Размер: 10 KiB |
После Ширина: | Высота: | Размер: 9.1 KiB |
После Ширина: | Высота: | Размер: 6.7 KiB |
После Ширина: | Высота: | Размер: 6.2 KiB |
После Ширина: | Высота: | Размер: 5.0 KiB |
После Ширина: | Высота: | Размер: 3.0 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 4.2 KiB |
После Ширина: | Высота: | Размер: 4.9 KiB |
После Ширина: | Высота: | Размер: 5.5 KiB |
После Ширина: | Высота: | Размер: 5.9 KiB |
После Ширина: | Высота: | Размер: 1.2 KiB |
После Ширина: | Высота: | Размер: 378 B |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 2.2 KiB |
После Ширина: | Высота: | Размер: 4.8 KiB |
После Ширина: | Высота: | Размер: 14 KiB |
После Ширина: | Высота: | Размер: 15 KiB |
После Ширина: | Высота: | Размер: 9.7 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 1.5 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 3.2 KiB |
После Ширина: | Высота: | Размер: 6.2 KiB |
После Ширина: | Высота: | Размер: 4.1 KiB |
После Ширина: | Высота: | Размер: 8.8 KiB |
После Ширина: | Высота: | Размер: 2.0 KiB |
После Ширина: | Высота: | Размер: 1.0 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 1.8 KiB |
После Ширина: | Высота: | Размер: 4.0 KiB |
После Ширина: | Высота: | Размер: 3.9 KiB |
После Ширина: | Высота: | Размер: 11 KiB |
После Ширина: | Высота: | Размер: 5.6 KiB |
После Ширина: | Высота: | Размер: 1.3 KiB |
После Ширина: | Высота: | Размер: 944 B |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 103 B |
После Ширина: | Высота: | Размер: 2.9 KiB |
После Ширина: | Высота: | Размер: 4.6 KiB |
После Ширина: | Высота: | Размер: 1.6 KiB |
После Ширина: | Высота: | Размер: 6.0 KiB |
После Ширина: | Высота: | Размер: 2.8 KiB |
После Ширина: | Высота: | Размер: 2.5 KiB |
После Ширина: | Высота: | Размер: 103 B |
|
@ -0,0 +1,55 @@
|
|||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("FileSystemMapProvider")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("FileSystemMapProvider")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|