/// <summary>
        /// When the main form closes the settings data is serialised.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            ObjectToSerialize objectToSerialize = new ObjectToSerialize();
            objectToSerialize.Queries.Add(this.localityQuerySetupPanel1.Settings);
            objectToSerialize.Queries.Add(this.localityQuerySetupPanel2.Settings);

            Serializer serializer = new Serializer();
            serializer.SerializeObject(USER_SETTINGS_PATH, objectToSerialize);
        }
        private void DeserializeSettings()
        {
            Serializer serializer = new Serializer();

            try
            {
                ObjectToSerialize objectToSerialize = serializer.DeSerializeObject(USER_SETTINGS_PATH);

                this.localityQuerySetupPanel1.Settings = (UserQuerySettings)objectToSerialize.Queries[0];
                this.localityQuerySetupPanel2.Settings = (UserQuerySettings)objectToSerialize.Queries[1];
            }
            catch(System.Runtime.Serialization.SerializationException)
            {

                Console.WriteLine("There was an error reading the user settings file. \nDefault settings have been used instead.");

            }
        }