namespace FM21XXConfigurator.Common
{
    using System.Text;

    public partial class GlobalParameters
    {
        public short ParamId
        {
            get
            {
                return 1;
            }
        }
        public static GlobalParameters Default
        {
            get
            {
                if (defaultParameters == null)
                {
                    defaultParameters = new GlobalParameters();
                    //0, [10,20], [x,x], [x], [x]
                    defaultParameters.Parameters.AddParametersRow(defaultParameters.ParamId,
                        Default_RecordSearch,
                        Default_SIM_PIN,
                        Default_REC_REFR_TMO); //GV 2009-06-09
                }
                return defaultParameters;
            }
        }
        //public const int SPECIFIC_NUMBERS_COUNT = 5;

        private static GlobalParameters defaultParameters;

        private const bool Default_ProfileChangeOnEvent = false;
        private const uint Default_MicrophoneLevel = 10;
        private const uint Default_SpeakerLevel = 20;
        private static readonly string Default_CallNumber = string.Empty;
        private const uint Default_CallTrigger = 0;
        private const byte Default_RecordSearch = 0;
        private static readonly string Default_SIM_PIN = string.Empty;
        private static readonly string Default_REC_REFR_TMO = "6000"; //GV 2009-06-09
        
        public override string ToString()
        {

            GlobalParameters.ParametersRow row = this.Parameters[0];
            return string.Format(@"S:Record:{1}{0}S:SimPin:{2}{0}S:RecRefreshTmo:{3}{0}", //GV 2009-06-09 S:RecRefreshTmo:{3}{0}
                Encoding.ASCII.GetString(new byte[] { 0x0D, 0x0A }),
                row.RecordSearch,
                row.SIM_PIN,
                row.REC_REFR_TMO); //GV 2009-06-09
        }
    }
}
