Skip to content

Commit

Permalink
Jira Search & Target Export
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed May 27, 2014
1 parent 6d57dda commit 1539f8b
Show file tree
Hide file tree
Showing 23 changed files with 1,758 additions and 40 deletions.
8 changes: 4 additions & 4 deletions deploy/beta/Gallifrey.UI.Classic.Beta.application
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
<assemblyIdentity name="Gallifrey.UI.Classic.Beta.application" version="0.0.2.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<assemblyIdentity name="Gallifrey.UI.Classic.Beta.application" version="0.1.0.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" />
<description asmv2:publisher="Gallifrey" asmv2:product="Gallifrey (Beta)" xmlns="urn:schemas-microsoft-com:asm.v1" />
<deployment install="true" mapFileExtensions="true" co.v1:createDesktopShortcut="true">
<subscription>
Expand All @@ -14,14 +14,14 @@
<framework targetVersion="4.5" profile="Full" supportedRuntime="4.0.30319" />
</compatibleFrameworks>
<dependency>
<dependentAssembly dependencyType="install" codebase="Application Files\Gallifrey.UI.Classic.Beta_0_0_2_0\Gallifrey.UI.Classic.Beta.exe.manifest" size="6670">
<assemblyIdentity name="Gallifrey.UI.Classic.Beta.exe" version="0.0.2.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<dependentAssembly dependencyType="install" codebase="Application Files\Gallifrey.UI.Classic.Beta_0_1_0_0\Gallifrey.UI.Classic.Beta.exe.manifest" size="6670">
<assemblyIdentity name="Gallifrey.UI.Classic.Beta.exe" version="0.1.0.0" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>/5DKTjLTh+KFw9lEWDhtaLaYerB1wAZgDJOgVyBWj4Q=</dsig:DigestValue>
<dsig:DigestValue>r+5PG4GgbgoEseCY/El6B+Z0GWu39/IkFBedelpMq48=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<ProductName>Gallifrey %28Beta%29</ProductName>
<PublisherName>Gallifrey</PublisherName>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>0.0.2.%2a</ApplicationVersion>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
4 changes: 2 additions & 2 deletions src/Gallifrey.UI.Classic.Beta/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.2.0")]
[assembly: AssemblyFileVersion("0.0.2.0")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]
5 changes: 5 additions & 0 deletions src/Gallifrey.UI.Classic/AddTimerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public AddTimerWindow(IBackend gallifrey)
calStartDate.MaxDate = DateTime.Now.AddDays(gallifrey.AppSettings.KeepTimersForDays);
}

public void PreLoadData(string jiraRef)
{
txtJiraRef.Text = jiraRef;
}

private void btnAddTimer_Click(object sender, EventArgs e)
{
if (AddJira()) Close();
Expand Down
11 changes: 11 additions & 0 deletions src/Gallifrey.UI.Classic/Gallifrey.UI.Classic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
<Compile Include="AdjustTimerWindow.Designer.cs">
<DependentUpon>AdjustTimerWindow.cs</DependentUpon>
</Compile>
<Compile Include="SearchWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SearchWindow.Designer.cs">
<DependentUpon>SearchWindow.cs</DependentUpon>
</Compile>
<Compile Include="IdleTimerWindow.cs">
<SubType>Form</SubType>
</Compile>
Expand Down Expand Up @@ -149,6 +155,9 @@
<EmbeddedResource Include="AdjustTimerWindow.resx">
<DependentUpon>AdjustTimerWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SearchWindow.resx">
<DependentUpon>SearchWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IdleTimerWindow.resx">
<DependentUpon>IdleTimerWindow.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -221,6 +230,8 @@
</ItemGroup>
<ItemGroup>
<Content Include="clock_blue.ico" />
<None Include="Icons\Refresh_48x48.png" />
<None Include="Icons\Key_48x48.png" />
<None Include="Icons\Log Out_48x48.png" />
<None Include="Icons\Rename_48x48.png" />
<None Include="Icons\Search_48x48.png" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Gallifrey.UI.Classic/Icons/Key_48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/Gallifrey.UI.Classic/Icons/Log Out_48x48.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/Gallifrey.UI.Classic/MainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion src/Gallifrey.UI.Classic/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private void formTimer_Tick(object sender, EventArgs e)

SetDisplayClock();
SetExportStats();
SetExportTargetStats();
}

private void DoubleClickListBox(object sender, EventArgs e)
Expand All @@ -93,6 +94,8 @@ private void DoubleClickListBox(object sender, EventArgs e)
RefreshTimerPages();
}

#region "Button Handlers

private void btnAddTimer_Click(object sender, EventArgs e)
{
var addForm = new AddTimerWindow(gallifrey);
Expand Down Expand Up @@ -158,6 +161,15 @@ private void btnIdle_Click(object sender, EventArgs e)
}
}

private void btnSearch_Click(object sender, EventArgs e)
{
var searchForm = new SearchWindow(gallifrey);
searchForm.ShowDialog();
RefreshTimerPages();
}

#endregion

#region "Tray Icon"

private void GallifreyOnNoActivityEvent(object sender, int millisecondsSinceActivity)
Expand Down Expand Up @@ -370,8 +382,23 @@ private void SetExportStats()
lblUnexportedTime.Text = string.Format("Un-Exported Time: {0}", gallifrey.JiraTimerCollection.GetTotalUnexportedTime().FormatAsString(false));
}

#endregion
private void SetExportTargetStats()
{
var exportedTime = gallifrey.JiraTimerCollection.GetTotalExportedTimeThisWeek();
var target = new TimeSpan();
var n = 0;
while (n++ < (int)DateTime.Today.DayOfWeek)
{
target = target.Add(gallifrey.AppSettings.TargetLogPerDay);
}

lblExportedWeek.Text = string.Format("Exported: {0}", exportedTime.FormatAsString(false));
lblExportTargetWeek.Text = string.Format("Target: {0}", target.FormatAsString(false));
progExportTarget.Maximum = (int)target.TotalMinutes;
progExportTarget.Value = (int)exportedTime.TotalMinutes;
}

#endregion

}
}
4 changes: 2 additions & 2 deletions src/Gallifrey.UI.Classic/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]
14 changes: 12 additions & 2 deletions src/Gallifrey.UI.Classic/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/Gallifrey.UI.Classic/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
<data name="Settings_48x48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\Settings_48x48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Key_48x48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\Key_48x48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="clock_blue_128x128" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\clock_blue 128x128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand All @@ -148,7 +151,7 @@
<data name="Add_48x48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\Add_48x48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Log Out_48x48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\Log Out_48x48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Refresh_48x48" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icons\Refresh_48x48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
181 changes: 181 additions & 0 deletions src/Gallifrey.UI.Classic/SearchWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1539f8b

Please sign in to comment.