Skip to content

Commit

Permalink
Change Succeded to Succeeded (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvanpoppel committed Apr 11, 2020
1 parent 1b44a2f commit 61cbd7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion KeeTrayTOTP/FormTimeCorrection.cs
Expand Up @@ -103,7 +103,7 @@ private void WorkerWaitForCheck_DoWork(object sender, DoWorkEventArgs e)
System.Threading.Thread.Sleep(100); //Waits
if (_testTimeCorrection.LastUpdateDateTime != DateTime.MinValue) //Checks if the validation has completed.
{
if (_testTimeCorrection.LastUpdateSucceded) //Checks if the validation has succeeded.
if (_testTimeCorrection.LastUpdateSucceeded) //Checks if the validation has succeeded.
{
e.Result = "success"; //Returns the validation result success.
return; //Exits the loop as the validation was successful.
Expand Down
8 changes: 4 additions & 4 deletions KeeTrayTOTP/Libraries/TimeCorrectionProvider.cs
Expand Up @@ -49,11 +49,11 @@ public class TimeCorrectionProvider
/// </summary>
public DateTime LastUpdateDateTime { get { return _lastUpdateDateTime; } }

private bool _lastUpdateSucceded;
private bool _lastUpdateSucceeded;
/// <summary>
/// Returns true if the last check for time correction was successful.
/// </summary>
public bool LastUpdateSucceded { get { return _lastUpdateSucceded; } }
public bool LastUpdateSucceeded { get { return _lastUpdateSucceeded; } }

/// <summary>
/// Instanciates a new TOTP_TimeCorrection using the specified URL to contact the server.
Expand Down Expand Up @@ -121,11 +121,11 @@ private void Task_Thread()
webClient.DownloadData(_url); //Downloads the server's page using HTTP or HTTPS.
var dateHeader = webClient.ResponseHeaders.Get("Date"); //Gets the date from the HTTP header of the downloaded page.
_timeCorrection = DateTime.UtcNow - DateTime.Parse(dateHeader, System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat).ToUniversalTime(); //Compares the downloaded date to the systems date giving us a timespan.
_lastUpdateSucceded = true; //Informs that the date check has succeeded.
_lastUpdateSucceeded = true; //Informs that the date check has succeeded.
}
catch (Exception)
{
_lastUpdateSucceded = false; //Informs that the date check has failed.
_lastUpdateSucceeded = false; //Informs that the date check has failed.
}
_lastUpdateDateTime = DateTime.Now; //Informs when the last update has been attempted (succeeded or not).
}
Expand Down
6 changes: 3 additions & 3 deletions KeeTrayTOTP/TrayTOTP_TimeCorrectionCollection.cs
Expand Up @@ -164,10 +164,10 @@ internal ListViewItem[] ToLvi()
foreach (var tc in _timeCorrections)
{
//Create new Listviewitem to appear in Time Correction Settings Listview.
var lvi = new ListViewItem(tc.Url) { ImageIndex = tc.LastUpdateSucceded ? 0 : 2 };
lvi.SubItems.Add((tc.LastUpdateSucceded ? tc.TimeCorrection.ToString() : Localization.Strings.ConnectionFailed));
var lvi = new ListViewItem(tc.Url) { ImageIndex = tc.LastUpdateSucceeded ? 0 : 2 };
lvi.SubItems.Add((tc.LastUpdateSucceeded ? tc.TimeCorrection.ToString() : Localization.Strings.ConnectionFailed));
lvi.Tag = tc;
lvi.ToolTipText = (tc.LastUpdateSucceded ? String.Empty : tc.LastUpdateDateTime.ToString());
lvi.ToolTipText = (tc.LastUpdateSucceeded ? String.Empty : tc.LastUpdateDateTime.ToString());
lvIs.Add(lvi);
}
return lvIs.ToArray();
Expand Down

0 comments on commit 61cbd7e

Please sign in to comment.