Inheritance: System.EventArgs
コード例 #1
0
        public static void OnMaidClassAndYotogiUpdate(ref Maid currentMaid)
        {
            HookEventArgs args = new HookEventArgs {
                CallerMaid = currentMaid, Tag = MaidChangeType.MaidAndYotogiClass
            };

            ClassUpdated?.Invoke(null, args);
        }
コード例 #2
0
        public static void OnClassTypeUpdate(int tag, ref Maid currentMaid)
        {
            HookEventArgs args = new HookEventArgs {
                CallerMaid = currentMaid, Tag = (MaidChangeType)tag
            };

            ClassUpdated?.Invoke(null, args);
        }
コード例 #3
0
        private void OnClassUpdated(object sender, HookEventArgs args)
        {
            Debugger.WriteLine("Updating maid and/or yotogi class info.");
            MaidInfo maid = SelectedMaid;
            if (maid == null)
            {
                Debugger.WriteLine(LogLevel.Warning, "Maid is NULL!");
                return;
            }

            if (maid.Maid != args.CallerMaid)
            {
                Debugger.WriteLine(LogLevel.Warning, "Caller maid is not the selected one! Aborting...");
                return;
            }

            if (valueUpdateQueue[currentQueue].ContainsKey(args.Tag))
            {
                Debugger.WriteLine(LogLevel.Error, "Tag already in update queue! Aborting...");
                return;
            }
            switch (args.Tag)
            {
                case MaidChangeType.MaidClassType:
                    valueUpdateQueue[currentQueue].Add(args.Tag, () => maid.UpdateMaidClasses());
                    break;
                case MaidChangeType.YotogiClassType:
                    valueUpdateQueue[currentQueue].Add(args.Tag, () => maid.UpdateYotogiClasses());
                    break;
                case MaidChangeType.MaidAndYotogiClass:
                    valueUpdateQueue[currentQueue].Add(
                    args.Tag,
                    () =>
                    {
                        maid.UpdateMaidBonusValues();
                        maid.UpdateMaidClasses();
                        maid.UpdateYotogiClasses();
                    });
                    break;
            }
        }
コード例 #4
0
 public static void OnMaidClassAndYotogiUpdate(ref Maid currentMaid)
 {
     HookEventArgs args = new HookEventArgs {CallerMaid = currentMaid, Tag = MaidChangeType.MaidAndYotogiClass};
     ClassUpdated?.Invoke(args);
 }
コード例 #5
0
 public static void OnClassTypeUpdate(int tag, ref Maid currentMaid)
 {
     HookEventArgs args = new HookEventArgs {CallerMaid = currentMaid, Tag = (MaidChangeType) tag};
     ClassUpdated?.Invoke(args);
 }