committed by
GitHub
13 changed files with 114 additions and 13 deletions
@ -0,0 +1,7 @@ |
|||
namespace Avalonia.Platform |
|||
{ |
|||
public interface IApplicationPlatformEvents |
|||
{ |
|||
void RaiseUrlsOpened(string[] urls); |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using System; |
|||
|
|||
namespace Avalonia |
|||
{ |
|||
public class UrlOpenedEventArgs : EventArgs |
|||
{ |
|||
public UrlOpenedEventArgs(string[] urls) |
|||
{ |
|||
Urls = urls; |
|||
} |
|||
|
|||
public string[] Urls { get; } |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
using System; |
|||
using Avalonia.Native.Interop; |
|||
using Avalonia.Platform; |
|||
|
|||
namespace Avalonia.Native |
|||
{ |
|||
internal class AvaloniaNativeApplicationPlatform : CallbackBase, IAvnApplicationEvents |
|||
{ |
|||
void IAvnApplicationEvents.FilesOpened(IAvnStringArray urls) |
|||
{ |
|||
((IApplicationPlatformEvents)Application.Current).RaiseUrlsOpened(urls.ToStringArray()); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue