-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1589 from DGP-Studio/develop
- Loading branch information
Showing
342 changed files
with
9,799 additions
and
3,383 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
10 changes: 10 additions & 0 deletions
10
src/Snap.Hutao/Snap.Hutao/Control/Builder/ButtonBase/ButtonBaseBuilder.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,10 @@ | ||
// Copyright (c) DGP Studio. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
namespace Snap.Hutao.Control.Builder.ButtonBase; | ||
|
||
internal class ButtonBaseBuilder<TButton> : IButtonBaseBuilder<TButton> | ||
where TButton : Microsoft.UI.Xaml.Controls.Primitives.ButtonBase, new() | ||
{ | ||
public TButton Button { get; } = new(); | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Snap.Hutao/Snap.Hutao/Control/Builder/ButtonBase/ButtonBaseBuilderExtension.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,25 @@ | ||
// Copyright (c) DGP Studio. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
using Snap.Hutao.Core.Abstraction.Extension; | ||
|
||
namespace Snap.Hutao.Control.Builder.ButtonBase; | ||
|
||
internal static class ButtonBaseBuilderExtension | ||
{ | ||
public static TBuilder SetContent<TBuilder, TButton>(this TBuilder builder, object? content) | ||
where TBuilder : IButtonBaseBuilder<TButton> | ||
where TButton : Microsoft.UI.Xaml.Controls.Primitives.ButtonBase | ||
{ | ||
builder.Configure(builder => builder.Button.Content = content); | ||
return builder; | ||
} | ||
|
||
public static TBuilder SetCommand<TBuilder, TButton>(this TBuilder builder, ICommand command) | ||
where TBuilder : IButtonBaseBuilder<TButton> | ||
where TButton : Microsoft.UI.Xaml.Controls.Primitives.ButtonBase | ||
{ | ||
builder.Configure(builder => builder.Button.Command = command); | ||
return builder; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Snap.Hutao/Snap.Hutao/Control/Builder/ButtonBase/ButtonBuilder.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,8 @@ | ||
// Copyright (c) DGP Studio. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
using Microsoft.UI.Xaml.Controls; | ||
|
||
namespace Snap.Hutao.Control.Builder.ButtonBase; | ||
|
||
internal sealed class ButtonBuilder : ButtonBaseBuilder<Button>; |
19 changes: 19 additions & 0 deletions
19
src/Snap.Hutao/Snap.Hutao/Control/Builder/ButtonBase/ButtonBuilderExtension.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,19 @@ | ||
// Copyright (c) DGP Studio. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
using Microsoft.UI.Xaml.Controls; | ||
|
||
namespace Snap.Hutao.Control.Builder.ButtonBase; | ||
|
||
internal static class ButtonBuilderExtension | ||
{ | ||
public static ButtonBuilder SetContent(this ButtonBuilder builder, object? content) | ||
{ | ||
return builder.SetContent<ButtonBuilder, Button>(content); | ||
} | ||
|
||
public static ButtonBuilder SetCommand(this ButtonBuilder builder, ICommand command) | ||
{ | ||
return builder.SetCommand<ButtonBuilder, Button>(command); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Snap.Hutao/Snap.Hutao/Control/Builder/ButtonBase/IButtonBaseBuilder.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,12 @@ | ||
// Copyright (c) DGP Studio. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
using Snap.Hutao.Core.Abstraction; | ||
|
||
namespace Snap.Hutao.Control.Builder.ButtonBase; | ||
|
||
internal interface IButtonBaseBuilder<TButton> : IBuilder | ||
where TButton : Microsoft.UI.Xaml.Controls.Primitives.ButtonBase | ||
{ | ||
TButton Button { get; } | ||
} |
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
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
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
3 changes: 1 addition & 2 deletions
3
...o/Web/Request/Builder/BuilderExtension.cs → ...Abstraction/Extension/BuilderExtension.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
2 changes: 1 addition & 1 deletion
2
...b/Request/Builder/Abstraction/IBuilder.cs → ...o/Snap.Hutao/Core/Abstraction/IBuilder.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Copyright (c) DGP Studio. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
namespace Snap.Hutao.Web.Request.Builder.Abstraction; | ||
namespace Snap.Hutao.Core.Abstraction; | ||
|
||
internal interface IBuilder; |
Oops, something went wrong.