public void CriarRegiaoPadrao(Util.Util.Lingua idioma, string nomeRegiao, string idiomaPath) { Persistencia.Arquivo_RGN argn = new Persistencia.Arquivo_RGN(); idiomaPath = Util.Util.TrataDiretorio(idiomaPath); //argn.separadorDecimal = (this.sdecimal == Util.Util.SeparadorDecimal.VIRGULA ? Encoding.ASCII.GetBytes(",")[0] : Encoding.ASCII.GetBytes(".")[0]); this.opcaoAmPm_Ponto = (byte)Util.Util.OpcaoAmPm_Ponto.EXIBIR_AM_PM; switch (idioma) { case Util.Util.Lingua.Portugues: { this.formatoDataHora = (byte)Util.Util.FormatoDataHora.FORMATO_24H; this.unidadeVelocidade = (byte)Util.Util.UnidadeVelocidade.UNIDADE_KMpH; this.unidadeTemperatura = (byte)Util.Util.UnidadeTemperatura.UNIDADE_CELSIUS; this.moeda = (byte)Util.Util.Moeda.MOEDA_REAL; this.separadorDecimal = Encoding.ASCII.GetBytes(",")[0]; this.nome = Encoding.ASCII.GetBytes(nomeRegiao.PadRight(16, '\0').Substring(0, 16)); this.idiomaPath = Encoding.ASCII.GetBytes(idiomaPath.Substring(1).PadRight(64, '\0')); } break; case Util.Util.Lingua.Espanhol: { this.formatoDataHora = (byte)Util.Util.FormatoDataHora.FORMATO_24H; this.unidadeVelocidade = (byte)Util.Util.UnidadeVelocidade.UNIDADE_KMpH; this.unidadeTemperatura = (byte)Util.Util.UnidadeTemperatura.UNIDADE_CELSIUS; this.moeda = (byte)Util.Util.Moeda.MOEDA_EURO; this.separadorDecimal = Encoding.ASCII.GetBytes(",")[0]; this.nome = Encoding.ASCII.GetBytes(nomeRegiao.PadRight(16, '\0').Substring(0, 16)); this.idiomaPath = Encoding.ASCII.GetBytes(idiomaPath.Substring(1).PadRight(64, '\0')); } break; case Util.Util.Lingua.Frances: { this.formatoDataHora = (byte)Util.Util.FormatoDataHora.FORMATO_24H; this.unidadeVelocidade = (byte)Util.Util.UnidadeVelocidade.UNIDADE_KMpH; this.unidadeTemperatura = (byte)Util.Util.UnidadeTemperatura.UNIDADE_CELSIUS; this.moeda = (byte)Util.Util.Moeda.MOEDA_EURO; this.separadorDecimal = Encoding.ASCII.GetBytes(",")[0]; this.nome = Encoding.ASCII.GetBytes(nomeRegiao.PadRight(16, '\0').Substring(0, 16)); this.idiomaPath = Encoding.ASCII.GetBytes(idiomaPath.Substring(1).PadRight(64, '\0')); } break; default: // O padrão será o Inglês { this.formatoDataHora = (byte)Util.Util.FormatoDataHora.FORMATO_AM_PM; this.opcaoAmPm_Ponto = (byte)Util.Util.OpcaoAmPm_Ponto.EXIBIR_PONTO; this.unidadeVelocidade = (byte)Util.Util.UnidadeVelocidade.UNIDADE_MPH; this.unidadeTemperatura = (byte)Util.Util.UnidadeTemperatura.UNIDADE_FAHRENHEIT; this.moeda = (byte)Util.Util.Moeda.MOEDA_DOLAR; this.separadorDecimal = Encoding.ASCII.GetBytes(".")[0]; this.nome = Encoding.ASCII.GetBytes(nomeRegiao.PadRight(16, '\0').Substring(0, 16)); this.idiomaPath = Encoding.ASCII.GetBytes(idiomaPath.Substring(1).PadRight(64, '\0')); } break; } }
public Arquivo_RGN(Util.Util.Lingua idioma) { switch (idioma) { case Util.Util.Lingua.Portugues: CarregaPortugues(); break; case Util.Util.Lingua.Ingles: CarregaIngles(); break; case Util.Util.Lingua.Espanhol: CarregaEspanhol(); break; case Util.Util.Lingua.Frances: CarregaFrances(); break; } }