Undo() public static method

Undo previous action
public static Undo ( ) : void
return void
Exemplo n.º 1
0
Arquivo: Plug.cs Projeto: devjerome/3P
        /// <summary>
        /// Called when the user enters any character in npp
        /// </summary>
        /// <param name="c"></param>
        public static void OnSciCharTyped(char c)
        {
            // CTRL + S : char code 19
            if (c == (char)19)
            {
                Npp.Undo();
                Npp.SaveCurrentDocument();
                return;
            }

            // we are still entering a keyword
            if (Abl.IsCharAllowedInVariables(c))
            {
                ActionsAfterUpdateUi.Enqueue(() => {
                    OnCharAddedWordContinue(c);
                });
            }
            else
            {
                ActionsAfterUpdateUi.Enqueue(() => {
                    OnCharAddedWordEnd(c);
                });
            }
        }