-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the tool infrastructure to make the main menu supporting tree…
… nodes. (#104) * Changed the tool infrastructure to make the main menu supporting tree nodes. * fixed localized text
- Loading branch information
Showing
27 changed files
with
1,316 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#nullable enable | ||
|
||
using System; | ||
using System.Composition; | ||
|
||
namespace DevToys.Api.Tools | ||
{ | ||
/// <summary> | ||
/// Indicates the parent tool of the current one. | ||
/// The name should corresponds to an existing <see cref="NameAttribute.Name"/> value, or null if no parent. | ||
/// </summary> | ||
[MetadataAttribute] | ||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] | ||
public sealed class ParentAttribute : Attribute | ||
{ | ||
public string Parent { get; set; } | ||
|
||
public ParentAttribute(string? name) | ||
{ | ||
Parent = name ?? string.Empty; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/dev/impl/DevToys/Core/Collections/ExtendedObservableCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#nullable enable | ||
|
||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Collections.Specialized; | ||
using DevToys.Shared.Core; | ||
|
||
namespace DevToys.Core.Collections | ||
{ | ||
public class ExtendedObservableCollection<T> : ObservableCollection<T> | ||
{ | ||
/// <summary> | ||
/// Adds the elements of the specified collection to the end of the ObservableCollection(Of T). | ||
/// </summary> | ||
internal void AddRange(IEnumerable<T> collection) | ||
{ | ||
Arguments.NotNull(collection, nameof(collection)); | ||
|
||
foreach (T item in collection) | ||
{ | ||
Items.Add(item); | ||
} | ||
|
||
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); | ||
} | ||
} | ||
} |
50 changes: 0 additions & 50 deletions
50
src/dev/impl/DevToys/Core/Collections/OrderedObservableCollection.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.