Skip to content

Commit 2e48759

Browse files
committed
add sprint start date
1 parent c65e0b9 commit 2e48759

19 files changed

Lines changed: 701 additions & 227 deletions

AzDOAddIn/AzDOAddIn/AzDOAddIn.csproj

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,37 @@
2626
<NoStandardLibraries>false</NoStandardLibraries>
2727
<RootNamespace>AzDOAddIn</RootNamespace>
2828
<AssemblyName>AzDOAddIn</AssemblyName>
29-
<LoadBehavior>3</LoadBehavior>
30-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
29+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
3130
<DefineConstants>VSTO40</DefineConstants>
32-
<BootstrapperEnabled>true</BootstrapperEnabled>
33-
<BootstrapperComponentsLocation>HomeSite</BootstrapperComponentsLocation>
3431
<TargetFrameworkProfile />
32+
<BootstrapperEnabled>true</BootstrapperEnabled>
33+
<PublishUrl>publish\</PublishUrl>
34+
<InstallUrl />
35+
<TargetCulture>en</TargetCulture>
36+
<ApplicationVersion>1.0.0.0</ApplicationVersion>
37+
<AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
38+
<UpdateEnabled>true</UpdateEnabled>
39+
<UpdateInterval>7</UpdateInterval>
40+
<UpdateIntervalUnits>days</UpdateIntervalUnits>
41+
<IsWebBootstrapper>False</IsWebBootstrapper>
42+
<ProductName>AzDOAddIn</ProductName>
43+
<PublisherName />
44+
<SupportUrl />
45+
<FriendlyName>AzDOAddIn</FriendlyName>
46+
<OfficeApplicationDescription />
47+
<LoadBehavior>3</LoadBehavior>
3548
</PropertyGroup>
3649
<ItemGroup>
50+
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
51+
<Visible>False</Visible>
52+
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
53+
<Install>true</Install>
54+
</BootstrapperPackage>
55+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
56+
<Visible>False</Visible>
57+
<ProductName>.NET Framework 3.5 SP1</ProductName>
58+
<Install>false</Install>
59+
</BootstrapperPackage>
3760
<BootstrapperPackage Include="Microsoft.VSTORuntime.4.0">
3861
<Visible>False</Visible>
3962
<ProductName>Microsoft Visual Studio 2010 Tools for Office Runtime %28x86 and x64%29</ProductName>
@@ -101,8 +124,8 @@
101124
-->
102125
<ItemGroup>
103126
<Reference Include="Accessibility" />
104-
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
105-
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
127+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
128+
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
106129
</Reference>
107130
<Reference Include="System" />
108131
<Reference Include="System.Data" />
@@ -166,6 +189,12 @@
166189
<Compile Include="Forms\GetWorkItemsForm.Designer.cs">
167190
<DependentUpon>GetWorkItemsForm.cs</DependentUpon>
168191
</Compile>
192+
<Compile Include="Forms\SettingsForm.cs">
193+
<SubType>Form</SubType>
194+
</Compile>
195+
<Compile Include="Forms\SettingsForm.Designer.cs">
196+
<DependentUpon>SettingsForm.cs</DependentUpon>
197+
</Compile>
169198
<Compile Include="Forms\Teams.cs">
170199
<SubType>Form</SubType>
171200
</Compile>
@@ -185,13 +214,17 @@
185214
<DependentUpon>WorkItemTypes.cs</DependentUpon>
186215
</Compile>
187216
<Compile Include="PatHelper.cs" />
217+
<Compile Include="PlanSettings.cs" />
188218
<Compile Include="ProjectOperations.cs" />
189219
<Compile Include="Properties\AssemblyInfo.cs">
190220
<SubType>Code</SubType>
191221
</Compile>
192222
<EmbeddedResource Include="Forms\GetWorkItemsForm.resx">
193223
<DependentUpon>GetWorkItemsForm.cs</DependentUpon>
194224
</EmbeddedResource>
225+
<EmbeddedResource Include="Forms\SettingsForm.resx">
226+
<DependentUpon>SettingsForm.cs</DependentUpon>
227+
</EmbeddedResource>
195228
<EmbeddedResource Include="Forms\Teams.resx">
196229
<DependentUpon>Teams.cs</DependentUpon>
197230
</EmbeddedResource>
@@ -228,6 +261,7 @@
228261
<DependentUpon>Settings.settings</DependentUpon>
229262
<DesignTimeSharedInput>True</DesignTimeSharedInput>
230263
</Compile>
264+
<Compile Include="RestApiClasses\ClassificationNode.cs" />
231265
<Compile Include="RestApiClasses\TeamMember.cs" />
232266
<Compile Include="RestApiClasses\TeamProjectReference.cs" />
233267
<Compile Include="RestApiClasses\WebApiTeam.cs" />
@@ -272,6 +306,9 @@
272306
<ItemGroup>
273307
<Resource Include="Resources\inbox.png" />
274308
</ItemGroup>
309+
<ItemGroup>
310+
<Content Include="Resources\settings.png" />
311+
</ItemGroup>
275312
<PropertyGroup>
276313
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
277314
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
@@ -283,7 +320,14 @@
283320
<ManifestKeyFile>AzDOAddIn_TemporaryKey.pfx</ManifestKeyFile>
284321
</PropertyGroup>
285322
<PropertyGroup>
286-
<ManifestCertificateThumbprint>D2339B9DC8C748DE2B71459F6A1F5485149818B9</ManifestCertificateThumbprint>
323+
<ManifestCertificateThumbprint>6911D36C3C7441CA656C152D7CC3172F4573C997</ManifestCertificateThumbprint>
324+
</PropertyGroup>
325+
<PropertyGroup>
326+
<SignAssembly>false</SignAssembly>
327+
</PropertyGroup>
328+
<PropertyGroup>
329+
<AssemblyOriginatorKeyFile>
330+
</AssemblyOriginatorKeyFile>
287331
</PropertyGroup>
288332
<!-- Include the build rules for a C# project. -->
289333
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

