Example #1
0
 protected Guincho(Porte tipoPorte)
 {
     TipoPorte = tipoPorte;
 }
Example #2
0
 public GuinchoMedio(Porte porte) : base(porte)
 {
 }
 public VeiculoMedio(string modelo, Porte porte) : base(modelo, porte)
 {
 }
 protected Veiculo(string modelo, Porte porte)
 {
     Modelo = modelo;
     Porte  = porte;
 }
 public override void onAwake()
 {
     porte = GetComponent <Porte>();
 }
 public abstract Veiculo CriarVeiculo(string modelo, Porte porte);
Example #7
0
 public GuinchoAbstrato(Porte porte, Status status)
 {
     Porte  = porte;
     Status = status;
 }
Example #8
0
 public Veiculo(string Modelo, Porte porte)
 {
     Modelo = modelo;
     Porte  = porte;
 }
 public VeiculoPequeno(string nome, Porte porte) : base(nome, porte)
 {
 }
Example #10
0
 public override Veiculo CriarVeiculo(string modelo, Porte tipoPorte)
 {
     return(VeiculoCriador.Criar(modelo, tipoPorte));
 }
Example #11
0
 public static Porte BuscarByName(Porte porte)
 {
     return(ctx.Portes.Where(x => x.Tamanho == porte.Tamanho).FirstOrDefault());
 }
Example #12
0
 public VeiculoGrande(string nome, Porte porte) : base(nome, porte)
 {
 }
 protected Veiculo(string modelo, Porte tipoPorte)
 {
     Modelo    = modelo;
     TipoPorte = tipoPorte;
 }
    public void fermePorte()
    {
        Porte p = this.GetComponent <Porte> ();

        p.fermePorte();
    }
        public override void LireXml(out List<ZoneAbstraite> listZone, out List<AccesAbstrait> listAcces, out List<Personnage> listPersonnage)
        {
            listZone = new List<ZoneAbstraite>();
            listAcces = new List<AccesAbstrait>();
            listPersonnage = new List<Personnage>();

            using (var reader = XmlReader.Create("Pacman.xml"))
            {
                reader.Read();
                while (!reader.EOF)
                {
                    if (reader.Name.ToLower() == "zone")
                    {
                        var stringId = reader["ID"];
                        if (stringId == null)
                        {
                            reader.Read();
                            continue;
                        }
                        var id = int.Parse(stringId);

                        reader.ReadToFollowing("POSITIONX");
                        reader.Read();
                        var positionX = int.Parse(reader.Value);

                        reader.ReadToFollowing("POSITIONY");
                        reader.Read();
                        var positionY = int.Parse(reader.Value);

                        reader.ReadToFollowing("VALUE");
                        reader.Read();
                        var valeur = reader.Value;

                        Objet objet = null;
                        switch (valeur)
                        {
                            case "NOURRITURE":
                                objet = new PacGomme();
                                break;
                            case "BONUS":
                                objet = new SuperPacGomme();
                                break;
                            case "PORTE":
                                objet = new Porte();
                                break;
                        }

                        listZone.Add(new Zone(id, positionX, positionY, new List<Objet> { objet }));
                    }
                    else if (reader.Name.ToLower() == "acces")
                    {
                        var stringId = reader["ID"];
                        if (stringId == null)
                        {
                            reader.Read();
                            continue;
                        }
                        var id = int.Parse(stringId);

                        reader.ReadToFollowing("ENTREE");
                        reader.Read();
                        var idEntree = int.Parse(reader.Value);

                        reader.ReadToFollowing("SORTIE");
                        reader.Read();
                        var idSortie = int.Parse(reader.Value);

                        var entree = listZone.First(a => a.Id == idEntree);
                        var sortie = listZone.First(a => a.Id == idSortie);
                        listAcces.Add(new Acces(id, entree, sortie));
                    }
                    else if (reader.Name.ToLower() == "personnage")
                    {
                        var stringId = reader["ID"];
                        if (stringId == null)
                        {
                            reader.Read();
                            continue;
                        }

                        var id = int.Parse(stringId);

                        reader.ReadToFollowing("POSITION");
                        reader.Read();
                        var position = int.Parse(reader.Value);

                        reader.ReadToFollowing("TYPE");
                        reader.Read();
                        var type = reader.Value;

                        Personnage personnage = null;
                        switch (type)
                        {
                            case "FANTOME":
                                personnage = new Fantome(id);
                                break;
                            case "PACMAN":
                                personnage = new PacMan(id);
                                break;
                        }

                        if (personnage != null) personnage.ZoneAbstraite = listZone.First(a => a.Id == position);

                        listPersonnage.Add(personnage);
                    }
                    else if (reader.Name.ToLower() == "configuration")
                    {
                        //A FAIRE
                        reader.Read();
                    }
                    else
                    {
                        reader.Read();
                    }
                }
            }
        }
