public static void ChangeCopyAcsPostfix(CvsAccessoryChange __instance)
            {
                var traverse = Traverse.Create(__instance);
                var selSrc   = traverse.Field("selSrc").GetValue <int>();
                var selDst   = traverse.Field("selDst").GetValue <int>();

                OnChangeAcs(__instance, selSrc, selDst);
            }
Esempio n. 2
0
        private static void OnChangeAcs(CvsAccessoryChange instance)
        {
            if (AccessoryTransferred == null)
            {
                return;
            }

            try
            {
                var traverse = Traverse.Create(instance);
                var selSrc   = traverse.Field("selSrc").GetValue <int>();
                var selDst   = traverse.Field("selDst").GetValue <int>();

                var args = new AccessoryTransferEventArgs(selSrc, selDst);

                AccessoryTransferred(instance, args);
            }
            catch (Exception ex)
            {
                KoikatuAPI.Log(LogLevel.Error, "Crash in AccessoryTransferred event: " + ex);
            }
        }
Esempio n. 3
0
 public static void ChangeCopyAcsPostfix(CvsAccessoryChange __instance)
 {
     OnChangeAcs(__instance);
 }
 public static void ChangeCopyAcsPostfix(CvsAccessoryChange __instance)
 {
     OnChangeAcs(__instance, __instance.selSrc, __instance.selDst);
 }