AzDOAddIn/AzDOAddIn/AzDOAddInSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static class PlanDocProperties
4646
public const string AzDoUrl = "Azure DevOps Service URL";
4747
public const string AzDoTeamProject = "Azure DevOps Team Project";
4848
public const string AzDoWorkItemTypes = "Azure DevOps Work Item Types";
49+
public const string PlanningSettings = "Azure DevOps Planning Settings";
4950
}
5051

5152
public static class PlanCoreColumns

AzDOAddIn/AzDOAddIn/AzDORestApiHelper.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Threading.Tasks;
1010
using AzDOAddIn.RestApiClasses;
1111
using Microsoft.Office.Interop.MSProject;
12+
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
1213

1314
namespace AzDOAddIn
1415
{
@@ -172,10 +173,18 @@ public static WorkItem PatchWorkItem(string azDoUrl, string teamProject, string
172173
return InvokeRestApiRequest<WorkItem>(RequestMethod.PATCH, requestUrl, body, pat);
173174
}
174175

176+
public static ClassificationNode GetIterationNode(string azDoUrl, string teamProject, string pat, string path)
177+
{
178+
string requestUrl = string.Format("{0}/{1}/_apis/wit/classificationnodes/Iterations/{2}?api-version={3}", azDoUrl, teamProject, path, RestApiVersion);
179+
180+
return InvokeRestApiRequest<ClassificationNode>(RequestMethod.GET, requestUrl, pat: pat);
181+
}
182+
175183
static T InvokeRestApiRequest<T>(string requestMethod, string requestUrl, string requestBody = "", string pat = "")
176184
{
177185
HttpResponseMessage requestResponse = null;
178186
string responceContent = null;
187+
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
179188

180189
HttpClient httpClient;
181190
if (pat != "")

AzDOAddIn/AzDOAddIn/Forms/SettingsForm.Designer.cs

Lines changed: 107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Data;
5+
using System.Drawing;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Threading.Tasks;
9+
using System.Windows.Forms;
10+
11+
namespace AzDOAddIn.Forms
12+
{
13+
public partial class SettingsForm : Form
14+
{
15+
public bool useSprintStartDate = false;
16+
public SettingsForm()
17+
{
18+
InitializeComponent();
19+
}
20+
21+
public void UpdateSettingsValues(PlanningSettings planningSettings)
22+
{
23+
if (planningSettings != null)
24+
{
25+
chkUseSprintStartDate.Checked = planningSettings.useSprintStartDate;
26+
}
27+
}
28+
29+
private void btnSave_Click(object sender, EventArgs e)
30+
{
31+
useSprintStartDate = chkUseSprintStartDate.Checked;
32+
this.DialogResult = DialogResult.OK;
33+
this.Close();
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)