예제 #1
0
        /// <summary>
        /// This method implements the command action.
        /// The command text is the Command property value.
        /// </summary>
        public override void Invoke(object sender, ModuleCommandEventArgs e)
        {
            try
            {

                string command = e.Command.Trim().ToUpper();

                if (ProcessMacros(command))
                    return;
                if (ProcessSpecialCommands(command))
                    return;

                ProcessShortcutCommand(command);
            }
            catch (Exception)
            {
                //TODO Senthil
            }
        }
예제 #2
0
파일: Module.cs 프로젝트: MoonDav/FarNet
 /// <summary>
 /// Command handler called from the command line with a prefix.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The arguments.</param>
 public abstract void Invoke(object sender, ModuleCommandEventArgs e);
예제 #3
0
파일: Entry.cs 프로젝트: pezipink/FarNet
 void OnCommandInvoke2(object sender, ModuleCommandEventArgs e)
 {
     string currentDirectory = A.Psf.SyncPaths();
     try
     {
         A.Psf.Act(e.Command, null, !e.IsMacro);
     }
     finally
     {
         A.SetCurrentDirectoryFinally(currentDirectory);
     }
 }
예제 #4
0
파일: Entry.cs 프로젝트: pezipink/FarNet
 void OnCommandInvoke1(object sender, ModuleCommandEventArgs e)
 {
     string currentDirectory = A.Psf.SyncPaths();
     try
     {
         A.Psf.Act(e.Command, new ConsoleOutputWriter(CommandInvoke1.Prefix + ":" + e.Command), !e.IsMacro);
     }
     finally
     {
         A.SetCurrentDirectoryFinally(currentDirectory);
     }
 }
예제 #5
0
파일: Module.cs 프로젝트: pezipink/FarNet
 /// <summary>
 /// Command handler called from the command line with a prefix.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The arguments.</param>
 public abstract void Invoke(object sender, ModuleCommandEventArgs e);