mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Workshop - Did all the things (Markdown stuff)
This commit is contained in:
1 parent
c132edeb51
commit
a0536b4302
47 files changed
+1017
-521
No files matched your search
@@ -16,7 +16,7 @@ public interface IWindowService : IArtemisSharedUIService
|
||||
/// </summary>
|
||||
/// <typeparam name="TViewModel">The type of view model to create</typeparam>
|
||||
/// <returns>The created view model</returns>
|
||||
TViewModel ShowWindow<TViewModel>(params object[] parameters);
|
||||
Window ShowWindow<TViewModel>(out TViewModel viewModel, params object[] parameters);
|
||||
|
||||
/// <summary>
|
||||
/// Given a ViewModel, show its corresponding View as a window
|
||||
|
||||
@@ -21,14 +21,13 @@ internal class WindowService : IWindowService
|
||||
_container = container;
|
||||
}
|
||||
|
||||
public T ShowWindow<T>(params object[] parameters)
|
||||
public Window ShowWindow<T>(out T viewModel, params object[] parameters)
|
||||
{
|
||||
T viewModel = _container.Resolve<T>(parameters);
|
||||
viewModel = _container.Resolve<T>(parameters);
|
||||
if (viewModel == null)
|
||||
throw new ArtemisSharedUIException($"Failed to show window for VM of type {typeof(T).Name}, could not create instance.");
|
||||
|
||||
ShowWindow(viewModel);
|
||||
return viewModel;
|
||||
return ShowWindow(viewModel);
|
||||
}
|
||||
|
||||
public Window ShowWindow(object viewModel)
|
||||
|
||||
Reference in new issue
Block a user