using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace KlassenBIB
{
    //
    // Zusammenfassung:
    //     Bietet die grundlegene Struktur für eine Sanierung
    /// <summary>
    /// 
    /// </summary>
    [EditorBrowsable(EditorBrowsableState.Never)]
    [Browsable(false)]
    public abstract class Sanierung : INotifyPropertyChanged
    {
        //Guid guid;
        double tempAusen;
        double tempKanal;
        string wetter;
        bool genehmigungVorhanden;
        bool wasserhaltungEingerichtet;
        bool sTVOAbsicherung;
        bool hDReinigung;
        DateTime hDReinigungDatum;
        //DateTime sanierungsDatum;
        Inspektionsobjekt inspektionsobjekt;
        /// <summary>
        /// 
        /// </summary>
        protected string pfadZurSan;

        /// <summary>
        /// 
        /// </summary>
        [Browsable(false)]
        public Sanierung()
        {
            //if (inspektionsobjekt == null) return;
            //pfadZurSan = string.Format();

            
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="projektpfad"></param>
        /// <returns></returns>
        public abstract string CheckVerzeichnisse(string projektpfad);
        //public Guid Guid { get => guid; set => guid = value; }
        /// <summary>
        /// 
        /// </summary>
        public double TempAusen
        {
            get => tempAusen;
            set
            {
                if(tempAusen != value)
                {
                    tempAusen = value;
                    NotifyPropertyChanged();
                }
                
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public double TempKanal { get => tempKanal; set => tempKanal = value; }
        /// <summary>
        /// 
        /// </summary>
        public string Wetter { get => wetter; set => wetter = value; }
        /// <summary>
        /// 
        /// </summary>
        public bool GenehmigungVorhanden { get => genehmigungVorhanden; set => genehmigungVorhanden = value; }
        /// <summary>
        /// 
        /// </summary>
        public bool WasserhaltungEingerichtet { get => wasserhaltungEingerichtet; set => wasserhaltungEingerichtet = value; }
        /// <summary>
        /// 
        /// </summary>
        public bool STVOAbsicherung { get => sTVOAbsicherung; set => sTVOAbsicherung = value; }
        /// <summary>
        /// 
        /// </summary>
        public bool HDReinigung { get => hDReinigung; set => hDReinigung = value; }
        /// <summary>
        /// 
        /// </summary>
        public DateTime HDReinigungDatum { get => hDReinigungDatum; set => hDReinigungDatum = value; }
        /// <summary>
        /// 
        /// </summary>
        public Inspektionsobjekt Inspektionsobjekt { get => inspektionsobjekt; set => inspektionsobjekt = value; }
        /// <summary>
        /// 
        /// </summary>
        protected string PfadZurSan {
            get
            {
                return string.Format("{0}-{1}", Inspektionsobjekt.VonPunkt, Inspektionsobjekt.BisPunkt);
            }
        }
        //public DateTime SanierungsDatum { get => sanierungsDatum; set => sanierungsDatum = value; }
        /// <summary>
        /// 
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}
