Пример #1
0
 public void Run(String[] args)
 {
     Log.InfoFormat("Received remote Run command: [{0}]", String.Join(" ", args));
     CommandLineOptions cmd = new CommandLineOptions(args);
     SessionDataStartInfo ssi = cmd.ToSessionStartInfo();
     SuperPuTTY.OpenSession(ssi);
 }
Пример #2
0
        /// <summary>Open a new session</summary>
        /// <param name="arg">The name of ID of the session to start</param>
        /// <returns>null</returns>
        internal static CommandData OpenSessionHandler(string arg)
        {
            SessionData session = SuperPuTTY.GetSessionById(arg);

            if (session != null)
            {
                SuperPuTTY.OpenSession(new SessionDataStartInfo()
                {
                    Session = session
                });
            }
            else
            {
                Log.WarnFormat("Could not start session named {0}, does it exist?", arg);
            }
            return(null);
        }