Skip to content

Commit

Permalink
Merge pull request #2 from koszeggy/Development
Browse files Browse the repository at this point in the history
Releasing version v2.2.0
  • Loading branch information
koszeggy authored Aug 8, 2020
2 parents 25c392e + df4a51f commit ec5eeb6
Show file tree
Hide file tree
Showing 60 changed files with 2,212 additions and 443 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@
<EmbedInteropTypes>False</EmbedInteropTypes>
<Private>False</Private>
</Reference>
<Reference Include="KGySoft.CoreLibraries, Version=5.1.1.0, Culture=neutral, PublicKeyToken=b45eba277439ddfe, processorArchitecture=MSIL">
<HintPath>..\..\packages\KGySoft.CoreLibraries.5.1.1\lib\net45\KGySoft.CoreLibraries.dll</HintPath>
<Reference Include="KGySoft.CoreLibraries, Version=5.3.0.0, Culture=neutral, PublicKeyToken=b45eba277439ddfe, processorArchitecture=MSIL">
<HintPath>..\..\packages\KGySoft.CoreLibraries.5.3.0\lib\net45\KGySoft.CoreLibraries.dll</HintPath>
</Reference>
<Reference Include="KGySoft.Drawing, Version=5.1.0.0, Culture=neutral, PublicKeyToken=b45eba277439ddfe, processorArchitecture=MSIL">
<HintPath>..\..\packages\KGySoft.Drawing.5.1.0\lib\net45\KGySoft.Drawing.dll</HintPath>
<Reference Include="KGySoft.Drawing, Version=5.2.0.0, Culture=neutral, PublicKeyToken=b45eba277439ddfe, processorArchitecture=MSIL">
<HintPath>..\..\packages\KGySoft.Drawing.5.2.0\lib\net45\KGySoft.Drawing.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.GraphModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\VSSDK.GraphModel.11.0.4\lib\net45\Microsoft.VisualStudio.GraphModel.dll</HintPath>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,7 @@ Make sure every running debugger is closed. Installing will be tried again on re
<data name="InfoMessage_InstallationFinishedFormat" xml:space="preserve">
<value>KGy SOFT Drawing DebuggerVisualizers {0} have been installed to {1}</value>
</data>
<data name="InfoMessage_InstallationUpgradedFormat" xml:space="preserve">
<value>KGy SOFT Drawing DebuggerVisualizers {0} have been upgraded to version {1} at {2}</value>
</data>
</root>
3 changes: 3 additions & 0 deletions KGySoft.Drawing.DebuggerVisualizers.Package/Res.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ internal static class Res
/// <summary>KGy SOFT Drawing DebuggerVisualizers {0} have been installed to {1}</summary>
internal static string InfoMessageInstallationFinished(Version version, string targetPath) => Get(Resources.InfoMessage_InstallationFinishedFormat, version, targetPath);

/// <summary>KGy SOFT Drawing DebuggerVisualizers {0} have been upgraded to version {1} at {2}</summary>
internal static string InfoMessageUpgradeFinished(Version oldVersion, Version newVersion, string targetPath) => Get(Resources.InfoMessage_InstallationUpgradedFormat, oldVersion, newVersion, targetPath);

#endregion

#region Private Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ private void InstallIfNeeded(IVsShell shellService)
ShellDialogs.Error(this, Res.ErrorMessageFailedToInstall(targetPath, error));
else if (warning != null)
ShellDialogs.Warning(this, Res.WarningMessageInstallationFinishedWithWarning(targetPath, warning));
else if (installedVersion.Installed && installedVersion.Version != null)
ShellDialogs.Info(this, Res.InfoMessageUpgradeFinished(installedVersion.Version, availableVersion.Version, targetPath));
else
ShellDialogs.Info(this, Res.InfoMessageInstallationFinished(availableVersion.Version, targetPath));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal static class Ids
internal const string ResourceTitle = "110";
internal const string ResourceDetails = "112";
internal const int IconResourceId = 400;
internal const string Version = "2.1.0"; // Note: in .vsixmanifest it should be adjusted manually
internal const string Version = "2.2.0"; // Note: in .vsixmanifest it should be adjusted manually
internal const int ExecuteImagingToolsCommandId = 0x0100;
internal const int ManageDebuggerVisualizerInstallationsCommandId = 0x0101;

