Book Image

Team Foundation Server 2013 Customization

By : Gordon Beeming
Book Image

Team Foundation Server 2013 Customization

By: Gordon Beeming

Overview of this book

<p>Team Foundation Server offers you the benefit of having all your data in one system with all tools tightly integrated with each other, making it easier for teams to work together. Knowing how to customize the Team Foundation Server is very useful as well as powerful. Having the knowledge and applying it to TFS can save users many hours as well as make it easier to understand the data in TFS for reporting purposes.</p> <p>This book will show you how to customize various TFS features in order to create an enhanced experience for your users and improve their productivity. You will create custom controls that will be used in client applications and inside the web access. Next, you will learn how to embed a web page inside your work items to display rich information linked to the work items you are opening.</p> <p>This book will show you how to modify a team’s process template, and then slowly get to grips with some C# code and create a scheduled job.</p> <p>Using this book, you will create a JavaScript web access plugin that greatly increases productivity. You will start off by making various modifications to the process template to illustrate how we can cater to custom data requirements, and then we will move towards writing code to perform more complex customizations.</p> <p>Customizing Team Foundation Server 2013 is one of the best methods you can use to provide rich data for reporting in TFS.</p>
Table of Contents (13 chapters)
Team Foundation Server 2013 Customization
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a Windows Forms control


First, we will create a Windows Forms control that will be used while displaying inside Visual Studio and other client applications.

Writing the code

The first step would be to create a new class library called CustomTFSClientControls. This class library can be a .NET 4.0 library (you need to create class libraries that are able to target the Work Item Tracking assembly for each version of Visual Studio you are supporting). Add a reference to Microsoft.TeamFoundation.WorkItemTracking.Client.dll, Microsoft.TeamFoundation.WorkItemTracking.Controls.dll, and System.Windows.Forms.dll. Rename the Class1 file and class to TfsCheckbox. Now, we need to make our TfsCheckbox control inherit from System.Windows.Forms.CheckBox and Microsoft.TeamFoundation.WorkItemTracking.Controls.IWorkItemControl. Add the following static code to the class:

public TfsCheckbox()
{
    base.ThreeState = false;
    base.Checked = false;
    base.CheckedChanged += TfsCheckbox_CheckedChanged...