diff --git a/ILSpy/Commands/GeneratePdbContextMenuEntry.cs b/ILSpy/Commands/GeneratePdbContextMenuEntry.cs
index 915f1ba11..e7b18de41 100644
--- a/ILSpy/Commands/GeneratePdbContextMenuEntry.cs
+++ b/ILSpy/Commands/GeneratePdbContextMenuEntry.cs
@@ -100,7 +100,7 @@ namespace ICSharpCode.ILSpy
{
var decompiler = new CSharpDecompiler(file, assembly.GetAssemblyResolver(options.DecompilerSettings.AutoLoadAssemblyReferences), options.DecompilerSettings);
decompiler.CancellationToken = ct;
- PortablePdbWriter.WritePdb(file, decompiler, options.DecompilerSettings, stream, progress: options.Progress, currentProgressTitle: Resources.GeneratingPortablePDB);
+ PortablePdbWriter.WritePdb(file, decompiler, options.DecompilerSettings, stream, progress: options.Progress, currentProgressTitle: string.Format(Resources.GeneratingPortablePDB, Path.GetFileName(assembly.FileName)));
}
catch (OperationCanceledException)
{
@@ -178,7 +178,7 @@ namespace ICSharpCode.ILSpy
if (options.Progress != null)
{
options.Progress.Report(new DecompilationProgress {
- Title = Resources.GeneratingPortablePDB,
+ Title = string.Format(Resources.GeneratingPortablePDB, Path.GetFileName(assembly.FileName)),
TotalUnits = total,
UnitsCompleted = processed
});
@@ -194,7 +194,7 @@ namespace ICSharpCode.ILSpy
{
var decompiler = new CSharpDecompiler(file, assembly.GetAssemblyResolver(options.DecompilerSettings.AutoLoadAssemblyReferences), options.DecompilerSettings);
decompiler.CancellationToken = ct;
- PortablePdbWriter.WritePdb(file, decompiler, options.DecompilerSettings, stream, progress: options.Progress, currentProgressTitle: Resources.GeneratingPortablePDB);
+ PortablePdbWriter.WritePdb(file, decompiler, options.DecompilerSettings, stream, progress: options.Progress, currentProgressTitle: string.Format(Resources.GeneratingPortablePDB, Path.GetFileName(assembly.FileName)));
}
output.WriteLine(string.Format(Resources.GeneratedPDBFile, fileName));
}
@@ -212,7 +212,7 @@ namespace ICSharpCode.ILSpy
if (options.Progress != null)
{
options.Progress.Report(new DecompilationProgress {
- Title = Resources.GeneratingPortablePDB,
+ Title = string.Format(Resources.GeneratingPortablePDB, Path.GetFileName(assembly.FileName)),
TotalUnits = total,
UnitsCompleted = processed
});
diff --git a/ILSpy/Properties/Resources.resx b/ILSpy/Properties/Resources.resx
index e8b5af669..3ce2becb8 100644
--- a/ILSpy/Properties/Resources.resx
+++ b/ILSpy/Properties/Resources.resx
@@ -661,7 +661,7 @@ Are you sure you want to continue?
Generated PDB: {0}
- Generating portable PDB...
+ Generating portable PDB for {0}...
Generation complete in {0} seconds.
diff --git a/ILSpy/Properties/Resources.zh-Hans.resx b/ILSpy/Properties/Resources.zh-Hans.resx
index 20bbc1dce..8eb9fc98d 100644
--- a/ILSpy/Properties/Resources.zh-Hans.resx
+++ b/ILSpy/Properties/Resources.zh-Hans.resx
@@ -614,7 +614,7 @@
生成的 PDB: {0}
- 正在生成 Portable PDB...
+ 正在为 {0} 生成 Portable PDB...
生成完成,耗时 {0} 秒。
diff --git a/ILSpy/TextView/DecompilerTextView.cs b/ILSpy/TextView/DecompilerTextView.cs
index 703e40308..06169ed3e 100644
--- a/ILSpy/TextView/DecompilerTextView.cs
+++ b/ILSpy/TextView/DecompilerTextView.cs
@@ -22,6 +22,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection.Metadata;
@@ -1487,4 +1488,25 @@ namespace ICSharpCode.ILSpy.TextView
}
}
}
+
+ // Converter to multiply a double by a factor provided as ConverterParameter
+ public class MultiplyConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is double d && parameter != null)
+ {
+ if (double.TryParse(parameter.ToString(), NumberStyles.Any, CultureInfo.InvariantCulture, out double factor))
+ {
+ return d * factor;
+ }
+ }
+ return Binding.DoNothing;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
}
diff --git a/ILSpy/TextView/DecompilerTextView.xaml b/ILSpy/TextView/DecompilerTextView.xaml
index dddc96ae6..a83e277e0 100644
--- a/ILSpy/TextView/DecompilerTextView.xaml
+++ b/ILSpy/TextView/DecompilerTextView.xaml
@@ -25,6 +25,8 @@
+
+
@@ -96,12 +98,13 @@
-
+
+
-
-
-
+
+
+