private void CodeMetricComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Cursor currentCursor = Cursor.Current;

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                CodeMetric codeMetric = this.codeMetricComboBox.ComboBox.SelectedItem as CodeMetric;
                if (codeMetric != null)
                {
                    CodeMetricView codeMetricView = new CodeMetricView(codeMetric, this.serviceProvider);

                    this.contentHost.Controls.Add(codeMetricView);
                    codeMetricView.Activate();

                    for (int i = this.contentHost.Controls.Count - 2; i >= 0; i--)
                    {
                        this.contentHost.Controls.RemoveAt(i);
                    }
                }
            }
            finally
            {
                Cursor.Current = currentCursor;
            }
        }
 private void CopyButton_Click(object sender, EventArgs e)
 {
     if (this.contentHost.Controls.Count == 1)
     {
         CodeMetricView view = this.contentHost.Controls[0] as CodeMetricView;
         if (view != null)
         {
             view.Copy();
         }
     }
 }