<commit_before># Acrolinx .NET Sidebar Demo

Demo code for an integration of the Acrolinx sidebar into a .NET application

## Prerequisites

Please contact Acrolinx SDK support (<EMAIL>) for initial consulting. 
We like to schedule a kickoff meeting to answer any questions about your integration project. 
After the meeting, we provide you with test server credentials and configuration settings you need to get started.

## Configuration of the Sample

The Acrolinx Server checks if a connecting client is allowed to connect.  To enable this you must provide a valid client signature. 
This can be done either by using the Visual Studio Designer (described in [How to use the Sidebar in Your Integration]) or by editing the code:

In the two files:

* `Acrolinx.Demo.Sidebar\MultiSample.Designer.cs`
* `Acrolinx.Demo.Sidebar\SimpleSample.Designer.cs`

find the line:

	// acrolinxSidebar

and add the following line:

	this.acrolinxSidebar.ClientSignature = "";

with the signature provided by Acrolinx.

## How to Start

First make sure that you have installed at least Microsoft Visual Studio 2013 with C# support.

As the Acrolinx Sidebar performs static code analysis to improve quality, you also have to install Code Contracts for .NET:

https://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970

Open the solution file `Acrolinx.Sidebar.Net.sln` with Visual Studio.

Run the solution.
 
Visual Studio downloads the required dependencies and compiles the Acrolinx .NET Sidebar solution using nuget (https://www.nuget.org/).
(Note: The dependency download may fail the on the first build. This problem can usually be solved by building a second time.)

![Screen Shot of .NET Sidebar Example](/doc/sample.png)

## How to Use the Sidebar in Your Integration

After the Acrolinx .NET Sidebar has been compiled, you can start using it in your project: In the Designer View of your form, reference the file `Acrolinx.Sidebar.dll` using the "Choose Items" function of the Toolbox:

![Choose Items](/doc/chooseitems.png)

You should be able to drag and drop the Acrolinx sidebar to your form:

![Toolbox](/doc/toolbox.png)

Usually you dock (Properties->Layout->Dock->Right) the Acrolinx sidebar to the right side of your form or some child panel:
<commit_msg>VS 2013 -> 2015<commit_after># Acrolinx .NET Sidebar Demo

Demo code for an integration of the Acrolinx sidebar into a .NET application

## Prerequisites

Please contact Acrolinx SDK support (<EMAIL>) for initial consulting. 
We like to schedule a kickoff meeting to answer any questions about your integration project. 
After the meeting, we provide you with test server credentials and configuration settings you need to get started.

## Configuration of the Sample

The Acrolinx Server checks if a connecting client is allowed to connect.  To enable this you must provide a valid client signature. 
This can be done either by using the Visual Studio Designer (described in [How to use the Sidebar in Your Integration]) or by editing the code:

In the two files:

* `Acrolinx.Demo.Sidebar\MultiSample.Designer.cs`
* `Acrolinx.Demo.Sidebar\SimpleSample.Designer.cs`

find the line:

	// acrolinxSidebar

and add the following line:

	this.acrolinxSidebar.ClientSignature = "";

with the signature provided by Acrolinx.

## How to Start

First make sure that you have installed at least Microsoft Visual Studio 2015 with C# support.

As the Acrolinx Sidebar performs static code analysis to improve quality, you also have to install Code Contracts for .NET:

https://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970

Open the solution file `Acrolinx.Sidebar.Net.sln` with Visual Studio.

Run the solution.
 
Visual Studio downloads the required dependencies and compiles the Acrolinx .NET Sidebar solution using nuget (https://www.nuget.org/).
(Note: The dependency download may fail the on the first build. This problem can usually be solved by building a second time.)

![Screen Shot of .NET Sidebar Example](/doc/sample.png)

## How to Use the Sidebar in Your Integration

After the Acrolinx .NET Sidebar has been compiled, you can start using it in your project: In the Designer View of your form, reference the file `Acrolinx.Sidebar.dll` using the "Choose Items" function of the Toolbox:

![Choose Items](/doc/chooseitems.png)

You should be able to drag and drop the Acrolinx sidebar to your form:

![Toolbox](/doc/toolbox.png)

Usually you dock (Properties->Layout->Dock->Right) the Acrolinx sidebar to the right side of your form or some child panel:

{'fraction_non_alphanumeric': 0.0621172353455818, 'fraction_numerical': 0.013560804899387576, 'mean_word_length': 4.489795918367347, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6128758', 'n_tokens_mistral': 1330, 'n_tokens_neox': 1243, 'n_words': 618}