/// <summary> /// An event handler called when a PlanetLab subcommand finished successfully. /// </summary> /// <param name="sender">The sender object.</param> /// <param name="e">The event arguments.</param> private void OnSubcommandSuccess(object sender, PlManagerSubcommandEventArgs e) { this.Invoke(() => { // If the subcommand was successful. if ((e.Subcommand.Exception == null) && (e.Subcommand.Result != null) && (e.Subcommand.ExitStatus == 0)) { // Send the result command to the tools. this.OnSendResultTools(e.Subcommand); } // If the selected result node equals the current node. if (e.Node.Hostname == this.comboBoxNodes.SelectedItem as string) { // Update the result subcommands. this.OnAddResult(e.Subcommand); } }); }
/// <summary> /// An event handler called when a PlanetLab command finished with failure. /// </summary> /// <param name="sender">The sender object.</param> /// <param name="e">The event arguments.</param> private void OnSubcommandFail(object sender, PlManagerSubcommandEventArgs e) { this.Invoke(() => { // If the selected result node equals the current node. if (e.Node.Hostname == this.comboBoxNodes.SelectedItem as string) { // Update the result subcommands. this.OnAddResult(e.Subcommand); } }); }