A
download MyTestResultViewControl.cs
Language: C#
License: MSVSSDK
LOC: 42
Project Info
C# Example.MyTestTypeSample
Server: Visual Studio SDK
Type: filesystem
...xtensibility\MyTest\MyTest\
   assembly.cs
   MyHostAdapter.cs
   ...pterRunConfigControl.cs
   ...nfigControl.Designer.cs
   ...erRunConfigControl.resx
   MyTest.cs
   MyTest.csproj
   MyTestAdapter.cs
   MyTestAssertHelper.cs
   MyTestEditorControl.cs
   ...itorControl.Designer.cs
   MyTestEditorControl.resx
   MyTestEditorFactory.cs
   MyTestPackage.cs
   MyTestResourceIds.cs
   MyTestResult.cs
   MyTestResultViewControl.cs
   ...ViewControl.designer.cs
   ...tResultViewControl.resx
   MyTestResultViewWindow.cs
   MyTestRunConfigControl.cs
   ...nfigControl.Designer.cs
   ...stRunConfigControl.resx
   MyTestTip.cs
   MyTestTuip.cs
   MyTestWizard.cs

/***************************************************************************
 
Copyright (c) Microsoft Corporation. All rights reserved.
This code is licensed under the Visual Studio SDK license terms.
THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
 
***************************************************************************/
// MyTestResultViewControl.cs
//
// This file defines the MyTestResultViewControl class.
//
// Copyright(c) Microsoft Corporation, 2004
//*************************************************************************************************

namespace Microsoft.VisualStudio.TestTools.Samples
{
	using System;
	using System.ComponentModel;
	using System.Windows.Forms;
	using System.Drawing;
	using System.Diagnostics;

	using Microsoft.VisualStudio.TestTools.Tips.TuipPackage;
	using Microsoft.VisualStudio.TestTools.Common;
	using Microsoft.VisualStudio.TestTools.Exceptions;
	using Microsoft.VisualStudio.TestTools.Vsip;

	using Microsoft.VisualStudio.Shell;

	/// <summary>
	/// MyTest result details view control implementation.
	/// Essentially a .NET control, this class displays result
	/// detail information.
	/// The important method to implement here is LoadResult,
	/// which is called to load the TestResult into the control.
	/// </summary>
	
	[ProvideToolWindow(typeof(MyTestResultViewControl), Transient = true)]
	internal sealed partial class MyTestResultViewControl: UserControl
	{
		#region Constructors

		internal MyTestResultViewControl()
		{
			InitializeComponent();
		}

		#endregion
		
		#region Properties

		/// <summary>
		/// Stores the result that this control is displaying
		/// </summary>
		internal MyTestResult Result
		{
			get { return m_result; }
		}

		#endregion

		#region Operations

		/// <summary>
		/// Load test result into control.
		/// </summary>
		/// <param name="result">The result to load</param>
		internal void LoadResult(MyTestResult result)
		{
			MyTestAssertHelper.ParameterNotNull(result, "result");

			// Clone the result so we can keep our local copy
			m_result = (MyTestResult)result.Clone();

			// Update result view elements.
			SuspendLayout();
			processExitCode.Text = result.ProcessExitCode2.ToString(System.Globalization.CultureInfo.CurrentCulture);
			ResumeLayout();
		}

		#endregion

		#region Private data

		// The test result that is being edited.
		private MyTestResult m_result;

		#endregion
	}
}

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us