Alaska Software Inc. - c2xsharp
Username: Password:
AuthorTopic: c2xsharp
Zdenko Bielikc2xsharp
on Wed, 23 Jan 2019 13:23:25 +0100
Hi,

one my friend needs translate this C code to
XSharp(https://www.xsharp.info).
Please, can someone help him(me) with this?

problem is especially with this line:

var e1 = new KeyEventArgs(Keyboard.PrimaryDevice,
Keyboard.PrimaryDevice.ActiveSource, 0, Key.Down) { RoutedEvent =
Keyboard.KeyDownEvent };


TIA & Regards
                           Zdeno



toto je v c#

public static class SendKeys
   {
       /// <summary>
       ///   Sends the specified key.
       /// </summary>
       /// <param name="key">The key.</param>
       public static void Send(Key key)
       {
               if (Keyboard.PrimaryDevice != null)
               {
                   if (Keyboard.PrimaryDevice.ActiveSource != null)
                   {
                      var e1 = new KeyEventArgs(Keyboard.PrimaryDevice,
Keyboard.PrimaryDevice.ActiveSource, 0, Key.Down) { RoutedEvent =
Keyboard.KeyDownEvent };
                       InputManager.Current.ProcessInput(e1);
                   }
               }
       }
   }