Skip to content

Commit

Permalink
Implemented Fountain infrastructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed May 24, 2024
1 parent 91a41c7 commit 2081f26
Show file tree
Hide file tree
Showing 10 changed files with 1,049 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ namespace EpoxyHello.Avalonia11.ViewModels;
[ViewModel]
public sealed class MainWindowViewModel
{
public Command Ready { get; }
//public Command Ready { get; }
public Well ReadyWell { get; }

public bool IsEnabled { get; private set; }

Expand All @@ -48,7 +49,8 @@ public sealed class MainWindowViewModel
public MainWindowViewModel()
{
// A handler for window opened
this.Ready = Command.Factory.Create(() =>
//this.Ready = Command.Factory.Create(() =>
this.ReadyWell = Well.Factory.Create<Window>("Opened", () =>
{
this.IsEnabled = true;
return default;
Expand Down
5 changes: 5 additions & 0 deletions playground/EpoxyHello.Avalonia11/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
<viewmodels:MainWindowViewModel />
</Window.DataContext>

<!--
<epoxy:EventBinder.Events>
<epoxy:Event EventName="Opened" Command="{Binding Ready}" />
</epoxy:EventBinder.Events>
-->
<epoxy:Fountain.Ducts>
<epoxy:Duct Well="{Binding ReadyWell}" />
</epoxy:Fountain.Ducts>

<DockPanel>
<Button DockPanel.Dock="Top"
Expand Down
8 changes: 0 additions & 8 deletions src/Epoxy.Core/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ public interface IAsyncCommand
ValueTask ExecuteAsync(object? parameter);
}

public sealed class UnobservedExceptionEventArgs : EventArgs
{
public UnobservedExceptionEventArgs(Exception ex) =>
this.Exception = ex;

public readonly Exception Exception;
}

public abstract class Command : ICommand, IAsyncCommand
{
protected Command()
Expand Down
Loading

0 comments on commit 2081f26

Please sign in to comment.