Added missing files from pull-request and updated the readme.txt

This commit is contained in:
Robin 2016-08-17 14:37:00 +02:00
commit 945fd1db46
7 changed files with 38 additions and 41 deletions

View file

@ -67,7 +67,7 @@ namespace GreenshotJiraPlugin.Forms {
this.jiraFilterBox.Name = "jiraFilterBox";
this.jiraFilterBox.Size = new System.Drawing.Size(604, 21);
this.jiraFilterBox.TabIndex = 5;
this.jiraFilterBox.SelectedIndexChanged += new System.EventHandler(this.jiraFilterBox_SelectedIndexChanged);
this.jiraFilterBox.SelectedIndexChanged += new System.EventHandler(this.JiraFilterBox_SelectedIndexChanged);
//
// label_jirafilter
//
@ -112,8 +112,8 @@ namespace GreenshotJiraPlugin.Forms {
this.jiraListView.TabIndex = 4;
this.jiraListView.UseCompatibleStateImageBehavior = false;
this.jiraListView.View = System.Windows.Forms.View.Details;
this.jiraListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.jiraListView_ColumnClick);
this.jiraListView.SelectedIndexChanged += new System.EventHandler(this.jiraListView_SelectedIndexChanged);
this.jiraListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.JiraListView_ColumnClick);
this.jiraListView.SelectedIndexChanged += new System.EventHandler(this.JiraListView_SelectedIndexChanged);
//
// jiraFilenameBox
//

View file

