|
@@ -22,7 +22,7 @@ namespace comal.timesheets
|
|
|
{
|
|
|
public partial class App : Application
|
|
|
{
|
|
|
- string deviceString = "";
|
|
|
+ public static string DeviceString = "";
|
|
|
public static bool IsUserLoggedIn => ClientFactory.UserGuid != Guid.Empty;
|
|
|
public static void LogoutUser()
|
|
|
{
|
|
@@ -82,14 +82,14 @@ namespace comal.timesheets
|
|
|
new LocalConfiguration<DatabaseSettings>().Save(DBSettings);
|
|
|
MobileUtils.SaveToSecureStorage();
|
|
|
|
|
|
- //if (!string.IsNullOrWhiteSpace(GlobalVariables.LoadFromLinkString))
|
|
|
- //{
|
|
|
- // MobileUtils.LoadFromLink();
|
|
|
- //}
|
|
|
+ if (!string.IsNullOrWhiteSpace(GlobalVariables.LoadFromLinkString))
|
|
|
+ {
|
|
|
+ MobileUtils.LoadFromLink();
|
|
|
+ }
|
|
|
|
|
|
var result = JsonClient<User>.Ping(DBSettings.URLs, out DatabaseInfo info);
|
|
|
|
|
|
- ClientFactory.SetClientType(typeof(JsonClient<>), "TimeBench", MobileUtils.AppVersion.InstalledVersionNumber + deviceString, result, true);
|
|
|
+ ClientFactory.SetClientType(typeof(JsonClient<>), "TimeBench", MobileUtils.AppVersion.InstalledVersionNumber + DeviceString, result, true);
|
|
|
|
|
|
GlobalVariables.InternalOnAppearing = true;
|
|
|
GlobalVariables.ChangeUser = false;
|
|
@@ -155,25 +155,25 @@ namespace comal.timesheets
|
|
|
{
|
|
|
if (idiom.Equals(DeviceIdiom.Phone))
|
|
|
{
|
|
|
- deviceString = "i";
|
|
|
+ DeviceString = "i";
|
|
|
}
|
|
|
else if (idiom.Equals(DeviceIdiom.Tablet))
|
|
|
{
|
|
|
- deviceString = "I";
|
|
|
+ DeviceString = "I";
|
|
|
}
|
|
|
}
|
|
|
else if (Device.RuntimePlatform.Equals(Device.Android))
|
|
|
{
|
|
|
if (idiom.Equals(DeviceIdiom.Phone))
|
|
|
{
|
|
|
- deviceString = "a";
|
|
|
+ DeviceString = "a";
|
|
|
}
|
|
|
else if (idiom.Equals(DeviceIdiom.Tablet))
|
|
|
{
|
|
|
- deviceString = "A";
|
|
|
+ DeviceString = "A";
|
|
|
}
|
|
|
}
|
|
|
- GlobalVariables.DeviceString = deviceString;
|
|
|
+ GlobalVariables.DeviceString = DeviceString;
|
|
|
}
|
|
|
catch { }
|
|
|
}
|