// Created with MonoDevelop
//
//    QuickStep: Acquire, view and identify spectra 
//    Copyright (C) 2021 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 System.Diagnostics;
using System.Reflection;
using Hiperscan.ApoIdentCore.Enums;
using Hiperscan.ApoIdentCore.Misc;
using Hiperscan.GuiExtensions;

namespace Hiperscan.ApoIdentCore.GuiControl
{
    public delegate void ApoUpdateHandler(UpdateArgs arg);

    public class UpdateArgs : UpdateArgsTemplate<DialogArgs>
    {
        public UpdateArgs()
        {
            this.DialogArgs = new DialogArgs();
        }

        public static UpdateArgs GetResetArg()
        {
            UpdateArgs tmp = new UpdateArgs();
            tmp.Menu = UpdateCategory.Reset;
            tmp.Pharmacy = UpdateCategory.Reset;
            tmp.Substance = UpdateCategory.Reset;
            tmp.Specimen = UpdateCategory.Reset;
            tmp.Measuring = UpdateCategory.Reset;
            tmp.Result = UpdateCategory.Reset;
            tmp.Protocol = UpdateCategory.Reset;

            return tmp;
        }

        public static UpdateArgs GetReloadAllArg()
        {
            UpdateArgs tmp = new UpdateArgs();
            tmp.Menu = UpdateCategory.All;
            tmp.Pharmacy = UpdateCategory.All;
            tmp.Substance = UpdateCategory.All;
            tmp.Specimen = UpdateCategory.All;
            tmp.Measuring = UpdateCategory.All;
            tmp.Result = UpdateCategory.All;
            tmp.Protocol = UpdateCategory.All;

            return tmp;
        }

        public UpdateCategory Menu { get; set; } = UpdateCategory.None;
        public UpdateCategory Pharmacy { get; set; } = UpdateCategory.None;
        public UpdateCategory Substance { get; set; } = UpdateCategory.None;
        public UpdateCategory Specimen { get; set; } = UpdateCategory.None;
        public UpdateCategory Measuring { get; set; } = UpdateCategory.None;
        public UpdateCategory Result { get; set; } = UpdateCategory.None;
        public UpdateCategory Protocol { get; set; } = UpdateCategory.None;

        public ProgramState AnimationType { get; set; } = ProgramState.None;
        public SplashScreenState SplashScreenState { get; set; } = SplashScreenState.None;
        public StateBarValues StateBarValues { get; set; } = null;

        public bool IsMeasuring { get; set; } = false;
        public string RecalibrationTimeLeft = String.Empty;
    }
}