Example #16
0
        public void Show(ObservableCollection <mPJ_Ext> lista_empresas, List <object> commands)
        {
            try
            {
                List <string> _periodo   = new List <string>();
                List <string> _atividade = new List <string>();
                List <string> _setor     = new List <string>();
                List <string> _porte     = new List <string>();
                List <string> _usolocal  = new List <string>();

                foreach (mPJ_Ext at in lista_empresas)
                {
                    _atividade.Add(at.AtividadePrincipal.ToUpper().TrimEnd());

                    if (at.Segmentos.Agronegocio == true)
                    {
                        _setor.Add("AGRONEGOCIO");
                    }

                    if (at.Segmentos.Comercio == true)
                    {
                        _setor.Add("COMERCIO");
                    }

                    if (at.Segmentos.Industria == true)
                    {
                        _setor.Add("INDUSTRIA");
                    }

                    if (at.Segmentos.Servicos == true)
                    {
                        _setor.Add("SERVICOS");
                    }

                    if (at.Formalizada.Porte == 1)
                    {
                        _porte.Add("MEI");
                    }

                    if (at.Formalizada.Porte == 2)
                    {
                        _porte.Add("EIRELI");
                    }

                    if (at.Formalizada.Porte == 3)
                    {
                        _porte.Add("ME");
                    }

                    if (at.Formalizada.Porte == 4)
                    {
                        _porte.Add("EPP");
                    }

                    if (at.Formalizada.Porte == 5)
                    {
                        _porte.Add("OUTROS");
                    }

                    if (at.Formalizada.UsoLocal == 1)
                    {
                        _usolocal.Add("ESTABELECIMENTO");
                    }

                    if (at.Formalizada.UsoLocal == 2)
                    {
                        _usolocal.Add("SOMENTE PARA CORRESPONDENCIA");
                    }
                }


                var c_atividade = from x in _atividade
                                  group x by x into g
                                  let count = g.Count()
                                              orderby count descending
                                              select new { Value = g.Key, Count = count };

                foreach (var x in c_atividade)
                {
                    Atividade.Add(new KeyValuePair <string, int>(x.Value, x.Count));
                }

                var c_setor = from x in _setor
                              group x by x into g
                              let count = g.Count()
                                          orderby count descending
                                          select new { Value = g.Key, Count = count };

                foreach (var x in c_setor)
                {
                    Setor.Add(new KeyValuePair <string, int>(x.Value, x.Count));
                }

                var c_usolocal = from x in _usolocal
                                 group x by x into g
                                 let count = g.Count()
                                             orderby count descending
                                             select new { Value = g.Key, Count = count };

                foreach (var x in c_usolocal)
                {
                    UsoLocal.Add(new KeyValuePair <string, int>(x.Value, x.Count));
                }

                var c_porte = from x in _porte
                              group x by x into g
                              let count = g.Count()
                                          orderby count descending
                                          select new { Value = g.Key, Count = count };

                foreach (var x in c_porte)
                {
                    Porte.Add(new KeyValuePair <string, int>(x.Value, x.Count));
                }
            }
            catch { }
        }
Example #17
0
 public Guincho(Porte porte, Status status) : base(porte, status)
 {
 }
Example #18
0
 public override Veiculo CriarVeiculo(string nome, Porte porte)
 {
     return(new VeiculoCreator().Criar(nome, porte));
 }
 public abstract Veiculo CriarVeiculo(string nome, Porte porte);
Example #20
0
 protected Guincho(Porte porte)
 {
     Porte = porte;
 }
 public override Veiculo CriarVeiculo(string modelo, Porte porte)
 => VeiculoCreator.Criar(modelo, porte);
 public VeiculoPequeno(string modelo, Porte porte) : base(modelo, porte)
 {
 }
Example #23
0
 public override Veiculo CriarVeiculo(string modelo, Porte porte)
 {
     return(VeiculoFactory.Criar(porte, modelo));
 }
 public VeiculoGrande(string modelo, Porte porte) : base(modelo, porte)
 {
 }
Example #25
0
 public Guincho(Porte porte)
 {
     this.Porte = porte;
 }
Example #26
0
 public override Veiculo CriarVeiculo(string modelo, Porte porte)
 {
     return(VeiculoCreator.Criar(modelo, porte));
 }
 protected Veiculo(string nome, Porte porte)
 {
     Nome  = nome;
     Porte = porte;
 }
Example #28
0
 public GuinchoPequeno(Porte porte) : base(porte)
 {
 }
Example #29
0
 public VeiculoAbstrato CriarVeiculo(Porte porte, string modelo, string placa, int aroPneu)
 {
     return(new Veiculo(porte, aroPneu, modelo, placa));
 }
Example #30
0
 public GuinchoGrande(Porte porte) : base(porte)
 {
 }
    public void desactivatePorte()
    {
        Porte p = this.GetComponent <Porte> ();

        p.isDecorative = true;
    }