fix: fix warnings in test related code.
This commit is contained in:
@@ -162,10 +162,11 @@ public class PinCode: TemplatedControl
|
|||||||
protected async void OnPreviewKeyDown(KeyEventArgs e)
|
protected async void OnPreviewKeyDown(KeyEventArgs e)
|
||||||
{
|
{
|
||||||
TextBox b = new TextBox();
|
TextBox b = new TextBox();
|
||||||
var pasteKeys = Application.Current?.PlatformSettings.HotkeyConfiguration.Paste;
|
var pasteKeys = Application.Current?.PlatformSettings?.HotkeyConfiguration.Paste;
|
||||||
if (pasteKeys?.Any(a => a.Matches(e)) == true)
|
if (pasteKeys?.Any(a => a.Matches(e)) == true)
|
||||||
{
|
{
|
||||||
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
|
var clipboard = TopLevel.GetTopLevel(this)?.Clipboard;
|
||||||
|
if (clipboard is null) return;
|
||||||
var text = await clipboard.GetTextAsync();
|
var text = await clipboard.GetTextAsync();
|
||||||
if (text is not null)
|
if (text is not null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class UrsaWindowTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
[AvaloniaFact]
|
[AvaloniaFact]
|
||||||
public async void Inferenced_Window_Closing_Called_Once_When_Yes()
|
public void Inferenced_Window_Closing_Called_Once_When_Yes()
|
||||||
{
|
{
|
||||||
var window = new UrsaWindowWithCloseInference();
|
var window = new UrsaWindowWithCloseInference();
|
||||||
window.Show();
|
window.Show();
|
||||||
@@ -29,7 +29,7 @@ public class UrsaWindowTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
[AvaloniaFact]
|
[AvaloniaFact]
|
||||||
public async void Inferenced_Window_Closing_Called_Once_When_No()
|
public void Inferenced_Window_Closing_Called_Once_When_No()
|
||||||
{
|
{
|
||||||
var window = new UrsaWindowWithCloseInference();
|
var window = new UrsaWindowWithCloseInference();
|
||||||
window.Show();
|
window.Show();
|
||||||
|
|||||||
Reference in New Issue
Block a user