Exemplo n.º 1
0
        public static KioskoModel GetKioskoConfiguration(bool downloadFromServer = false)
        {
            var file = Properties.Settings.Default.CONFIGURATION_PATH;

            if (!System.IO.File.Exists(file) || downloadFromServer)
            {
                CubiQManagerService.RequestKioskoGeneralInformation();
            }

            var response = ReadFile <KioskoModel>(file);

            //if file exists but has no content
            if (response == null)
            {
                CubiQManagerService.RequestKioskoGeneralInformation();
                response = ReadFile <KioskoModel>(file);
            }
            return(response);
        }
Exemplo n.º 2
0
        public static KioskoModel GetKioskoConfiguration(bool downloadFromServer = false)
        {
            var file = Properties.Settings.Default.CONFIGURATION_PATH;

            if (!System.IO.File.Exists(file))
            {
                if (downloadFromServer)
                {
                    if (CubiQManagerService.RequestKioskoGeneralInformation())
                    {
                        return(ReadFile <KioskoModel>(file));
                    }
                }
            }
            else
            {
                return(ReadFile <KioskoModel>(file));
            }

            return(new KioskoModel());
        }