Expand Down
4 changes: 2 additions & 2 deletions KGySoft.Drawing.DebuggerVisualizers.Package/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KGySoft.CoreLibraries" version="5.1.1" targetFramework="net46" />
<package id="KGySoft.Drawing" version="5.1.0" targetFramework="net46" />
<package id="KGySoft.CoreLibraries" version="5.3.0" targetFramework="net46" />
<package id="KGySoft.Drawing" version="5.2.0" targetFramework="net46" />
<package id="Microsoft.VisualStudio.Imaging.Interop.14.0.DesignTime" version="14.3.26930" targetFramework="net46" />
<package id="Microsoft.VisualStudio.OLE.Interop" version="7.10.6071" targetFramework="net46" />
<package id="Microsoft.VisualStudio.SDK.EmbedInteropTypes" version="15.0.16" targetFramework="net46" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="fd42f5a8-4449-4c07-8b60-b6bd58b67118" Version="2.1.0" Language="en-US" Publisher="KGy SOFT" />
<Identity Id="fd42f5a8-4449-4c07-8b60-b6bd58b67118" Version="2.2.0" Language="en-US" Publisher="KGy SOFT" />
<DisplayName>KGy SOFT Drawing DebuggerVisualizers</DisplayName>
<Description xml:space="preserve">Debugger Visualizers for System.Drawing types such as Image (Bitmap and Metafile), Icon, Graphics, BitmapData, ColorPalette and Color.</Description>
<MoreInfo>https://github.com/koszeggy/KGySoft.Drawing.Tools</MoreInfo>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<TargetFrameworks>net35;net40;net45</TargetFrameworks>
<TargetFrameworks>net35;net40;net45;netcoreapp3.0</TargetFrameworks>
<!--<TargetFrameworks>net45</TargetFrameworks>-->
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>KGySoft.Drawing.DebuggerVisualizers.Test</RootNamespace>
Expand All @@ -13,13 +13,14 @@
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Authors>György Kőszeg</Authors>
<UseWindowsForms>true</UseWindowsForms>
<OutputType>WinExe</OutputType>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KGySoft.CoreLibraries" Version="5.1.1" />
<PackageReference Include="KGySoft.Drawing" Version="5.1.0" />
<PackageReference Include="KGySoft.CoreLibraries" Version="5.3.0" />
<PackageReference Include="KGySoft.Drawing" Version="5.2.0" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=_005Fclasses/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
// 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("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#region Usings

using System;
using System.Diagnostics.CodeAnalysis;
using System.Windows.Forms;

using KGySoft.ComponentModel;
Expand All @@ -32,6 +33,8 @@ public partial class DebuggerTestForm : Form

private readonly CommandBindingsCollection commandBindings = new CommandBindingsCollection();
private readonly DebuggerTestFormViewModel viewModel = new DebuggerTestFormViewModel();
private readonly Timer timer;
private string errorMessage;

#endregion

Expand Down Expand Up @@ -79,7 +82,17 @@ public DebuggerTestForm()

viewModel.GetHwndCallback = () => Handle;
viewModel.GetClipCallback = () => pictureBox.Bounds;
viewModel.ErrorCallback = message => MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

// Due to some strange issue on Linux the app crashes if we show a MessageBox while changing radio buttons
// so as a workaround we show error messages by using a timer. Another solution would be to show a custom dialog.
timer = new Timer { Interval = 1 };
viewModel.ErrorCallback = message =>
{
errorMessage = message;
timer.Enabled = true;
};
commandBindings.Add(OnShowErrorCommand)
.AddSource(timer, nameof(timer.Tick));
}

#endregion
Expand All @@ -99,6 +112,7 @@ protected override void Dispose(bool disposing)
components?.Dispose();
commandBindings.Dispose();
viewModel.Dispose();
timer?.Dispose();
}

base.Dispose(disposing);
Expand All @@ -120,6 +134,15 @@ private void OnSelectFileCommand(ICommandSource<EventArgs> source)
}
}

[SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "This is just a test app")]
private void OnShowErrorCommand()
{
timer.Enabled = false;
if (errorMessage != null)
MessageBox.Show(this, errorMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
errorMessage = null;
}

#endregion

#endregion
Expand Down
Loading

0 comments on commit ec5eeb6

Please sign in to comment.