mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-26 04:19:53 +08:00
Small fixes for UWP apps, mainly polish.
-Move command button in status bar -fix a ui thread exception -clean up Publisher server list
This commit is contained in:
+14
-2
@@ -33,6 +33,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.UI.Core;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Opc.Ua.Client.Controls
|
||||
@@ -190,12 +191,23 @@ namespace Opc.Ua.Client.Controls
|
||||
// return new item.
|
||||
return listItem;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Updates the list of servers displayed in the control.
|
||||
/// </summary>
|
||||
private void OnUpdateServers(object state)
|
||||
private async void OnUpdateServers(object state)
|
||||
{
|
||||
if (!Dispatcher.HasThreadAccess)
|
||||
{
|
||||
await Dispatcher.RunAsync(
|
||||
CoreDispatcherPriority.Normal,
|
||||
() =>
|
||||
{
|
||||
OnUpdateServers(state);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
ItemsLV.Items.Clear();
|
||||
|
||||
ApplicationDescriptionCollection servers = state as ApplicationDescriptionCollection;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" >
|
||||
<ComboBox x:Name="EndpointCB" KeyDown="EndpointCB_KeyDown" HorizontalAlignment="Stretch" Margin="10,10,110,0" VerticalAlignment="Top" SelectionChanged="EndpointCB_SelectionChanged" PointerPressed="EndpointCB_PointerPressed"/>
|
||||
<ComboBox x:Name="EndpointCB" KeyDown="EndpointCB_KeyDown" HorizontalAlignment="Stretch" Margin="10,10,120,0" VerticalAlignment="Top" SelectionChanged="EndpointCB_SelectionChanged" PointerPressed="EndpointCB_PointerPressed"/>
|
||||
<Button x:Name="ConnectB" Content="Connect" HorizontalAlignment="Right" Height="30" VerticalAlignment="Top" Width="100" Margin="0,10,10,0" Click="ConnectButton_Click" />
|
||||
<TextBox x:Name="InputTB" HorizontalAlignment="Stretch" Margin="10,10,110,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Visibility="Collapsed" LostFocus="InputTB_LostFocus" KeyDown="InputTB_KeyDown"/>
|
||||
<TextBox x:Name="InputTB" HorizontalAlignment="Stretch" Margin="10,10,120,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Visibility="Collapsed" LostFocus="InputTB_LostFocus" KeyDown="InputTB_KeyDown"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user