private CommonData()
 {
     this.ApplicationFolderPath = string.Format("{0}\\{1}", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Resources.ApplicationFolder);
     if (!Directory.Exists(this.ApplicationFolderPath))
     {
         Directory.CreateDirectory(this.ApplicationFolderPath);
     }
     this.Settings = ConsultingLeadsProSettings.Load(string.Format("{0}\\settings.dat", this.ApplicationFolderPath));
 }
        public static ConsultingLeadsProSettings Load(string fileName)
        {
            ConsultingLeadsProSettings ConsultingLeadsProSettings = null;

            try
            {
                using (Stream stream = File.Open(fileName, FileMode.OpenOrCreate, FileAccess.Read))
                {
                    BinaryFormatter binaryFormatter = new BinaryFormatter();
                    ConsultingLeadsProSettings          = (binaryFormatter.Deserialize(stream) as ConsultingLeadsProSettings);
                    ConsultingLeadsProSettings.fileName = fileName;
                    stream.Close();
                }
            }
            catch
            {
            }
            if (ConsultingLeadsProSettings == null)
            {
                return(new ConsultingLeadsProSettings(fileName));
            }
            return(ConsultingLeadsProSettings);
        }