Example #1
0
        private void ExportConfiguration(ConfigFileLocationOptions Location, string Path)
        {
            Stream strm = null;

            try
            {
                strm = GetLocationStream(Location, Path, FileMode.Create);
                if (strm != null && strm.CanWrite)
                {
                    SaveConfiguration(strm);
                }
            }
            catch
            {
                return;
            }
            finally
            {
                if (strm != null)
                {
                    strm.Close();
                }
            }
        }
Example #2
0
        private void ImportConfiguration(ConfigFileLocationOptions Location, string Path)
        {
            Stream strm = null;

            try
            {
                strm = GetLocationStream(Location, Path, FileMode.Open);
                if (strm != null && strm.CanRead)
                {
                    LoadConfiguration(strm);
                }
            }
            catch
            {
                return;
            }
            finally
            {
                if (strm != null)
                {
                    strm.Close();
                }
            }
        }