-
Notifications
You must be signed in to change notification settings - Fork 0
/
UserInfo.cs
46 lines (44 loc) · 924 Bytes
/
UserInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Diagnostics;
using System.IO;
namespace OxfordV2
{
public static class UserInfo
{
public static string appId { get; set; }
public static string appKey { get; set; }
public static void GetKeys(string userID, string key)
{
try
{
Trace.WriteLine("GUI passed user entered userID and user entered key.");
appId = userID;
appKey = key;
}
catch
{
Trace.WriteLine("Error setting user id and key from GUI.");
}
}
public static void GetKeys()
{
StreamReader reader = new StreamReader(".\\keys.txt");
try
{
{
Trace.WriteLine("Getting request keys");
appId = reader.ReadLine();
appKey = reader.ReadLine();
}
}
catch
{
Console.WriteLine("keys.txt file is empty");
}
finally
{
reader.Close();
}
}
}
}