Beispiel #1
0
            private void NativeCallback(csbool connected, int userId, int controllerIndex)
            {
                var evnt = managed.Delegate;

                if (evnt != null)
                {
                    evnt(connected, userId, controllerIndex);
                }
            }
Beispiel #2
0
 /// <summary>
 /// Parse a quoted string token.
 /// </summary>
 public static bool QuotedString(string str, out string value, out int numCharsRead)
 {
     using (FStringUnsafe strUnsafe = new FStringUnsafe(str))
         using (FStringUnsafe resultUnsafe = new FStringUnsafe())
         {
             csbool result = Native_FParse.QuotedString(ref strUnsafe.Array, ref resultUnsafe.Array, out numCharsRead);
             value = resultUnsafe.Value;
             return(result);
         }
 }
Beispiel #3
0
 /// <summary>
 /// Parses a boolean value.
 /// </summary>
 public static bool Value(string str, string match, ref bool value)
 {
     using (FStringUnsafe strUnsafe = new FStringUnsafe(str))
         using (FStringUnsafe matchUnsafe = new FStringUnsafe(match))
         {
             csbool val    = false;
             bool   result = Native_FParse.Bool(ref strUnsafe.Array, ref matchUnsafe.Array, ref val);
             value = val;
             return(result);
         }
 }
Beispiel #4
0
 private void NativeCallback(ref FName package, csbool canProcessNewlyLoadedObjects)
 {
     try
     {
         var evnt = managed.Delegate;
         if (evnt != null)
         {
             evnt(package, canProcessNewlyLoadedObjects);
         }
     }
     catch (Exception e)
     {
         FMessage.LogDelegateException(e);
     }
 }
Beispiel #5
0
 private void NativeCallback(csbool connected, int userId, int controllerIndex)
 {
     try
     {
         var evnt = managed.Delegate;
         if (evnt != null)
         {
             evnt(connected, userId, controllerIndex);
         }
     }
     catch (Exception e)
     {
         FMessage.LogDelegateException(e);
     }
 }
 public FImplementedInterface(IntPtr interfaceClass, int pointerOffset, bool implementedByK2)
 {
     InterfaceClassAddress = interfaceClass;
     PointerOffset = pointerOffset;
     ImplementedByK2 = implementedByK2;
 }