This commit is contained in:
@@ -93,6 +93,7 @@
|
||||
<Compile Include="tfa.Designer.cs">
|
||||
<DependentUpon>tfa.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Timestamp.cs" />
|
||||
<Compile Include="UserType.cs" />
|
||||
<Compile Include="util.cs" />
|
||||
<EmbeddedResource Include="auth.resx">
|
||||
@@ -150,4 +151,7 @@
|
||||
<Content Include="devinfo.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>"C:\data\code\ravenqbi\devutil\TimeStamp\TimeStamp.exe" "$(ProjectDir)Timestamp.cs" "/N:AyaNovaQBI"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -5,16 +5,32 @@ VisualStudioVersion = 17.2.32526.322
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AyaNovaQBI", "AyaNovaQBI.csproj", "{82CD8E13-3297-472B-8C59-C4A50A69CB5C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TimeStamp", "..\devutil\TimeStamp\TimeStamp.csproj", "{CE73BA18-914D-4426-8888-1DA0F0FC4764}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{82CD8E13-3297-472B-8C59-C4A50A69CB5C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Debug|x86.Build.0 = Debug|x86
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Release|x86.ActiveCfg = Release|x86
|
||||
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
34
AyaNovaQBI/Timestamp.cs
Normal file
34
AyaNovaQBI/Timestamp.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
// The namespace can be overidden by the /N option:
|
||||
// GenerateTimeStampFile file.cs /N:MyNameSpace
|
||||
// Such settings will override your value here.
|
||||
namespace AyaNovaQBI
|
||||
{
|
||||
/// <summary>
|
||||
/// Static Timestamp related data.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// THIS FILE IS CHANGED BY EXTERNAL PROGRAMS.
|
||||
/// Do not modify the namespace, as it may be overwritten. You can
|
||||
/// set the namespace with the /N option.
|
||||
/// Do not modify the definition of BuildAt as your changes will be discarded.
|
||||
/// Do not modify the definition of TimeStampedBy as your changes will be discarded.
|
||||
/// </remarks>
|
||||
public static class Timestamp
|
||||
{
|
||||
/// <summary>
|
||||
/// The time stamp
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Do not modify the definition of BuildAt as your changes will be discarded.
|
||||
/// </remarks>
|
||||
public static DateTime BuildAt { get { return new DateTime(637914944578794775); } } //--**
|
||||
/// <summary>
|
||||
/// The program that time stamped it.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Do not modify the definition of TimeStampedBy as your changes will be discarded.
|
||||
/// </remarks>
|
||||
public static string TimeStampedBy { get { return @"GZTW.AyaNova.BLL.TS"; } } //--**
|
||||
}
|
||||
}
|
||||
@@ -149,18 +149,13 @@ namespace AyaNovaQBI
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
"error": {
|
||||
"code": "2001",
|
||||
"message": "\"E1020 - License key expired 2022-06-20 5:00 PM\r\nLogin as SuperUser to start evaluation / install license\""
|
||||
}
|
||||
|
||||
*/
|
||||
if (a.ObjectResponse != null && a.ObjectResponse.ContainsKey("error"))
|
||||
{
|
||||
|
||||
var errCode = a.ObjectResponse["error"]["code"].Value<string>();
|
||||
if (errCode.Contains("2003")) return false;//simple authentication error
|
||||
//some other error, possibly expired ayanova license etc, show it so it's clear why the login failed so they known it's not a creds issue
|
||||
var errMessage = a.ObjectResponse["error"]["message"].Value<string>();
|
||||
throw new Exception($"Code: {errCode} - {errMessage}");
|
||||
}
|
||||
@@ -483,7 +478,6 @@ namespace AyaNovaQBI
|
||||
var r = await GetAsync("license");
|
||||
ALicense = r.ObjectResponse["data"]["license"].ToObject<AyaNovaLicense>();
|
||||
|
||||
|
||||
//UNEXPIRED AYANOVA LICENSE?
|
||||
if (ALicense.licenseWillExpire && ALicense.licenseExpiration < DateTime.UtcNow)
|
||||
{
|
||||
@@ -491,7 +485,6 @@ namespace AyaNovaQBI
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//QBI LICENSED?
|
||||
if (ALicense.features.FirstOrDefault(z => z.Feature == "QBI") == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user