This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
185 changed files
with
223,893 additions
and
1,355 deletions.
There are no files selected for viewing
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Empty file.
Empty file.
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.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 29 additions & 34 deletions
63
PiggySync/PiggySync.Core/DeviaceManager.cs
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,36 @@ | ||
using PiggySyncWin.WinUI.Models; | ||
using System; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using PiggySync.DatabaseManager; | ||
using PiggySync.Model; | ||
using PiggySyncWin.WinUI.Infrastructure; | ||
using PiggySyncWin.WinUI.Models; | ||
|
||
namespace PiggySyncWin.WinUI.Infrastructure | ||
namespace PiggySync.Core | ||
{ | ||
public static class DeviaceHistoryManager | ||
{ | ||
public static List<PiggyRemoteHostHistoryEntry> AllHosts | ||
{ | ||
get; | ||
set; | ||
} | ||
public static class DeviaceHistoryManager | ||
{ | ||
static DeviaceHistoryManager() | ||
{ | ||
AllHosts = DatabaseManager.Instance.GetHistoricalDeviaces(); | ||
} | ||
|
||
static DeviaceHistoryManager () | ||
{ | ||
AllHosts = DatabaseManager.Instance.GetHistoricalDeviaces (); | ||
} | ||
public static List<PiggyRemoteHostHistoryEntry> AllHosts { get; set; } | ||
|
||
public static void AddHost (PiggyRemoteHost host) | ||
{ | ||
foreach (var x in AllHosts) | ||
{ | ||
if (x == host) | ||
{ | ||
x.LastSync = DateTime.Now; | ||
DatabaseManager.Instance.UpdateHistoricalDeviace (x); | ||
return; | ||
} | ||
} | ||
var newHost = new PiggyRemoteHostHistoryEntry (host); | ||
newHost.LastSync = DateTime.Now; | ||
DatabaseManager.Instance.SaveHistoricalDeviace (newHost); | ||
public static void AddHost(PiggyRemoteHost host) | ||
{ | ||
foreach (PiggyRemoteHostHistoryEntry x in AllHosts) | ||
{ | ||
if (x == host) | ||
{ | ||
x.LastSync = DateTime.Now; | ||
DatabaseManager.Instance.UpdateHistoricalDeviace(x); | ||
return; | ||
} | ||
} | ||
var newHost = new PiggyRemoteHostHistoryEntry(host); | ||
newHost.LastSync = DateTime.Now; | ||
DatabaseManager.Instance.SaveHistoricalDeviace(newHost); | ||
|
||
AllHosts.Add (newHost); | ||
} | ||
} | ||
AllHosts.Add(newHost); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
PiggySync/PiggySync.Core/FilePacketCreator.cs
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.