Browse Source

Fix whitespace

pull/3642/head
Lex Li 2 days ago
parent
commit
d5830147fd
  1. 12
      ILSpy/AssemblyTree/AssemblyTreeModel.cs
  2. 6
      ILSpy/Metadata/Helper.wpf.cs
  3. 16
      ILSpy/Metadata/Helpers.cs
  4. 2
      ILSpy/Metadata/HexFilterControl.ContentFilter.cs
  5. 6
      ILSpy/Metadata/MetadataTableTreeNode.wpf.cs
  6. 6
      ILSpy/Options/ShowOptionsCommand.cs

12
ILSpy/AssemblyTree/AssemblyTreeModel.cs

@ -130,9 +130,9 @@ namespace ICSharpCode.ILSpy.AssemblyTree @@ -130,9 +130,9 @@ namespace ICSharpCode.ILSpy.AssemblyTree
var oldSelection = selectedItems;
selectedItems = value;
OnPropertyChanged();
#if CROSS_PLATFORM
#if CROSS_PLATFORM
OnPropertyChanged(nameof(SelectedItem));
#endif
#endif
TreeView_SelectionChanged(oldSelection, selectedItems);
}
}
@ -496,16 +496,16 @@ namespace ICSharpCode.ILSpy.AssemblyTree @@ -496,16 +496,16 @@ namespace ICSharpCode.ILSpy.AssemblyTree
}
else
{
#if CROSS_PLATFORM
#if CROSS_PLATFORM
ExpandAncestors(node);
#endif
#endif
activeView?.ScrollIntoView(node);
SelectedItem = node;
UIThreadDispatcher.BeginInvoke(DispatcherPriority.Background, () => {
#if CROSS_PLATFORM
#if CROSS_PLATFORM
SelectedItem = node;
#endif
#endif
activeView?.ScrollIntoView(node);
});
}

6
ILSpy/Metadata/Helper.wpf.cs

@ -8,8 +8,8 @@ using System.Windows.Documents; @@ -8,8 +8,8 @@ using System.Windows.Documents;
namespace ICSharpCode.ILSpy.Metadata
{
static partial class Helpers
{
static partial class Helpers
{
private static DataTemplate GetOrCreateLinkCellTemplate(string name, PropertyDescriptor descriptor, Binding binding)
{
if (linkCellTemplates.TryGetValue(name, out var template))
@ -39,5 +39,5 @@ namespace ICSharpCode.ILSpy.Metadata @@ -39,5 +39,5 @@ namespace ICSharpCode.ILSpy.Metadata
}
}
}
}
}
}

16
ILSpy/Metadata/Helpers.cs

@ -71,9 +71,9 @@ namespace ICSharpCode.ILSpy.Metadata @@ -71,9 +71,9 @@ namespace ICSharpCode.ILSpy.Metadata
ContextMenuProvider.Add(view);
DataGridFilter.SetIsAutoFilterEnabled(view, true);
DataGridFilter.SetContentFilterFactory(view, new RegexContentFilterFactory());
#if !CROSS_PLATFORM
#if !CROSS_PLATFORM
AdvancedScrollWheelBehavior.SetAttach(view, AdvancedScrollWheelMode.WithoutAnimation);
#endif
#endif
}
DataGridFilter.GetFilter(view).Clear();
view.RowDetailsTemplateSelector = null;
@ -112,23 +112,23 @@ namespace ICSharpCode.ILSpy.Metadata @@ -112,23 +112,23 @@ namespace ICSharpCode.ILSpy.Metadata
case "RVA":
case "StartOffset":
case "Length":
#if CROSS_PLATFORM
#if CROSS_PLATFORM
binding.Converter = HexFormatConverter.Instance;
#else
#else
binding.StringFormat = "X8";
#endif
#endif
e.Column.SetTemplate((ControlTemplate)MetadataTableViews.Instance["HexFilter"]);
break;
case "RowDetails":
e.Cancel = true;
break;
case "Value" when e.PropertyDescriptor is PropertyDescriptor dp && dp.ComponentType == typeof(Entry):
#if CROSS_PLATFORM
#if CROSS_PLATFORM
binding.Path = ".";
e.Column.SetTemplate((ControlTemplate)MetadataTableViews.Instance["DefaultFilter"]);
#else
#else
binding.Path = new PropertyPath(".");
#endif
#endif
binding.Converter = ByteWidthConverter.Instance;
break;
default:

2
ILSpy/Metadata/HexFilterControl.ContentFilter.cs

@ -4,7 +4,7 @@ using DataGridExtensions; @@ -4,7 +4,7 @@ using DataGridExtensions;
namespace ICSharpCode.ILSpy.Metadata
{
public partial class HexFilterControl
public partial class HexFilterControl
{
class ContentFilter : IContentFilter
{

6
ILSpy/Metadata/MetadataTableTreeNode.wpf.cs

@ -3,8 +3,8 @@ using System.Windows.Threading; @@ -3,8 +3,8 @@ using System.Windows.Threading;
namespace ICSharpCode.ILSpy.Metadata
{
partial class MetadataTableTreeNode
{
partial class MetadataTableTreeNode
{
protected void ScrollRowIntoView(DataGrid view, int row)
{
@ -28,5 +28,5 @@ namespace ICSharpCode.ILSpy.Metadata @@ -28,5 +28,5 @@ namespace ICSharpCode.ILSpy.Metadata
view.Loaded -= View_Loaded;
this.scrollTarget = default;
}
}
}
}

6
ILSpy/Options/ShowOptionsCommand.cs

@ -32,7 +32,7 @@ namespace ICSharpCode.ILSpy.Options @@ -32,7 +32,7 @@ namespace ICSharpCode.ILSpy.Options
{
OptionsDialog dlg = new(settingsService);
#if CROSS_PLATFORM
#if CROSS_PLATFORM
// On cross-platform schedule showing the dialog on the UI dispatcher
// and await its result asynchronously. Do not block the calling thread.
System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(async () => {
@ -42,7 +42,7 @@ namespace ICSharpCode.ILSpy.Options @@ -42,7 +42,7 @@ namespace ICSharpCode.ILSpy.Options
System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(() => assemblyTreeModel.Refresh());
}
});
#else
#else
// WPF path: set owner and show dialog synchronously as before.
dlg.Owner = mainWindow;
bool? result = dlg.ShowDialog();
@ -50,7 +50,7 @@ namespace ICSharpCode.ILSpy.Options @@ -50,7 +50,7 @@ namespace ICSharpCode.ILSpy.Options
{
assemblyTreeModel.Refresh();
}
#endif
#endif
}
}
}
Loading…
Cancel
Save