Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Jun 6, 2014
2 parents 6da2842 + b78dae7 commit b0c4e60
Show file tree
Hide file tree
Showing 47 changed files with 3,125 additions and 748 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We are aiming to maintain a Beta & Stable version of the app.

**Installing on Windows 8 will alert with SmartScreen, you should be able to "Run Anyway" until I can afford a proper certificate, there is no way around this! After a couple of runs, the warning should stop**

* Stable Release - Coming Soon!
* [Stable Release - Click Here](https://github.com/BlythMeister/Gallifrey/raw/master/deploy/stable/setup.exe)
* [Beta Release - Click Here](https://github.com/BlythMeister/Gallifrey/raw/develop/deploy/beta/setup.exe)

*Although the "stable" can also be downloaded from the "develop" branch & the "beta" from the "master" branch, i strongly recommend using the links above to guarantee correct updates!*
Expand Down
11 changes: 7 additions & 4 deletions src/Gallifrey.UI.Classic.Beta/Gallifrey.UI.Classic.Beta.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<UpdateRequired>true</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<InstallUrl>https://raw.githubusercontent.com/BlythMeister/Gallifrey/develop/deploy/beta/</InstallUrl>
<SupportUrl>https://github.com/BlythMeister/Gallifrey</SupportUrl>
<ErrorReportUrl>https://github.com/BlythMeister/Gallifrey</ErrorReportUrl>
<ProductName>Gallifrey %28Beta%29</ProductName>
<PublisherName>Gallifrey</PublisherName>
<ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<MinimumRequiredVersion>0.1.1.0</MinimumRequiredVersion>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down
321 changes: 321 additions & 0 deletions src/Gallifrey.UI.Classic/AboutWindow.Designer.cs

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions src/Gallifrey.UI.Classic/AboutWindow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
using System.Deployment.Application;
using System.Windows.Forms;

namespace Gallifrey.UI.Classic
{
public partial class AboutWindow : Form
{
private readonly List<string> contributors;
private int position;

public AboutWindow()
{
InitializeComponent();
var networkDeploy = ApplicationDeployment.IsNetworkDeployed;
var myVersion = networkDeploy ? ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString() : Application.ProductVersion;
myVersion = string.Format("Current Version: {0}", myVersion);
if (!networkDeploy) myVersion = string.Format("{0} (manual)", myVersion);
lblCurrentVersion.Text = myVersion;

contributors = new List<string>()
{
"Mark Harrison\nTwitter: @HarrisonMeister\nGitHub: @HarrisonMeister",
};
}

private void btnOK_Click(object sender, EventArgs e)
{
Close();
}

private void timerContributor_Tick(object sender, EventArgs e)
{
lblContributors.Text = contributors[position];
position++;
if (contributors.Count == position)
{
position = 0;
}
}

private void btnPayPal_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G3MWL8E6UG4RS");
}

private void btnGitHub_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/BlythMeister/Gallifrey");
}

private void btnEmail_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("mailto:[email protected]?subject=Gallifrey App Contact");
}

private void btnTwitter_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://twitter.com/GallifreyApp");
}
}
}
1,256 changes: 1,256 additions & 0 deletions src/Gallifrey.UI.Classic/AboutWindow.resx

Large diffs are not rendered by default.

54 changes: 38 additions & 16 deletions src/Gallifrey.UI.Classic/AddTimerWindow.Designer.cs

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

68 changes: 61 additions & 7 deletions src/Gallifrey.UI.Classic/AddTimerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,64 @@
using Atlassian.Jira;
using Gallifrey.Exceptions.IntergrationPoints;
using Gallifrey.Exceptions.JiraTimers;
using Gallifrey.ExtensionMethods;

namespace Gallifrey.UI.Classic
{
public partial class AddTimerWindow : Form
{
private readonly IBackend gallifrey;
public Guid? NewTimerId { get; private set; }
internal bool DisplayForm { get; private set; }

public AddTimerWindow(IBackend gallifrey)
{
DisplayForm = true;
this.gallifrey = gallifrey;
InitializeComponent();
calStartDate.MinDate = DateTime.Now.AddDays(gallifrey.AppSettings.KeepTimersForDays*-1);
calStartDate.MaxDate = DateTime.Now.AddDays(gallifrey.AppSettings.KeepTimersForDays);
calStartDate.MinDate = DateTime.Now.AddDays(gallifrey.Settings.AppSettings.KeepTimersForDays * -1);
calStartDate.MaxDate = DateTime.Now.AddDays(gallifrey.Settings.AppSettings.KeepTimersForDays);

TopMost = gallifrey.Settings.UiSettings.AlwaysOnTop;
}

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

public void PreLoadDate(DateTime startDate)
{
if (!startDate.Between(calStartDate.MinDate, calStartDate.MaxDate))
{
MessageBox.Show(
"New timer start date is not valid for the minimum and maximum duration of timers to keep.\nHave you updated the days to keep in settings?",
"New timer date invalid", MessageBoxButtons.OK, MessageBoxIcon.Warning);
DisplayForm = false;
}
else
{
calStartDate.Value = startDate;
}
}

public void PreLoadTime(TimeSpan time)
{
txtStartHours.Text = time.Hours.ToString();
txtStartMins.Text = time.Minutes.ToString();
}

private void btnAddTimer_Click(object sender, EventArgs e)
{
if (AddJira()) Close();
if (AddJira())
{
Close();
}
else
{
DialogResult = DialogResult.None;
}
}

private bool AddJira()
Expand All @@ -49,14 +84,17 @@ private bool AddJira()
return false;
}

if (MessageBox.Show(string.Format("Jira found!\n\nRef: {0}\nName: {1}\n\nIs that correct?", jiraIssue.Key, jiraIssue.Summary), "Correct Jira?", MessageBoxButtons.YesNo) == DialogResult.No)
if (txtJiraRef.Enabled)
{
return false;
if (MessageBox.Show(string.Format("Jira found!\n\nRef: {0}\nName: {1}\n\nIs that correct?", jiraIssue.Key, jiraIssue.Summary), "Correct Jira?", MessageBoxButtons.YesNo) == DialogResult.No)
{
return false;
}
}

try
{
gallifrey.JiraTimerCollection.AddTimer(jiraIssue, startDate, seedTime, chkStartNow.Checked);
NewTimerId = gallifrey.JiraTimerCollection.AddTimer(jiraIssue, startDate, seedTime, chkStartNow.Checked);
}
catch (DuplicateTimerException)
{
Expand Down Expand Up @@ -84,5 +122,21 @@ private void calStartDate_ValueChanged(object sender, EventArgs e)
chkStartNow.Enabled = true;
}
}

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

if (!string.IsNullOrWhiteSpace(searchForm.JiraReference))
{
txtJiraRef.Text = searchForm.JiraReference;
txtJiraRef.Enabled = false;
}

TopMost = gallifrey.Settings.UiSettings.AlwaysOnTop;
}
}
}
Loading

0 comments on commit b0c4e60

Please sign in to comment.