Fix server-client connection.
This commit is contained in:
@@ -11,7 +11,6 @@ namespace Wino.Server
|
||||
{
|
||||
base.OnStartup(e);
|
||||
|
||||
//create the notifyicon (it's a resource declared in NotifyIconResources.xaml
|
||||
notifyIcon = (TaskbarIcon)FindResource("NotifyIcon");
|
||||
notifyIcon.ForceCreate(enablesEfficiencyMode: true);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.AppService;
|
||||
using Windows.Foundation.Collections;
|
||||
|
||||
namespace Wino.Server
|
||||
{
|
||||
@@ -35,6 +36,13 @@ namespace Wino.Server
|
||||
}
|
||||
}
|
||||
|
||||
public async void SendMessage()
|
||||
{
|
||||
var set = new ValueSet();
|
||||
set.Add("Hello", "World");
|
||||
await connection.SendMessageAsync(set);
|
||||
}
|
||||
|
||||
private void OnConnectionClosed(AppServiceConnection sender, AppServiceClosedEventArgs args)
|
||||
{
|
||||
// TODO: Handle connection closed.
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Wino.Server
|
||||
[RelayCommand]
|
||||
public void LaunchWino()
|
||||
{
|
||||
_context.SendMessage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user