@ -29,6 +29,7 @@ using GreenshotPlugin.Core;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Dapplo.Jira;
namespace GreenshotJiraPlugin.Forms {
public partial class JiraForm : Form {
@ -111,10 +112,6 @@ namespace GreenshotJiraPlugin.Forms {
jiraFilenameBox.Text = filename;
}
public void SetComment(string comment) {
jiraCommentBox.Text = comment;
}
public Issue GetJiraIssue() {
return _selectedIssue;
}
@ -133,13 +130,7 @@ namespace GreenshotJiraPlugin.Forms {
}
}
private void selectJiraToolStripMenuItem_Click(object sender, EventArgs e) {
ToolStripMenuItem clickedItem = (ToolStripMenuItem)sender;
_selectedIssue = (Issue)clickedItem.Tag;
jiraKey.Text = _selectedIssue.Key;
}
private async void jiraFilterBox_SelectedIndexChanged(object sender, EventArgs e) {
private async void JiraFilterBox_SelectedIndexChanged(object sender, EventArgs e) {
if (_jiraConnector.IsLoggedIn) {
uploadButton.Enabled = false;
@ -150,7 +141,8 @@ namespace GreenshotJiraPlugin.Forms {
IList<Issue> issues = null;
try
{
var searchResult = await _jiraConnector.SearchAsync(filter.Jql);
JiraConfig.ExpandSearch = new[] { "*all" };
var searchResult = await _jiraConnector.SearchAsync(filter.Jql, fields: new [] { "summary,reporter,assignee,created"});
issues = searchResult.Issues;
}
catch (Exception ex)
@ -187,7 +179,7 @@ namespace GreenshotJiraPlugin.Forms {
}
}
private void jiraListView_SelectedIndexChanged(object sender, EventArgs e) {
private void JiraListView_SelectedIndexChanged(object sender, EventArgs e) {
if (jiraListView.SelectedItems.Count > 0) {
_selectedIssue = (Issue)jiraListView.SelectedItems[0].Tag;
jiraKey.Text = _selectedIssue.Key;
@ -197,15 +189,11 @@ namespace GreenshotJiraPlugin.Forms {
}
}
private void jiraListView_ColumnClick(object sender, ColumnClickEventArgs e) {
private void JiraListView_ColumnClick(object sender, ColumnClickEventArgs e) {
// Determine if clicked column is already the column that is being sorted.
if (e.Column == _columnSorter.SortColumn) {
// Reverse the current sort direction for this column.
if (_columnSorter.Order == SortOrder.Ascending) {
_columnSorter.Order = SortOrder.Descending;
} else {
_columnSorter.Order = SortOrder.Ascending;
}
_columnSorter.Order = _columnSorter.Order == SortOrder.Ascending ? SortOrder.Descending : SortOrder.Ascending;
} else {
// Set the column number that is to be sorted; default to ascending.
_columnSorter.SortColumn = e.Column;

View file

@ -34,8 +34,8 @@
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="Dapplo.HttpExtensions, Version=0.5.30.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.HttpExtensions.0.5.30\lib\net45\Dapplo.HttpExtensions.dll</HintPath>
<Reference Include="Dapplo.HttpExtensions, Version=0.5.31.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.HttpExtensions.0.5.31\lib\net45\Dapplo.HttpExtensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Dapplo.Jira, Version=0.1.56.0, Culture=neutral, processorArchitecture=MSIL">
@ -46,10 +46,6 @@
<HintPath>..\packages\Dapplo.Log.Facade.0.5.4\lib\net45\Dapplo.Log.Facade.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Dapplo.Utils, Version=0.1.113.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapplo.Utils.0.1.113\lib\net45\Dapplo.Utils.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net">
<HintPath>..\Greenshot\Lib\log4net.dll</HintPath>
</Reference>
@ -81,6 +77,7 @@
<Compile Include="JiraPlugin.cs" />
<Compile Include="JiraUtils.cs" />
<Compile Include="LanguageKeys.cs" />
<Compile Include="Log4NetLogger.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="Languages\language_jiraplugin-de-DE.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@ -108,9 +105,19 @@
</ItemGroup>
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)"
"$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\*.gsp"
del /q /s "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)"\*
if "$(ConfigurationName)" == "Release" (
..\..\..\packages\LibZ.Tool.1.2.0.0\tools\libz.exe inject-dll --assembly $(ProjectDir)bin\$(Configuration)\$(TargetFileName) --include $(ProjectDir)bin\$(Configuration)\dapplo*.dll --move
)
copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\*.gsp"
copy "$(ProjectDir)bin\$(Configuration)\Dapplo.*" "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\"
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\"
if "$(ConfigurationName)" == "Debug" (
copy "$(ProjectDir)bin\$(Configuration)\Dapplo.*" "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\"
copy "$(ProjectDir)bin\$(Configuration)\$(ProjectName).pdb" "$(SolutionDir)Greenshot\bin\$(Configuration)\Plugins\$(ProjectName)\"
)
mkdir "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\Plugins\$(ProjectName)"
copy "$(ProjectDir)\Languages\*.xml" "$(SolutionDir)Greenshot\bin\$(Configuration)\Languages\Plugins\$(ProjectName)\"</PostBuildEvent>
</PropertyGroup>

View file

@ -24,6 +24,8 @@ using Greenshot.IniFile;
using Greenshot.Plugin;
using System;
using System.Threading.Tasks;
using Dapplo.HttpExtensions.ContentConverter;
using Dapplo.Log.Facade;
using GreenshotJiraPlugin.Forms;
namespace GreenshotJiraPlugin {
@ -67,14 +69,7 @@ namespace GreenshotJiraPlugin {
//Needed for a fail-fast
public JiraConnector CurrentJiraConnector => _jiraConnector;
public JiraConnector JiraConnector {
get {
if (_jiraConnector == null) {
_jiraConnector = new JiraConnector();
}
return _jiraConnector;
}
}
public JiraConnector JiraConnector => _jiraConnector ?? (_jiraConnector = new JiraConnector());
/// <summary>
/// Implementation of the IGreenshotPlugin.Initialize
@ -85,6 +80,7 @@ namespace GreenshotJiraPlugin {
public bool Initialize(IGreenshotHost pluginHost, PluginAttribute myAttributes) {
// Register configuration (don't need the configuration itself)
_config = IniConfig.GetIniSection<JiraConfiguration>();
LogSettings.RegisterDefaultLogger<Log4NetLogger>();
return true;
}

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Dapplo.HttpExtensions" version="0.5.30" targetFramework="net45" />
<package id="Dapplo.HttpExtensions" version="0.5.31" targetFramework="net45" />
<package id="Dapplo.Jira" version="0.1.56" targetFramework="net45" />
<package id="Dapplo.Log.Facade" version="0.5.4" targetFramework="net45" />
<package id="Dapplo.Utils" version="0.1.113" targetFramework="net45" />
<package id="LibZ.Tool" version="1.2.0.0" targetFramework="net45" />
</packages>