Exemplo n.º 1
0
        private void btnLaunch_Click(object sender, EventArgs e)
        {
            if (this.treeSites.SelectedNode == null)
            {
                MessageBox.Show("Please select an NAE to launch.");
                return;
            }

            if (this.treeSites.SelectedNode.Tag is NAE)
            {
                try
                {
                    NAE nae = (NAE)this.treeSites.SelectedNode.Tag;

                    if (!StaticIP.IsIPv4(nae.IPAddress))
                    {
                        MessageBox.Show("Please enter a valid IP address for the NAE.");
                        return;
                    }

                    nae.Launch();
                }
                catch (Exception ex)
                {
                    Logger.WriteMessage("Error in launching NAE.");
                    Logger.WriteException(ex);
                    Logger.PromptLogReview("There was an error launching the NAE.");
                }
            }
            else
            {
                MessageBox.Show("Please select an NAE to launch.");
                return;
            }
        }
Exemplo n.º 2
0
 private void launchToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         NAE nae = (NAE)this.treeSites.SelectedNode.Tag;
         nae.Launch();
     }
     catch (Exception ex)
     {
         Logger.WriteMessage("Failed to launch NAE.");
         Logger.WriteException(ex);
         Logger.PromptLogReview("Failed to launch NAE.");
     }
 }