Ejemplo n.º 1
0
        public void EditPatchClicked(int index)
        {
            Panel.SetPage(HookManagerPanel.Pages.HookSourceEditor);
            var hook = (HookInstance)currentHooks[index];

            currentEditedHook      = hook;
            Panel.EditorInput.Text = hook.PatchSourceCode;
        }
Ejemplo n.º 2
0
        public void EditorInputSave()
        {
            var  input      = Panel.EditorInput.Text;
            bool wasEnabled = currentEditedHook.Enabled;

            if (currentEditedHook.CompileAndGenerateProcessor(input))
            {
                if (wasEnabled)
                {
                    currentEditedHook.Patch();
                }
                currentEditedHook.PatchSourceCode = input;
                currentEditedHook = null;
                Panel.SetPage(HookManagerPanel.Pages.CurrentHooks);
            }
        }
Ejemplo n.º 3
0
        public void AddHook(MethodInfo method)
        {
            var sig = method.FullDescription();

            if (hookedSignatures.Contains(sig))
            {
                return;
            }

            var hook = new HookInstance(method);

            if (hook.Enabled)
            {
                hookedSignatures.Add(sig);
                currentHooks.Add(sig, hook);
            }
        }
Ejemplo n.º 4
0
 public void EditorInputCancel()
 {
     currentEditedHook = null;
     Panel.SetPage(HookManagerPanel.Pages.CurrentHooks);
 }