// Created with MonoDevelop
//
//    QuickStep: Acquire, view and identify spectra 
//    Copyright (C) 2018 Thomas Klose & Torsten Schache, Hiperscan GmbH Dresden, Germany
//
//    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;
using Hiperscan.Common;

namespace Hiperscan.Extensions.ApoIdent
{
    public static class ApoIdentEnvs
    {
        public static bool DebugOn
        {
            get
            {
                return ApoIdentEnvs.DebugEnv;
            }
        }

        public static bool DebugOff
        {
            get
            {
                return ApoIdentEnvs.DebugEnv == false;
            }
        }

        public static bool SplashOn
        {
            get
            {
                return ApoIdentEnvs.DisableSplashEnv == false;
            }
        }

        public static bool SplashOff
        {
            get
            {
                return ApoIdentEnvs.DisableSplashEnv;
            }
        }

        public static bool AvergeOn
        {
            get
            {
                return String.IsNullOrEmpty(ApoIdentEnvs.AverageEnv) == false;
            }
        }

        public static bool AvergeOff
        {
            get
            {
                return String.IsNullOrEmpty(ApoIdentEnvs.AverageEnv) == true;
            }
        }

        public static ushort Average
        {
            get
            {
                return ushort.Parse(ApoIdentEnvs.AverageEnv);
            }
        }

        public static bool ForceWarmupOn
        {
            get
            {
                return ApoIdentEnvs.ForceWarmupEnv;
            }
        }

        public static bool ForceWarmupOff
        {
            get
            {
                return ApoIdentEnvs.ForceWarmupEnv == false;
            }
        }

        public static bool TouchScreenModeOn
        {
            get
            {
                return ApoIdentEnvs.TouchScreenModeEnv;
            }
        }

        public static bool TouchScreenModeOff
        {
            get
            {
                return ApoIdentEnvs.TouchScreenModeEnv == false;
            }
        }

        public static bool NoFinderPlausibilityCheckOn
        {
            get
            {
                return ApoIdentEnvs.NoFinderPlausibiltyChecks == true;
            }
        }

        public static bool NoFinderPlausibilityCheckOff
        {
            get
            {
                return ApoIdentEnvs.NoFinderPlausibiltyChecks == false;
            }
        }

        public static bool BlindClassificationOn
        {
            get
            {
                return ApoIdentEnvs.BlindClassification == true;
            }
        }

        public static bool BlindClassificationOff
        {
            get
            {
                return ApoIdentEnvs.BlindClassification == false;
            }
        }

        private static bool DebugEnv                    {get; set;} = Environment.GetEnvironmentVariable(Env.ApoIdent.DEBUG) == "1";
        private static bool DisableSplashEnv            {get; set;} = Environment.GetEnvironmentVariable(Env.ApoIdent.DISABLE_SPLASH) == "1";
        private static string AverageEnv                {get; set;} = Environment.GetEnvironmentVariable(Env.ApoIdent.AVERAGE);
        private static bool ForceWarmupEnv              {get; set;} = Environment.GetEnvironmentVariable(Env.ApoIdent.FORCE_WARMUP) == "1";
        private static bool TouchScreenModeEnv          {get; set;} = Environment.GetEnvironmentVariable(Env.ApoIdent.TOUCHSCREEN_MODE) == "1";
        private static bool NoFinderPlausibiltyChecks   {get; set;} = Environment.GetEnvironmentVariable(Env.ApoIdent.NO_FINDER_PLAUSIBILTY_CHECK) == "1";
        private static bool BlindClassification         {get; set;} = Environment.GetEnvironmentVariable(Env.ApoIdent.BLINDCLASSIFICATION) == "1";      
    }
}
