Exemple #1
0
 internal static void ExecCommand(SshClients.I_SshClient client, string commandText)
 {
     try
     {
         client.RunCommand(commandText);
     }
     catch (ArgumentException)
     {
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine(@" Erreur : votre commande est vide. ");
         Console.ForegroundColor = ConsoleColor.Gray;
     }
     catch (Exception ex)
     {
         Outil.Ecrire_Erreur(ex);
     }
 }
Exemple #2
0
        internal void GetStringFromExecCommand(SshClients.I_SshClient client, string commandText)
        {
            try
            {
                this.LastResult = client.RunCommand(commandText).Result;

                this.m_menu = new Menu(LastResult);
            }
            catch (ArgumentException)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(@" Erreur : votre commande est vide. ");
                Console.ForegroundColor = ConsoleColor.Gray;
            }
            catch (Exception ex)
            {
                Outil.Ecrire_Erreur(ex);
            }
        }