-
Notifications
You must be signed in to change notification settings - Fork 40
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 #179 from AvaloniaCommunity/feature/PrismAvalona-11.1
Upgrade NuGet packages to Avalonia v11.1.1
- Loading branch information
Showing
22 changed files
with
279 additions
and
346 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,53 @@ | ||
// Temp disabled logging: | ||
// - Prism.Logging has been moved and `ILoggerFacade` is deprecated.Prism.Logging.Serilog is out of date. | ||
// - https://github.com/augustoproiete/prism-logging-serilog/issues/3 | ||
using System.Threading; | ||
using System.Threading; | ||
using DummyModule.View; | ||
using ModulesSample.Infrastructure; | ||
using Prism.Avalonia.Infrastructure.Events; | ||
using Prism.Events; | ||
using Prism.Ioc; | ||
////using Prism.Logging; | ||
using Prism.Modularity; | ||
using Prism.Navigation.Regions; | ||
|
||
namespace DummyModule | ||
{ | ||
public class DummyModule1 : IModule | ||
{ | ||
////private readonly ILoggerFacade _logger; | ||
private readonly IModuleTracker _moduleTracker; | ||
|
||
private readonly IEventAggregator _eventAggregator; | ||
private readonly IRegionManager _regionManager; | ||
|
||
public DummyModule1(IModuleTracker moduleTracker, IEventAggregator eventAggregator, IRegionManager regionManager) | ||
////public DummyModule1(ILoggerFacade logger, IModuleTracker moduleTracker, IEventAggregator eventAggregator, IRegionManager regionManager) | ||
{ | ||
////_logger = logger; | ||
_moduleTracker = moduleTracker; | ||
_eventAggregator = eventAggregator; | ||
_regionManager = regionManager; | ||
} | ||
|
||
private void DummyEventPublisher() | ||
{ | ||
while (true) | ||
{ | ||
Thread.Sleep(2500); | ||
_eventAggregator.GetEvent<DummyEvent>().Publish(); | ||
} | ||
_moduleTracker.RecordModuleConstructed(ModuleNames.ModuleDummy1); | ||
} | ||
|
||
public void RegisterTypes(IContainerRegistry containerRegistry) | ||
{ | ||
_moduleTracker.RecordModuleLoaded(ModuleNames.ModuleDummy1); | ||
} | ||
|
||
public void OnInitialized(IContainerProvider containerProvider) | ||
{ | ||
Thread thread = new Thread(new ThreadStart(DummyEventPublisher)); | ||
// Send Event messages for subscribers to react to | ||
Thread thread = new(new ThreadStart(DummyEventPublisher)); | ||
thread.Start(); | ||
|
||
_regionManager.RegisterViewWithRegion(RegionNames.Region1, typeof(DummyModuleView)); | ||
_moduleTracker.RecordModuleInitialized(ModuleNames.ModuleDummy1); | ||
} | ||
|
||
/// <summary>Publish events to subscribers.</summary> | ||
private void DummyEventPublisher() | ||
{ | ||
while (true) | ||
{ | ||
Thread.Sleep(500); | ||
_eventAggregator.GetEvent<DummyEvent>().Publish(); | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:prism="clr-namespace:Prism.Navigation.Regions.Behaviors;assembly=Prism.Avalonia" | ||
xmlns:prism="http://prismlibrary.com/" | ||
xmlns:prismBehaviors="clr-namespace:Prism.Navigation.Regions.Behaviors;assembly=Prism.Avalonia" | ||
xmlns:prismRegions="clr-namespace:Prism.Navigation.Regions;assembly=Prism.Avalonia" | ||
x:Class="DummyModule2.View.DummyModuleView2"> | ||
<Grid> | ||
<TextBox Name="RegionViewTextBox" | ||
Text="DummyModule2 Region View" | ||
IsReadOnly="True" /> | ||
|
||
<ItemsControl prismRegions:RegionManager.RegionName="ListRegion"></ItemsControl> | ||
x:Class="DummyModule2.View.DummyModuleView2" | ||
prism:ViewModelLocator.AutoWireViewModel="True"> | ||
<Grid RowDefinitions="Auto,150"> | ||
<Label Content="DummyModule2 Region View" | ||
FontWeight="Bold" | ||
Name="RegionViewTextBox" /> | ||
|
||
<ScrollViewer Grid.Row="1"> | ||
<ItemsControl prismRegions:RegionManager.RegionName="ListRegion" /> | ||
</ScrollViewer> | ||
</Grid> | ||
</UserControl> | ||
</UserControl> |
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
namespace Prism.Avalonia.Infrastructure.Events | ||
{ | ||
public class DummyEvent : PubSubEvent | ||
{ | ||
|
||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.