Skip to content

Commit

Permalink
Merge pull request #87 from paulushub/develop
Browse files Browse the repository at this point in the history
Updated version information, fixed sample SVG paths
  • Loading branch information
paulushub committed Dec 18, 2023
2 parents da85121 + 1e5d99c commit 707369e
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnetpull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: .NET

on:
pull_request:
branches: [ master ]
branches: [ master, develop ]

defaults:
run:
Expand Down
10 changes: 5 additions & 5 deletions Docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ The respository includes
* **Samples:** For sample applications
* **Docs:** For the documentations (in markdown format).

The command lines installation options are: For the version `5.0.118`
* **.NET CLI:** dotnet add package DotNetProjects.SVGImage --version 5.0.118
* **Package Manager:** NuGet\Install-Package DotNetProjects.SVGImage -Version 5.0.118
The command lines installation options are: For the version `5.1.0`
* **.NET CLI:** dotnet add package DotNetProjects.SVGImage --version 5.1.0
* **Package Manager:** NuGet\Install-Package DotNetProjects.SVGImage -Version 5.1.0

For reference in projects use: For the version `5.0.118`
For reference in projects use: For the version `5.1.0`
```xml
<PackageReference Include="DotNetProjects.SVGImage" Version="5.0.118" />
<PackageReference Include="DotNetProjects.SVGImage" Version="5.1.0" />
```

## How to build
Expand Down
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
next-version: 5.0.118
next-version: 5.1.0
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ The respository includes
* **Samples:** For sample applications
* **Docs:** For the documentations (in markdown format).

The command lines installation options are: For the version `5.0.118`
* **.NET CLI:** dotnet add package DotNetProjects.SVGImage --version 5.0.118
* **Package Manager:** NuGet\Install-Package DotNetProjects.SVGImage -Version 5.0.118
The command lines installation options are: For the version `5.1.0`
* **.NET CLI:** dotnet add package DotNetProjects.SVGImage --version 5.1.0
* **Package Manager:** NuGet\Install-Package DotNetProjects.SVGImage -Version 5.1.0

For reference in projects use: For the version `5.0.118`
For reference in projects use: For the version `5.1.0`
```xml
<PackageReference Include="DotNetProjects.SVGImage" Version="5.0.118" />
<PackageReference Include="DotNetProjects.SVGImage" Version="5.1.0" />
```

## How to build
Expand Down
1 change: 0 additions & 1 deletion Samples/Example/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.IO.Compression;
using System.Collections.Generic;
using System.Drawing;
using System.Windows;

namespace Example
Expand Down
3 changes: 1 addition & 2 deletions Samples/IconConverterSample/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Net;
using System.IO;
using System.Reflection;
using System.IO.Compression;
using System.Windows;

Expand All @@ -24,7 +23,7 @@ private void OnWindowLoaded(object sender, RoutedEventArgs e)
InitializeProtocol(); //For the web access

// ICons credit: https://github.com/icons8/flat-color-icons
string workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string workingDir = Path.GetFullPath(PageMultiple.SamplesDir);

string iconsPath = Path.Combine(workingDir, PageMultiple.IconZipFile);
if (!File.Exists(iconsPath))
Expand Down
12 changes: 7 additions & 5 deletions Samples/IconConverterSample/PageMultiple.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.IO.Compression;

namespace IconConverterSample
{
Expand Down Expand Up @@ -43,8 +44,9 @@ public Uri ImageUri
/// </summary>
public partial class PageMultiple : Page
{
public const string IconZipFile = @"..\svg-icons.zip";
public const string IconFolder = @"Svg-Icons";
public const string SamplesDir = @"..\..\..\..\Tests";
public const string IconZipFile = "svg-icons.zip";
public const string IconFolder = "Svg-Icons";

public PageMultiple()
{
Expand All @@ -56,15 +58,15 @@ public PageMultiple()

private void OnPageLoaded(object sender, RoutedEventArgs e)
{
string workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string workingDir = Path.GetFullPath(SamplesDir);

string iconsPath = Path.Combine(workingDir, PageMultiple.IconZipFile);
string iconsPath = Path.Combine(workingDir, IconZipFile);
if (!File.Exists(iconsPath))
{
return;
}

var iconsDir = new DirectoryInfo(Path.Combine(workingDir, PageMultiple.IconFolder));
var iconsDir = new DirectoryInfo(Path.Combine(workingDir, IconFolder));
if (!iconsDir.Exists)
{
return;
Expand Down
5 changes: 2 additions & 3 deletions Samples/IconConverterSample/PageSingle.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ namespace IconConverterSample
/// </summary>
public partial class PageSingle : Page
{
//private const string SvgFileName = @"..\Asian_Openbill.svg";
private const string SvgFileName = @"..\Sf_er_nkm.svg";
private const string SvgFileName = @"..\..\Resources\Hypocolius.svg";

public static readonly DependencyProperty LocalFileNameProperty = DependencyProperty.Register("LocalFileName",
typeof(string), typeof(PageSingle), new PropertyMetadata(SvgFileName));
Expand All @@ -35,7 +34,7 @@ private void OnPageLoaded(object sender, RoutedEventArgs e)
{
string workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string svgFilePath = Path.Combine(workingDir, SvgFileName);
string svgFilePath = Path.GetFullPath(Path.Combine(workingDir, SvgFileName));
if (File.Exists(svgFilePath))
{
inputBox.Text = svgFilePath;
Expand Down
8 changes: 4 additions & 4 deletions Source/SVGImage/DotNetProjects.SVGImage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<Product>DotNetProjects.SVGImage</Product>
<Copyright>2020-2023 DotNetProjects</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<AssemblyVersion>5.0.117.0</AssemblyVersion>
<FileVersion>5.0.117.0</FileVersion>
<Version>5.0.117</Version>
<AssemblyVersion>5.1.0.0</AssemblyVersion>
<FileVersion>5.1.0.0</FileVersion>
<Version>5.1.0</Version>
<OutputType>Library</OutputType>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
Expand All @@ -31,7 +31,7 @@
<PackageReadmeFile>Readme.md</PackageReadmeFile>
<EnablePackageValidation>true</EnablePackageValidation>
<!-- NOTE: Detect breaking changes from a previous version -->
<PackageValidationBaselineVersion>5.0.117</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion>5.0.118</PackageValidationBaselineVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand Down
2 changes: 1 addition & 1 deletion Tests/SvgTestBox/SvgResourceColors.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SvgTestBox"
mc:Ignorable="d"
Title="Pick a Color" Height="400" Width="490" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
Title="Pick a Color" Height="410" Width="490" ResizeMode="NoResize" WindowStartupLocation="CenterOwner" ShowInTaskbar="False">
<Window.Resources>
<Style x:Key="Item.FocusVisual">
<Setter Property="Control.Template">
Expand Down

0 comments on commit 707369e

Please sign in to comment.