Example #1
0
        private static FBAppConfig initFromXml()
        {
            FBAppConfig appConfig = null;
            XmlSerializer xsSubmit = new XmlSerializer(typeof(FBAppConfig));
            StreamReader fileStream = null;
            try
            {
                fileStream = new StreamReader(k_pathToXml);
                appConfig = (FBAppConfig)xsSubmit.Deserialize(fileStream);
            }
            catch (Exception e)
            {
                appConfig = new FBAppConfig();
            }
            finally
            {
                if (fileStream != null)
                {
                    fileStream.Close();
                }
            }

            return appConfig;
        }
Example #2
0
 public MyFBAppForm()
 {
     InitializeComponent();
     m_appConfig = CentralSingleton.Instance.AppConfig;
 }