implement InstallationStatus from MBS Framework for Android

This commit is contained in:
Michael Becker 2021-01-09 22:30:23 -05:00
parent 2fed2cb5ef
commit 7ca5acd471
No known key found for this signature in database
GPG Key ID: 98C333A81F18C22C
3 changed files with 54 additions and 0 deletions

View File

@ -33,6 +33,12 @@ namespace MBS.Framework
public string Title { get; set; } = String.Empty;
public int ExitCode { get; protected set; } = 0;
protected virtual InstallationStatus GetInstallationStatusInternal()
{
return InstallationStatus.Unknown;
}
public InstallationStatus InstallationStatus { get { return GetInstallationStatusInternal(); } }
public CommandLine CommandLine { get; protected set; } = null;
public Application()

View File

@ -0,0 +1,47 @@
//
// InstallationStatus.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2021 Mike Becker's Software
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
namespace MBS.Framework
{
public enum InstallationStatus
{
/// <summary>
/// The application installation status cannot be determined.
/// </summary>
Unknown,
/// <summary>
/// Indicates that the application has been launched before.
/// </summary>
Installed,
/// <summary>
/// Indicates that the application is launching for the first time, or the user has cleared the shared application data.
/// </summary>
New,
/// <summary>
/// Indicates that the application has been upgraded since it was last run.
/// </summary>
Upgraded,
/// <summary>
/// On Microsoft Windows, indicates an application that has been advertised by the Windows Installer system but has not actually been installed on the user's computer.
/// </summary>
Advertised
}
}

View File

@ -95,6 +95,7 @@
<Compile Include="Scripting\ScriptEnvironment.cs" />
<Compile Include="Collections\Generic\ExtensionMethods.cs" />
<Compile Include="ISupportsExtraData.cs" />
<Compile Include="InstallationStatus.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Logic\" />