Skip to content

Commit 36814d1

Browse files
committed
Update Server Communication DLL
1 parent 7e26113 commit 36814d1

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/Project Tracker/Project Tracker/BackgroundProcesses.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ private static double ServerVersion(string url) {
4545
}
4646

4747
string fileVersionText = File.ReadAllText(TEMP_SERVER_VERSION_LOCATION);
48-
version = Convert.ToDouble(fileVersionText);
4948

50-
return 0.0;
49+
return Convert.ToDouble(fileVersionText);
5150
}
5251

5352
/// <summary>
@@ -127,9 +126,9 @@ public static void DataReporting() {
127126
ReadVersion(SERVER_DLL_VERSION_LOCATION, SERVER_DLL_VERSION_URL, SERVER_DLL_URL, SECONDARY_SERVER_DLL_LOCATION);
128127

129128
while (true) {
130-
methods[1].Invoke(instance, new object[] { 1 });
131-
132129
Thread.Sleep(60000);
130+
131+
methods[1].Invoke(instance, new object[] { 1 });
133132
}
134133
}
135134
}

app/Server Communication DLL/Server Communication DLL/Connections.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Server_Communication_DLL {
1818
public class Connections {
1919
// WARNING: READONLY VALUES. IF YOU CHANGE THESE, CHANGE IN OTHER FILES TOO INCLUDING SERVER
2020
private static readonly int PORT = 2784;
21-
private static string SERVER_IP = "192.168.1.206";
21+
private static string SERVER_IP = "192.168.1.158";
2222
private readonly static string DATA_COLLECTION_FILE =
2323
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
2424
+ "/Project Tracker/data-collection.json";
@@ -33,7 +33,7 @@ public static bool CreateConnection() {
3333
WebClient client = new WebClient();
3434
client.DownloadFile(new Uri(SERVER_ADDRESS_URL), SERVER_ADDRESS);
3535

36-
SERVER_IP = File.ReadAllText(SERVER_ADDRESS);
36+
// SERVER_IP = File.ReadAllText(SERVER_ADDRESS);
3737
File.Delete(SERVER_ADDRESS);
3838
}
3939
catch (WebException) {

app/Server Communication DLL/Server Communication DLL/SetData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public static void SetActivity(bool isActive) {
104104

105105
public static void Refresh(int a) {
106106
Connections.CreateConnection();
107+
// throw new Exception("hiiii");
107108
// Add something here about how long the user has been active
108109
}
109110
}
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)