public static families DataStructureLoad(ref CadDev.LogManager.LogDLG log, string filename)
 {
     families ds = null;
     if (File.Exists(filename))
     {
         try
         {
             ds = CadDev.ObjectXmlSerializer.ObjectXMLSerializer<families>.Load(filename);
         }
         catch (Exception ex)
         {
             log.AddLogEntry(ex.Message, CadDev.LogManager.LogLevel.Critical, null);
         }
     }
     return ds;
 }
 public string GetArticleNumberFromFilename(string path, ref CadDev.LogManager.LogDLG log)
 {
     string result = "";
     try
     {
         string temp = Path.GetFileNameWithoutExtension(path);
         string[] items = temp.Split('_');
         if (items.Count<string>() >= 3)
         {
             result = items[1];
         }
     }
     catch (Exception ex)
     {
         log.AddLogEntry(ex.Message, CadDev.LogManager.LogLevel.Critical, null);
     }
     return result;
 }
        public bool ContainsFamilyFile(string pathname, ref CadDev.LogManager.LogDLG log)
        {
            bool contains = false;

            try
            {
                if (this != null)
                {
                    string id = GetArticleNumberFromFilename(pathname, ref log);
                    familiesFamilylistFamily fam = GetFamily(pathname, ref log);
                    if (fam != null && fam.id == id)
                        contains = true;
                }
            }
            catch (Exception ex)
            {
                log.AddLogEntry(ex.Message, CadDev.LogManager.LogLevel.Critical, null);
            }
            return contains;
        }
        public familiesFamilylistFamily GetFamily(string path, ref CadDev.LogManager.LogDLG log)
        {
            familiesFamilylistFamily fixt = null;

            try
            {
                if (this != null)
                {
                    string id = GetArticleNumberFromFilename(path, ref log);

                    foreach (familiesFamilylistFamily itemFamily in this.familylist)
                    {
                        if (id == itemFamily.id)
                        {
                            fixt = itemFamily;
                            break;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                log.AddLogEntry(ex.Message, CadDev.LogManager.LogLevel.Critical, null);
            }
            return fixt;
        }
        public string GetUpdataDate(ref CadDev.LogManager.LogDLG log)
        {
            string date = "";
            try
            {
                if (this != null)
                {
                    date = this.timestamp;
                }
            }
            catch (Exception ex)
            {
                log.AddLogEntry(ex.Message, CadDev.LogManager.LogLevel.Critical, null);
            }

            return date;
        }
        public string GetFileNamesFromArticleNumberAndLanguage(string prefix, string arcticleNr, string language, ref CadDev.LogManager.LogDLG log)
        {
            string result = null;

            try
            {
                result = String.Format("{0}_{1}_{2}", prefix, arcticleNr, language);
            }
            catch (Exception ex)
            {
                log.AddLogEntry(ex.Message, CadDev.LogManager.LogLevel.Critical, null);
            }
            return result;
        }