Exemplo n.º 1
0
        public static void Replay()
        {
            MacroManager manager = MacroManager.GetInstance();

            MacroEntry current = manager.GetCurrentMacro();

            Task.Run(() => current.Action(current));
        }
Exemplo n.º 2
0
        public static void Replay()
        {
            MacroManager manager = MacroManager.GetInstance();

            MacroEntry current = manager?.GetCurrentMacro();

            if (current?.Action == null)
            {
                return;
            }

            manager.Replay = true;

            Task.Run(() => current.Action(current));
        }
Exemplo n.º 3
0
        public static void PlayMacro(string name)
        {
            MacroManager manager = MacroManager.GetInstance();

            MacroEntry current = manager.GetCurrentMacro();

            if (current != null && current.IsBackground)
            {
                UOC.SystemMessage(Strings.Cannot_PlayMacro_from_background_macro___);
                return;
            }

            MacroEntry macro = manager.Items.FirstOrDefault(m => m.Name == name);

            if (macro == null)
            {
                UOC.SystemMessage(Strings.Unknown_macro___);
                return;
            }

            Task.Run(() => macro.Action(macro));
        }