private static XmlDocument LoadXmlDocument()
        {
            var configFile = Path.Combine(DirectoryEx.GetCurrentDirectory(), "app.config");

            if (!File.Exists(configFile))
            {
                configFile = FileEx.GetExecutablePath() + ".config";
            }
            if (!File.Exists(configFile))
            {
                throw new MobileApplicationException("App.Config file does not exist");
            }

            var xmlDocument = new XmlDocument();

            using (var reader = new StreamReader(configFile))
                xmlDocument.LoadXml(reader.ReadToEnd());
            return(xmlDocument);
        }