mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Meta - Updated Nuget packages
UI - Use Material Design filled input style where possible
This commit is contained in:
1 parent
5d6a2610b9
commit
20452110b1
39 files changed
+419
-460
No files matched your search
@@ -33,20 +33,20 @@
|
||||
<DocumentationFile>bin\Artemis.UI.Shared.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AvalonEdit" Version="6.0.1" />
|
||||
<PackageReference Include="Ben.Demystifier" Version="0.3.0" />
|
||||
<PackageReference Include="Humanizer.Core" Version="2.8.26" />
|
||||
<PackageReference Include="MaterialDesignExtensions" Version="3.3.0-a01" />
|
||||
<PackageReference Include="MaterialDesignThemes" Version="3.2.0" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.19" />
|
||||
<PackageReference Include="MaterialDesignExtensions" Version="3.3.0" />
|
||||
<PackageReference Include="MaterialDesignThemes" Version="4.0.0" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.31" />
|
||||
<PackageReference Include="Ninject" Version="3.3.4" />
|
||||
<PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0" />
|
||||
<PackageReference Include="SharpVectors.Reloaded" Version="1.7.1" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.80.2" />
|
||||
<PackageReference Include="SkiaSharp.Views.WPF" Version="2.80.2" />
|
||||
<PackageReference Include="Stylet" Version="1.3.5" />
|
||||
<PackageReference Include="Stylet" Version="1.3.6" />
|
||||
<PackageReference Include="System.Buffers" Version="4.5.1" />
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.3.0">
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -66,17 +66,23 @@
|
||||
</UserControl.Resources>
|
||||
<Grid HorizontalAlignment="Stretch">
|
||||
<TextBox x:Name="ColorCodeTextBox"
|
||||
materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0"
|
||||
materialDesign:TextFieldAssist.TextBoxViewMargin="0 2 20 0"
|
||||
materialDesign:HintAssist.IsFloating="False"
|
||||
Style="{Binding TextBoxStyle, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
||||
Text="{Binding Color, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource ColorToStringConverter}}"
|
||||
MinWidth="95"
|
||||
MaxLength="9"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch" />
|
||||
HorizontalAlignment="Stretch">
|
||||
<materialDesign:TextFieldAssist.CharacterCounterStyle>
|
||||
<Style TargetType="TextBlock" />
|
||||
</materialDesign:TextFieldAssist.CharacterCounterStyle>
|
||||
</TextBox>
|
||||
|
||||
<Border Width="15"
|
||||
Height="15"
|
||||
CornerRadius="15"
|
||||
Margin="0,0,0,2"
|
||||
Margin="0 0 8 0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Background="{StaticResource Checkerboard}">
|
||||
@@ -116,7 +122,7 @@
|
||||
PreviewMouseDown="Slider_OnMouseDown"
|
||||
PreviewMouseUp="Slider_OnMouseUp"
|
||||
Maximum="255" />
|
||||
|
||||
|
||||
<ItemsControl Grid.Row="2" x:Name="RecentColorsContainer" Margin="10 0" HorizontalAlignment="Left">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
@@ -130,9 +136,9 @@
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal"></WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
|
||||
|
||||
@@ -35,9 +35,16 @@ namespace Artemis.UI.Shared
|
||||
public static readonly DependencyProperty StaysOpenProperty = DependencyProperty.Register(nameof(StaysOpen), typeof(bool), typeof(ColorPicker),
|
||||
new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, StaysOpenPropertyChangedCallback));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the style used on the text box
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty TextBoxStyleProperty = DependencyProperty.Register(nameof(TextBoxStyle), typeof(Style), typeof(ColorPicker),
|
||||
new FrameworkPropertyMetadata(Application.Current.Resources["MaterialDesignTextBox"]));
|
||||
|
||||
internal static readonly DependencyProperty ColorOpacityProperty = DependencyProperty.Register(nameof(ColorOpacity), typeof(byte), typeof(ColorPicker),
|
||||
new FrameworkPropertyMetadata((byte) 255, FrameworkPropertyMetadataOptions.AffectsArrange | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, ColorOpacityPropertyChangedCallback));
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the selected color has changed
|
||||
/// </summary>
|
||||
@@ -97,6 +104,15 @@ namespace Artemis.UI.Shared
|
||||
set => SetValue(StaysOpenProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the style used on the text box
|
||||
/// </summary>
|
||||
public Style TextBoxStyle
|
||||
{
|
||||
get => (Style) GetValue(TextBoxStyleProperty);
|
||||
set => SetValue(TextBoxStyleProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used by the gradient picker to load saved gradients, do not touch or it'll just throw an exception
|
||||
/// </summary>
|
||||
@@ -116,6 +132,16 @@ namespace Artemis.UI.Shared
|
||||
set => SetValue(ColorOpacityProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when dragging the color picker has started
|
||||
/// </summary>
|
||||
public event EventHandler? DragStarted;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when dragging the color picker has ended
|
||||
/// </summary>
|
||||
public event EventHandler? DragEnded;
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="PropertyChanged" /> event
|
||||
/// </summary>
|
||||
@@ -125,6 +151,22 @@ namespace Artemis.UI.Shared
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="DragStarted" /> event
|
||||
/// </summary>
|
||||
protected virtual void OnDragStarted()
|
||||
{
|
||||
DragStarted?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="DragEnded" /> event
|
||||
/// </summary>
|
||||
protected virtual void OnDragEnded()
|
||||
{
|
||||
DragEnded?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private static void ColorPropertyChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
ColorPicker colorPicker = (ColorPicker) d;
|
||||
@@ -245,7 +287,7 @@ namespace Artemis.UI.Shared
|
||||
|
||||
private void PopupOpened()
|
||||
{
|
||||
if (_colorPickerService != null)
|
||||
if (_colorPickerService != null)
|
||||
RecentColorsContainer.ItemsSource = new ObservableCollection<Color>(_colorPickerService.RecentColors);
|
||||
}
|
||||
|
||||
@@ -257,36 +299,5 @@ namespace Artemis.UI.Shared
|
||||
|
||||
/// <inheritdoc />
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when dragging the color picker has started
|
||||
/// </summary>
|
||||
public event EventHandler? DragStarted;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when dragging the color picker has ended
|
||||
/// </summary>
|
||||
public event EventHandler? DragEnded;
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="DragStarted" /> event
|
||||
/// </summary>
|
||||
protected virtual void OnDragStarted()
|
||||
{
|
||||
DragStarted?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="DragEnded" /> event
|
||||
/// </summary>
|
||||
protected virtual void OnDragEnded()
|
||||
{
|
||||
DragEnded?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:exceptions="clr-namespace:Artemis.UI.Shared.Screens.Exceptions"
|
||||
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
mc:Ignorable="d"
|
||||
Title="Unhandled exception"
|
||||
Background="{DynamicResource MaterialDesignPaper}"
|
||||
@@ -19,41 +20,49 @@
|
||||
d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance exceptions:ExceptionViewModel}">
|
||||
<DockPanel>
|
||||
<controls:AppBar Type="Dense" Title="{Binding Header}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False">
|
||||
<controls:AppBar Type="Dense" Title="{Binding Header, Mode=OneTime}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False">
|
||||
<controls:AppBar.AppIcon>
|
||||
<materialDesign:PackIcon Kind="ErrorOutline" Width="20" Height="28" />
|
||||
</controls:AppBar.AppIcon>
|
||||
</controls:AppBar>
|
||||
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="16">
|
||||
<StackPanel>
|
||||
<ItemsControl ItemsSource="{Binding Exceptions}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
||||
Text="Stack trace"
|
||||
TextWrapping="Wrap"
|
||||
FontWeight="Bold"
|
||||
MaxWidth="1000" />
|
||||
<Grid>
|
||||
<Grid Margin="15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<avalonedit:TextEditor SyntaxHighlighting="C#"
|
||||
FontFamily="pack://application:,,,/Resources/Fonts/#Roboto Mono"
|
||||
FontSize="10pt"
|
||||
IsReadOnly="True"
|
||||
Document="{Binding Document}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Margin="0 10 10 0"
|
||||
MaxHeight="500"
|
||||
Padding="10" />
|
||||
<materialDesign:Card Grid.Row="0" Grid.ColumnSpan="2" Margin="0 0 0 5">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="16">
|
||||
<TextBox Text="{Binding Exception, Mode=OneTime}"
|
||||
AcceptsReturn="True"
|
||||
IsReadOnly="True"
|
||||
FontFamily="Consolas"
|
||||
FontSize="12"
|
||||
materialDesign:TextFieldAssist.UnderlineBrush="Transparent"
|
||||
BorderThickness="0" />
|
||||
</ScrollViewer>
|
||||
</materialDesign:Card>
|
||||
|
||||
<Separator Margin="0 15" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" TextWrapping="Wrap" Margin="0 0 5 0" VerticalAlignment="Center">
|
||||
<materialDesign:PackIcon Kind="Text" Margin="0 0 0 -3" />
|
||||
When reporting errors please don't take a screenshot of the error, instead copy the text, thanks!
|
||||
</TextBlock>
|
||||
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 5 0 0">
|
||||
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action CopyException}" Width="150" Margin="0 0 5 0">
|
||||
COPY EXCEPTION
|
||||
</Button>
|
||||
<Button Style="{StaticResource MaterialDesignFlatMidBgButton}" Command="{s:Action Close}" Width="150" Margin="5 0 0 0">
|
||||
CLOSE
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<materialDesign:Snackbar MessageQueue="{Binding MessageQueue}"></materialDesign:Snackbar>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</controls:MaterialWindow>
|
||||
@@ -1,45 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ICSharpCode.AvalonEdit.Document;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Shared.Screens.Exceptions
|
||||
{
|
||||
internal class ExceptionViewModel : Screen
|
||||
{
|
||||
private List<DialogException> _exceptions;
|
||||
|
||||
public ExceptionViewModel(string message, Exception? exception)
|
||||
public ExceptionViewModel(string message, Exception exception)
|
||||
{
|
||||
Header = message;
|
||||
_exceptions = new List<DialogException>();
|
||||
|
||||
Exception? currentException = exception;
|
||||
while (currentException != null)
|
||||
{
|
||||
Exceptions.Add(new DialogException(currentException));
|
||||
currentException = currentException.InnerException;
|
||||
}
|
||||
Exception = exception.ToStringDemystified();
|
||||
MessageQueue = new SnackbarMessageQueue(TimeSpan.FromSeconds(2));
|
||||
}
|
||||
|
||||
public string Header { get; }
|
||||
public string Exception { get; }
|
||||
public SnackbarMessageQueue MessageQueue { get; }
|
||||
|
||||
public List<DialogException> Exceptions
|
||||
public void CopyException()
|
||||
{
|
||||
get => _exceptions;
|
||||
set => SetAndNotify(ref _exceptions, value);
|
||||
}
|
||||
}
|
||||
|
||||
internal class DialogException
|
||||
{
|
||||
public DialogException(Exception exception)
|
||||
{
|
||||
Exception = exception;
|
||||
Document = new TextDocument(new StringTextSource($"{exception.Message}\r\n\r\n{exception.StackTrace}"));
|
||||
Clipboard.SetText(Exception);
|
||||
MessageQueue.Enqueue("Copied exception to clipboard");
|
||||
}
|
||||
|
||||
public Exception Exception { get; }
|
||||
public IDocument Document { get; set; }
|
||||
public void Close()
|
||||
{
|
||||
RequestClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,15 +29,15 @@ namespace Artemis.UI.Shared.Services
|
||||
_pluginManagementService = pluginManagementService;
|
||||
}
|
||||
|
||||
private async Task<object> ShowDialog<T>(IParameter[] parameters) where T : DialogViewModelBase
|
||||
private async Task<object?> ShowDialog<T>(IParameter[] parameters) where T : DialogViewModelBase
|
||||
{
|
||||
if (parameters == null) throw new ArgumentNullException(nameof(parameters));
|
||||
return await ShowDialog("RootDialog", GetBestKernel().Get<T>(parameters));
|
||||
}
|
||||
|
||||
private async Task<object> ShowDialog(string? identifier, DialogViewModelBase viewModel)
|
||||
private async Task<object?> ShowDialog(string? identifier, DialogViewModelBase viewModel)
|
||||
{
|
||||
Task<object>? result = null;
|
||||
Task<object?>? result = null;
|
||||
await Execute.OnUIThreadAsync(() =>
|
||||
{
|
||||
UIElement view = _viewManager.CreateViewForModel(viewModel);
|
||||
@@ -54,7 +54,7 @@ namespace Artemis.UI.Shared.Services
|
||||
return await result;
|
||||
}
|
||||
|
||||
private async Task<object> ShowDialogAt<T>(string identifier, IParameter[] parameters) where T : DialogViewModelBase
|
||||
private async Task<object?> ShowDialogAt<T>(string identifier, IParameter[] parameters) where T : DialogViewModelBase
|
||||
{
|
||||
if (parameters == null)
|
||||
throw new ArgumentNullException(nameof(parameters));
|
||||
@@ -70,8 +70,8 @@ namespace Artemis.UI.Shared.Services
|
||||
new ConstructorArgument("confirmText", confirmText.ToUpper()),
|
||||
new ConstructorArgument("cancelText", cancelText.ToUpper())
|
||||
};
|
||||
object result = await ShowDialog<ConfirmDialogViewModel>(arguments);
|
||||
return (bool) result;
|
||||
object? result = await ShowDialog<ConfirmDialogViewModel>(arguments);
|
||||
return result is bool booleanResult && booleanResult;
|
||||
}
|
||||
|
||||
public async Task<bool> ShowConfirmDialogAt(string identifier, string header, string text, string confirmText = "Confirm", string cancelText = "Cancel")
|
||||
@@ -84,16 +84,16 @@ namespace Artemis.UI.Shared.Services
|
||||
new ConstructorArgument("confirmText", confirmText.ToUpper()),
|
||||
new ConstructorArgument("cancelText", cancelText.ToUpper())
|
||||
};
|
||||
object result = await ShowDialogAt<ConfirmDialogViewModel>(identifier, arguments);
|
||||
return (bool) result;
|
||||
object? result = await ShowDialogAt<ConfirmDialogViewModel>(identifier, arguments);
|
||||
return result is bool booleanResult && booleanResult;
|
||||
}
|
||||
|
||||
public async Task<object> ShowDialog<T>() where T : DialogViewModelBase
|
||||
public async Task<object?> ShowDialog<T>() where T : DialogViewModelBase
|
||||
{
|
||||
return await ShowDialog("RootDialog", GetBestKernel().Get<T>());
|
||||
}
|
||||
|
||||
public Task<object> ShowDialog<T>(Dictionary<string, object> parameters) where T : DialogViewModelBase
|
||||
public Task<object?> ShowDialog<T>(Dictionary<string, object> parameters) where T : DialogViewModelBase
|
||||
{
|
||||
if (parameters == null)
|
||||
throw new ArgumentNullException(nameof(parameters));
|
||||
@@ -102,13 +102,13 @@ namespace Artemis.UI.Shared.Services
|
||||
return ShowDialog<T>(paramsArray);
|
||||
}
|
||||
|
||||
public async Task<object> ShowDialogAt<T>(string identifier) where T : DialogViewModelBase
|
||||
public async Task<object?> ShowDialogAt<T>(string identifier) where T : DialogViewModelBase
|
||||
{
|
||||
if (identifier == null) throw new ArgumentNullException(nameof(identifier));
|
||||
return await ShowDialog(identifier, GetBestKernel().Get<T>());
|
||||
}
|
||||
|
||||
public async Task<object> ShowDialogAt<T>(string identifier, Dictionary<string, object> parameters) where T : DialogViewModelBase
|
||||
public async Task<object?> ShowDialogAt<T>(string identifier, Dictionary<string, object> parameters) where T : DialogViewModelBase
|
||||
{
|
||||
if (identifier == null) throw new ArgumentNullException(nameof(identifier));
|
||||
if (parameters == null) throw new ArgumentNullException(nameof(parameters));
|
||||
@@ -119,6 +119,7 @@ namespace Artemis.UI.Shared.Services
|
||||
|
||||
public void ShowExceptionDialog(string message, Exception exception)
|
||||
{
|
||||
if (exception == null) throw new ArgumentNullException(nameof(exception));
|
||||
_windowManager.ShowDialog(new ExceptionViewModel(message, exception));
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Artemis.UI.Shared.Services
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the view model</typeparam>
|
||||
/// <returns>A task resolving to the result of the dialog's <see cref="DialogSession" /></returns>
|
||||
Task<object> ShowDialog<T>() where T : DialogViewModelBase;
|
||||
Task<object?> ShowDialog<T>() where T : DialogViewModelBase;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a dialog by initializing a view model implementing <see cref="DialogViewModelBase" /> with arguments passed
|
||||
@@ -49,7 +49,7 @@ namespace Artemis.UI.Shared.Services
|
||||
/// <typeparam name="T">The type of the view model</typeparam>
|
||||
/// <param name="parameters">A dictionary of constructor arguments to pass to the view model</param>
|
||||
/// <returns>A task resolving to the result of the dialog's <see cref="DialogSession" /></returns>
|
||||
Task<object> ShowDialog<T>(Dictionary<string, object> parameters) where T : DialogViewModelBase;
|
||||
Task<object?> ShowDialog<T>(Dictionary<string, object> parameters) where T : DialogViewModelBase;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a dialog by initializing a view model implementing <see cref="DialogViewModelBase" />
|
||||
@@ -60,7 +60,7 @@ namespace Artemis.UI.Shared.Services
|
||||
/// <code><materialDesign:DialogHost Identifier="MyDialogHost"></code>
|
||||
/// </param>
|
||||
/// <returns>A task resolving to the result of the dialog's <see cref="DialogSession" /></returns>
|
||||
Task<object> ShowDialogAt<T>(string identifier) where T : DialogViewModelBase;
|
||||
Task<object?> ShowDialogAt<T>(string identifier) where T : DialogViewModelBase;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a dialog by initializing a view model implementing <see cref="DialogViewModelBase" /> with arguments passed
|
||||
@@ -73,7 +73,7 @@ namespace Artemis.UI.Shared.Services
|
||||
/// </param>
|
||||
/// <param name="parameters">A dictionary of constructor arguments to pass to the view model</param>
|
||||
/// <returns>A task resolving to the result of the dialog's <see cref="DialogSession" /></returns>
|
||||
Task<object> ShowDialogAt<T>(string identifier, Dictionary<string, object> parameters) where T : DialogViewModelBase;
|
||||
Task<object?> ShowDialogAt<T>(string identifier, Dictionary<string, object> parameters) where T : DialogViewModelBase;
|
||||
|
||||
/// <summary>
|
||||
/// Shows a dialog displaying the provided message and exception. Does not handle, log or throw the exception.
|
||||
|
||||
@@ -42,8 +42,8 @@ namespace Artemis.UI.Shared.Services
|
||||
/// <param name="actionArgument">Argument to pass to <paramref name="actionHandler" />.</param>
|
||||
void ShowMessage<TArgument>(
|
||||
object content,
|
||||
object actionContent,
|
||||
Action<TArgument> actionHandler,
|
||||
object? actionContent,
|
||||
Action<object?>? actionHandler,
|
||||
TArgument actionArgument);
|
||||
|
||||
/// <summary>
|
||||
@@ -63,7 +63,7 @@ namespace Artemis.UI.Shared.Services
|
||||
/// <param name="actionContent">Content for the action button.</param>
|
||||
/// <param name="actionHandler">Call back to be executed if user clicks the action button.</param>
|
||||
/// <param name="promote">The message will promoted to the front of the queue.</param>
|
||||
void ShowMessage(object content, object actionContent, Action actionHandler, bool promote);
|
||||
void ShowMessage(object content, object? actionContent, Action? actionHandler, bool promote);
|
||||
|
||||
/// <summary>
|
||||
/// Queues a notification message for display in a snackbar.
|
||||
@@ -75,8 +75,8 @@ namespace Artemis.UI.Shared.Services
|
||||
/// <param name="promote">The message will be promoted to the front of the queue and never considered to be a duplicate.</param>
|
||||
void ShowMessage<TArgument>(
|
||||
object content,
|
||||
object actionContent,
|
||||
Action<TArgument> actionHandler,
|
||||
object? actionContent,
|
||||
Action<TArgument?>? actionHandler,
|
||||
TArgument actionArgument,
|
||||
bool promote);
|
||||
|
||||
@@ -92,8 +92,8 @@ namespace Artemis.UI.Shared.Services
|
||||
/// <param name="durationOverride">Message show duration override.</param>
|
||||
void ShowMessage<TArgument>(
|
||||
object content,
|
||||
object actionContent,
|
||||
Action<TArgument> actionHandler,
|
||||
object? actionContent,
|
||||
Action<TArgument?>? actionHandler,
|
||||
TArgument actionArgument,
|
||||
bool promote,
|
||||
bool neverConsiderToBeDuplicate,
|
||||
@@ -111,8 +111,8 @@ namespace Artemis.UI.Shared.Services
|
||||
/// <param name="durationOverride">Message show duration override.</param>
|
||||
void ShowMessage(
|
||||
object content,
|
||||
object actionContent,
|
||||
Action<object> actionHandler,
|
||||
object? actionContent,
|
||||
Action<object?>? actionHandler,
|
||||
object actionArgument,
|
||||
bool promote,
|
||||
bool neverConsiderToBeDuplicate,
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Artemis.UI.Shared.Services
|
||||
MainMessageQueue.Enqueue(content, actionContent, actionHandler);
|
||||
}
|
||||
|
||||
public void ShowMessage<TArgument>(object content, object actionContent, Action<TArgument> actionHandler, TArgument actionArgument)
|
||||
public void ShowMessage<TArgument>(object content, object? actionContent, Action<object?>? actionHandler, TArgument actionArgument)
|
||||
{
|
||||
MainMessageQueue.Enqueue(content, actionContent, actionHandler, actionArgument);
|
||||
}
|
||||
@@ -39,19 +39,19 @@ namespace Artemis.UI.Shared.Services
|
||||
MainMessageQueue.Enqueue(content, neverConsiderToBeDuplicate);
|
||||
}
|
||||
|
||||
public void ShowMessage(object content, object actionContent, Action actionHandler, bool promote)
|
||||
public void ShowMessage(object content, object? actionContent, Action? actionHandler, bool promote)
|
||||
{
|
||||
MainMessageQueue.Enqueue(content, actionContent, actionHandler, promote);
|
||||
}
|
||||
|
||||
public void ShowMessage<TArgument>(object content, object actionContent, Action<TArgument> actionHandler, TArgument actionArgument, bool promote)
|
||||
public void ShowMessage<TArgument>(object content, object? actionContent, Action<TArgument?>? actionHandler, TArgument actionArgument, bool promote)
|
||||
{
|
||||
MainMessageQueue.Enqueue(content, actionContent, actionHandler, actionArgument, promote);
|
||||
}
|
||||
|
||||
public void ShowMessage<TArgument>(object content,
|
||||
object actionContent,
|
||||
Action<TArgument> actionHandler,
|
||||
object? actionContent,
|
||||
Action<TArgument?>? actionHandler,
|
||||
TArgument actionArgument,
|
||||
bool promote,
|
||||
bool neverConsiderToBeDuplicate,
|
||||
@@ -61,8 +61,8 @@ namespace Artemis.UI.Shared.Services
|
||||
}
|
||||
|
||||
public void ShowMessage(object content,
|
||||
object actionContent,
|
||||
Action<object> actionHandler,
|
||||
object? actionContent,
|
||||
Action<object?>? actionHandler,
|
||||
object actionArgument,
|
||||
bool promote,
|
||||
bool neverConsiderToBeDuplicate,
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
".NETCoreApp,Version=v5.0": {
|
||||
"AvalonEdit": {
|
||||
"Ben.Demystifier": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.0.1, )",
|
||||
"resolved": "6.0.1",
|
||||
"contentHash": "JmRwKMDRUUkUGLQmTtIHiSgFSQH9567b2/55Wa/gQp+ZtxQN+mnl5Qt6B/Kgz56FMnnDyE/fV23r7J2SV+NP7g=="
|
||||
"requested": "[0.3.0, )",
|
||||
"resolved": "0.3.0",
|
||||
"contentHash": "7mTSt0PLeXomarrTXdLcdYAg+zaOunw3KEvWKQ0fQaGySwqOzGxKVq8BDgUXWAyBH2hKhXldkG7uKJGkYBhDiw==",
|
||||
"dependencies": {
|
||||
"System.Reflection.Metadata": "5.0.0"
|
||||
}
|
||||
},
|
||||
"Humanizer.Core": {
|
||||
"type": "Direct",
|
||||
@@ -16,9 +19,9 @@
|
||||
},
|
||||
"MaterialDesignExtensions": {
|
||||
"type": "Direct",
|
||||
"requested": "[3.3.0-a01, )",
|
||||
"resolved": "3.3.0-a01",
|
||||
"contentHash": "dq8lvcj73H6TCmhjlRud8EeUSgC8S2U7T4jOoefmLieZQigbfQNy29hF1041cnu6b3l8mW00zWJituRMSt0iOQ==",
|
||||
"requested": "[3.3.0, )",
|
||||
"resolved": "3.3.0",
|
||||
"contentHash": "dlxWtdrMH8aHNib3dWJhNQ/nNiA2b/CNvr90w/5KB6erTisuTpyYVx2l2+UGCZvwhSX5mHTHQYHfjgAKbDrgjg==",
|
||||
"dependencies": {
|
||||
"MaterialDesignColors": "1.2.7",
|
||||
"MaterialDesignThemes": "3.2.0"
|
||||
@@ -26,18 +29,18 @@
|
||||
},
|
||||
"MaterialDesignThemes": {
|
||||
"type": "Direct",
|
||||
"requested": "[3.2.0, )",
|
||||
"resolved": "3.2.0",
|
||||
"contentHash": "aOZQShQuV7sCWOwO98dYz1S4stmIWDBH+Q6KoR3wDiDyuG7twoGnBDzQBhrxuS16I3GQiG5nfvUjEJFVc/zdKg==",
|
||||
"requested": "[4.0.0, )",
|
||||
"resolved": "4.0.0",
|
||||
"contentHash": "+n5oWHuRiYL/gUw2XfQHCRZqHtU8KbrdurgU0IcO98Zsyhw4BvggodfXY8veRtbjjmM9EJ/sG2yKBrgPOGX4JQ==",
|
||||
"dependencies": {
|
||||
"MaterialDesignColors": "[1.2.7, 2.0.0)"
|
||||
"MaterialDesignColors": "2.0.0"
|
||||
}
|
||||
},
|
||||
"Microsoft.Xaml.Behaviors.Wpf": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.1.19, )",
|
||||
"resolved": "1.1.19",
|
||||
"contentHash": "5sPWkbqImc2t1aQwIfJcKsUo7tOg1Tr8+6xVzZJB56Nzt4u9NlpcLofgdX/aRYpPKdWDA3U23Akw1KQzU5e82g=="
|
||||
"requested": "[1.1.31, )",
|
||||
"resolved": "1.1.31",
|
||||
"contentHash": "LZpuf82ACZWldmfMuv3CTUMDh3o0xo0uHUaybR5HgqVLDBJJ9RZLykplQ/bTJd0/VDt3EhD4iDgUgbdIUAM+Kg=="
|
||||
},
|
||||
"Ninject": {
|
||||
"type": "Direct",
|
||||
@@ -85,9 +88,9 @@
|
||||
},
|
||||
"Stylet": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.3.5, )",
|
||||
"resolved": "1.3.5",
|
||||
"contentHash": "9vjjaTgf5sZAGHnxQWIslD32MG5gXj7ANgS+w965L5Eh//UC3qwZDrEf226Pf+v1P/ldAJDpUySnOyGlb3TSSw==",
|
||||
"requested": "[1.3.6, )",
|
||||
"resolved": "1.3.6",
|
||||
"contentHash": "SISR+DsPrgBww3AI5FtHx1tD9VkEfJWZYu+ykq5EFM2o7Se9zxNR6FAa2g5QadQa90NKMYxn/VZEQRDo7/pdkw==",
|
||||
"dependencies": {
|
||||
"System.Drawing.Common": "4.6.0"
|
||||
}
|
||||
@@ -106,9 +109,9 @@
|
||||
},
|
||||
"Unclassified.NetRevisionTask": {
|
||||
"type": "Direct",
|
||||
"requested": "[0.3.0, )",
|
||||
"resolved": "0.3.0",
|
||||
"contentHash": "KwOAbbcAoaOIsyszuOv7ZeLEHfata70iM+0h1jMoMXs87EMXr5E8cFYRrCFbJDdd4Do9dK+L3gwNWjfg/ROUWw=="
|
||||
"requested": "[0.4.0, )",
|
||||
"resolved": "0.4.0",
|
||||
"contentHash": "2Tzz6qoQNciyO4uT6wxByMiyvbve+u4eFIiDewDUbeHuxr/rKuba3/EhhXDsEH9WoKzYlpzqxDfQGPE/bIe5Rw=="
|
||||
},
|
||||
"WriteableBitmapEx": {
|
||||
"type": "Direct",
|
||||
@@ -116,15 +119,6 @@
|
||||
"resolved": "1.6.7",
|
||||
"contentHash": "GoPhIdYzG/DWJq/MADb8gFzRN5PsxM+1DSJFS8Jzupg4DXqFSnlejYEjJw4ffPEUyELL07O4XIGUZydE4jQK0Q=="
|
||||
},
|
||||
"Ben.Demystifier": {
|
||||
"type": "Transitive",
|
||||
"resolved": "0.1.6",
|
||||
"contentHash": "sYI8+ANUo78i/vIq9Vjrjjl6A00yVbT6XsuSVvUMVRVEKJHXZu4VE00RZHg/CA7QxmaQ1zfw/Bs6DAU+OJUNAg==",
|
||||
"dependencies": {
|
||||
"System.Reflection.Metadata": "1.6.0",
|
||||
"System.Threading.Tasks.Extensions": "4.5.3"
|
||||
}
|
||||
},
|
||||
"Castle.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.2.0",
|
||||
@@ -157,13 +151,13 @@
|
||||
},
|
||||
"LiteDB": {
|
||||
"type": "Transitive",
|
||||
"resolved": "5.0.9",
|
||||
"contentHash": "cWnNWXL+qaP/qrkUCYZHBUJcv+IsfJfofa+Ed4EyT0zs/gkXqfKvjTbS3uSMBfcd9I7Yf+q9YPmCpmVFrVGQtw=="
|
||||
"resolved": "5.0.10",
|
||||
"contentHash": "x70WuqMDuP75dajqSLvO+AnI/BbwS6da+ukTO7rueV7VoXoQ5CRA9FV4r7cOS4OUr2NS1Up7LDIutjCxQycRvg=="
|
||||
},
|
||||
"MaterialDesignColors": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.2.7",
|
||||
"contentHash": "e+shDlaSAJcuTArqtfWjVUgAOlwQlgWq8akkzCGe1MvfV1ozmOqqXyWxg5w0vC/3/KZ84wnPUJeI1wzEpI0uJQ=="
|
||||
"resolved": "2.0.0",
|
||||
"contentHash": "+JoghC3QRK0u9Wul1To1ORjcfTbFTVzFPjJ02H7VREOdNzIIn427e8G9gP9hXu9pm1r2OneLnoCG/lTma5cG2w=="
|
||||
},
|
||||
"McMaster.NETCore.Plugins": {
|
||||
"type": "Transitive",
|
||||
@@ -268,8 +262,8 @@
|
||||
},
|
||||
"Newtonsoft.Json": {
|
||||
"type": "Transitive",
|
||||
"resolved": "12.0.3",
|
||||
"contentHash": "6mgjfnRB4jKMlzHSl+VD+oUc1IebOZabkbyWj2RiTgWwYPPuaK1H97G1sHqGwPlS5npiF5Q0OrxN1wni2n5QWg=="
|
||||
"resolved": "13.0.1",
|
||||
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
|
||||
},
|
||||
"Ninject.Extensions.ChildKernel": {
|
||||
"type": "Transitive",
|
||||
@@ -411,11 +405,10 @@
|
||||
},
|
||||
"Serilog.Sinks.Debug": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.0.1",
|
||||
"contentHash": "nE5wvw9+J/V4lA+rEkFUETGjBabK8IlLQY5Z9KDzoo5LvILC4vhTOXLs7DGYs8h5juIf2nLZnVxHDXf404FqEQ==",
|
||||
"resolved": "2.0.0",
|
||||
"contentHash": "Y6g3OBJ4JzTyyw16fDqtFcQ41qQAydnEvEqmXjhwhgjsnG/FaJ8GUqF5ldsC/bVkK8KYmqrPhDO+tm4dF6xx4A==",
|
||||
"dependencies": {
|
||||
"Serilog": "2.5.0",
|
||||
"System.Diagnostics.Debug": "4.3.0"
|
||||
"Serilog": "2.10.0"
|
||||
}
|
||||
},
|
||||
"Serilog.Sinks.File": {
|
||||
@@ -1237,8 +1230,13 @@
|
||||
},
|
||||
"System.Threading.Tasks.Extensions": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.5.3",
|
||||
"contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ=="
|
||||
"resolved": "4.3.0",
|
||||
"contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==",
|
||||
"dependencies": {
|
||||
"System.Collections": "4.3.0",
|
||||
"System.Runtime": "4.3.0",
|
||||
"System.Threading.Tasks": "4.3.0"
|
||||
}
|
||||
},
|
||||
"System.Threading.Timer": {
|
||||
"type": "Transitive",
|
||||
@@ -1322,19 +1320,19 @@
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"Artemis.Storage": "1.0.0",
|
||||
"Ben.Demystifier": "0.1.6",
|
||||
"Ben.Demystifier": "0.3.0",
|
||||
"EmbedIO": "3.4.3",
|
||||
"HidSharp": "2.1.0",
|
||||
"Humanizer.Core": "2.8.26",
|
||||
"LiteDB": "5.0.9",
|
||||
"LiteDB": "5.0.10",
|
||||
"McMaster.NETCore.Plugins": "1.3.1",
|
||||
"Newtonsoft.Json": "12.0.3",
|
||||
"Newtonsoft.Json": "13.0.1",
|
||||
"Ninject": "3.3.4",
|
||||
"Ninject.Extensions.ChildKernel": "3.3.0",
|
||||
"Ninject.Extensions.Conventions": "3.3.0",
|
||||
"Serilog": "2.10.0",
|
||||
"Serilog.Enrichers.Demystify": "1.0.0-dev-00019",
|
||||
"Serilog.Sinks.Debug": "1.0.1",
|
||||
"Serilog.Sinks.Debug": "2.0.0",
|
||||
"Serilog.Sinks.File": "4.1.0",
|
||||
"SkiaSharp": "2.80.2",
|
||||
"System.Buffers": "4.5.1",
|
||||
@@ -1347,7 +1345,7 @@
|
||||
"artemis.storage": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"LiteDB": "5.0.9",
|
||||
"LiteDB": "5.0.10",
|
||||
"Serilog": "2.10.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user