/// <summary>
 /// Create default config.
 /// </summary>
 private void _CreateDefaultConfig()
 {
     _config = new BreaksConfig();
     _config.BreaksType = null;
     _config.DefaultBreaks = new Breaks();
 }
        /// <summary>
        /// Read Project's Breaks Settings from XML.
        /// </summary>
        private void _InitBreaksSettings()
        {
            Debug.Assert(null != _projectProperties);
            _config = null;

            MemoryStream stream = null;
            try
            {
                string configText = _projectProperties.GetPropertyByName(CONFIG_PROPERTY_NAME);
                if (!string.IsNullOrEmpty(configText))
                {
                    stream = new MemoryStream(Encoding.UTF8.GetBytes(configText));

                    DataContractSerializer ser = new DataContractSerializer(typeof(BreaksConfig));
                    _config = (BreaksConfig)ser.ReadObject(stream);
                }
            }
            catch (Exception ex)
            {
                Logger.Info(ex);
            }
            finally
            {
                if (null != stream)
                    stream.Close();
            }

            if (null == _config)
                // If no config was read, then create default.
                _CreateDefaultConfig();
        }
 /// <summary>
 /// Create default config.
 /// </summary>
 private void _CreateDefaultConfig()
 {
     _config               = new BreaksConfig();
     _config.BreaksType    = null;
     _config.DefaultBreaks = new Breaks();
 }