using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace CobXmlSupport
{
    public static class S
    {
        public static bool ettingAnaTag;
        public static bool ettingCountVars;
        public static bool ettingDisplays;
        public static bool ettingMvToDisp;
        public static bool ettingNoNsRef;
        public static bool ettingPerform;
        public static bool ettingShowTestbtns;
        public static bool ettingUnique;
        public static bool ettingUniqueAttrVars;
        public static bool ettingUniqueVars;
        public static bool ettingUserCodeBcup;
        public static bool ettingValues;
        public static bool ettingWrap;
        public static string ettingActualFile;
        public static string ettingCompany;
        public static string ettingExpPrefix;
        public static string ettingFilePath;
        public static string ettingLogSectName;
        public static string ettingLogVarName;
        public static string ettingMaxOcc;
        public static string ettingPrefix;
        public static string ettingUserName;
        public static List<savedFile> ettingList;

        public static void ettingListAdd(savedFile f)
        {
            bool upd = false;
            if (S.ettingList == null)
            {
                S.ettingList = new List<savedFile>();
                S.ettingList.Add(f);
                upd = true;
            }
            else
            {
                for (int i = 0; i < S.ettingList.Count; i++)
                {
                    if (S.ettingList.ToArray()[i].idConnect == f.idConnect)
                    {
                        S.ettingList[i] = f;
                        upd = true;
                    }
                }
            }
            if (!upd) S.ettingList.Add(f);
        }
 
        public static string strX(char chs, int length)
        {
            return new String(chs, length);
        }

    }

    //public class savedFile : ICloneable
    //{
    //    public savedFile()
    //    {
    //        idConnect="";
    //        usageName="";
    //        directorySaved="";
    //        fNameSaved="";
    //        saveDate = DateTime.MinValue;
    //    }

    //    public string idConnect;
    //    public string usageName;
    //    public string directorySaved;
    //    public string fNameSaved;
    //    public DateTime saveDate;


    //    public object Clone()
    //    {
    //        savedFile tmpSF = new savedFile();
    //        tmpSF = (savedFile)this.MemberwiseClone();
    //        return tmpSF;
    //    }
    //}

}