Beispiel #1
0
 internal void SetDestinationDir(string year, string target)
 {
     if (Destiny.DestinationDir(year, target))
     {
         DirectoryFolder.Add(year);
     }
 }
Beispiel #2
0
        public ServiceResult <List <DestinyBaseDto> > Create(List <DestinyBaseDto> Destinies)
        {
            foreach (var destiny in Destinies)
            {
                if (destiny.Id == Guid.Empty)//si no existe en la DB
                {
                    Destiny newDestiny = new Destiny()
                    {
                        Id                    = new Guid(),
                        TransportId           = destiny.TransportId,
                        CategoryId            = destiny.CategoryId,
                        CityId                = destiny.CityId,
                        CodeLiquidationId     = destiny.CodeLiquidationId,
                        CountryId             = destiny.CountryId,
                        SolicitationSubsidyId = destiny.SolicitationSubsidyId,
                        Days                  = destiny.Days,
                        StartDate             = DateTime.Parse(destiny.StartDate.Day.ToString() + "/" +
                                                               destiny.StartDate.Month.ToString() + "/" +
                                                               destiny.StartDate.Year.ToString()),
                        ProvinceId                = destiny.ProvinceId,
                        AdvanceCategory           = destiny.AdvanceCategory,
                        PercentageCodeLiquidation = destiny.PercentageCodeLiquidation
                    };

                    _context.Destinies.Add(newDestiny);
                }
            }
            _context.SaveChanges();
            return(new ServiceResult <List <DestinyBaseDto> >(Destinies));
        }
Beispiel #3
0
 public DebugUI(Destiny game)
     : base(game)
 {
     Enabled     = true;
     TextureName = @"Texture";
     FontName    = @"Font1";
     Initialize();
 }
Beispiel #4
0
 public BouncingUI(Destiny game)
     : base(game)
 {
     Enabled     = false;
     AutoSizeX   = false;
     AutoSizeY   = false;
     TextureName = @"Texture";
     FontName    = @"Font1";
     Size        = new Vector2(100, 100);
 }
        public IPipeLine <T> Load()
        {
            if (!this.Valid)
            {
                return(this);
            }

            Destiny.Load(DataToLoad);
            return(this);
        }
Beispiel #6
0
        public MainUI(Destiny game)
            : base(game)
        {
            AddChild(BouncingUI = new BouncingUI(game));
            AddChild(DebugUI    = new DebugUI(game));

            Enabled     = true;
            AutoSizeX   = false;
            TextureName = @"Texture";
            FontName    = @"Font1";
            AddText("Keys:");
        }
        public override IHttpMessage Serialize()
        {
            IHttpMessage ret = null;

            if (Payload is OverlayRequest)
            {
                var tmp = new HttpRequest()
                {
                    Host = Destiny.ToString()
                };

                ret = (HttpRequest)tmp;
            }
            else if (Payload is OverlayReply)
            {
                var tmp = new HttpReply();

                ret = (HttpReply)tmp;
            }

            // head
            ret.Url = Payload.GetType().FullName;

            ret.AddField(new HttpField(HttpConst.MessageSource, Source));
            ret.AddField(new HttpField(HttpConst.MessageDestiny, Destiny));
            ret.AddField(new HttpField(HttpConst.MessagePath, Path));
            ret.AddField(new HttpField(HttpConst.MessageHops, Hops));

            // body
            ret.CreateBody();
            ret.Body.CreateStream();

            if (Payload != null)
            {
                var formatter = new BinaryFormatter();
                formatter.Serialize(ret.Body.ContentStream, Payload);
                ret.Body.ContentType = HttpConst.ContentTypeDodoNetObject;
            }
            else
            {
                ret.Body.ContentType = "";
            }

            return(ret);
        }
Beispiel #8
0
        public void Add(DestinyDTO dto)
        {
            if (_db.Destinies.Any(x => x.Email == dto.Email && x.IdOrigin == dto.IdOrigin))
            {
                throw new DestinyAlreadyExistException();
            }

            var destiny = new Destiny
            {
                IdDestiny = Guid.NewGuid(),
                IdOrigin  = dto.IdOrigin,
                Email     = dto.Email
            };

            _db.Destinies.Add(destiny);

            _db.SaveChanges();
        }
Beispiel #9
0
        public override string ToString()
        {
            switch (Type)
            {
            case MoveType.StandardMove:
                if (Origin != null && Origin.PieceInCell != null && Destiny != null)
                {
                    return(Origin.PieceInCell.ToString() + " " + Origin.ToString() + Destiny.ToString());
                }
                else
                {
                    return("Invalid Move");
                }

            case MoveType.QueenSideCasteling:
                return(ChessPGN.PGN_NOTATION_MOVE_QUEENGSIDE_CASTLING);

            case MoveType.KingSideCasteling:
                return(ChessPGN.PGN_NOTATION_MOVE_KINKGSIDE_CASTLING);

            default:
                return("Invalid Move");
            }
        }
 public string DestinyToString()
 {
     return(string.Join("", Destiny.Select(d => d.Name)));
 }
Beispiel #11
0
 public TerrainCube(Destiny game)
     : base(game, new GeometryBuffers <CubeBuffer>(game, new CubeBufferFactory()))
 {
 }
 public SymbolList SkipFirstDestiny()
 {
     return(Destiny.SkipFirst());
 }
 public override string ToString()
 {
     return(Source.Name + "=>" + string.Join(" ", Destiny.Select(d => d.Name)));
 }
Beispiel #14
0
 public Controller(Destiny game)
 {
     Game = game;
     Add(new KeyboardController(Game));
     Add(new MouseController(Game));
 }
Beispiel #15
0
 public PolygonBuffer(Destiny game, int maxMeshCount, int meshPolygons, int polygonVertexCount)
     : base(game)
 {
     Initialize(maxMeshCount, meshPolygons, polygonVertexCount);
 }
Beispiel #16
0
 public BaseUI(Destiny game)
     : base(game)
 {
 }
Beispiel #17
0
 internal void GenerateFolderList()
 {
     DirectoryFolder = Destiny.GetExistingDirectories(_target);
 }
Beispiel #18
0
        private IList <string> GetAllFiles()
        {
            var metadataFile = Destiny.GetAllFiles(DirectoryFolder, _target);

            return(metadataFile);
        }
Beispiel #19
0
 public CubeBuffer CreateBuffer(Destiny game)
 {
     return(new CubeBuffer(game, 32 * 32 * 32));
 }
Beispiel #20
0
 public DestinyDTO(Destiny d)
 {
     IdDestiny = d.IdDestiny;
     IdOrigin  = d.IdOrigin;
     Email     = d.Email;
 }
Beispiel #21
0
 /// <summary>
 /// Get object hash code
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 => Destiny.GetHashCode() ^ DestinyProperty.GetHashCode() ^ Source.GetHashCode() ^ (SourceProperty?.GetHashCode() ?? 0);
Beispiel #22
0
 public TileBuffer(Destiny game, int tileCount)
     : base(game, tileCount, Tile.TILE_FACE_COUNT, Tile.TILE_FACE_VERTICES)
 {
 }
Beispiel #23
0
 public TileBuffer CreateBuffer(Destiny game)
 {
     return(new TileBuffer(game, 256 * 256));
 }
Beispiel #24
0
 public BasicController(Destiny game)
 {
     Game = game;
 }
Beispiel #25
0
 public Crosshair(Destiny game)
     : base(game)
 {
 }
Beispiel #26
0
 public GeometryBuffers(Destiny game, IPolygonBufferFactory <TB> bufferFactory)
     : base(game)
 {
     BufferFactory = bufferFactory;
 }
Beispiel #27
0
 public MouseController(Destiny game)
     : base(game)
 {
     Mouse.WindowHandle = Game.Window.Handle;
 }
Beispiel #28
0
 public World(Destiny game)
     : base(game)
 {
     AddChild(UI     = new MainUI(game));
     AddChild(Avatar = new Avatar(game));
 }
Beispiel #29
0
 public CubeBuffer(Destiny game, int cubeCount) : base(game, cubeCount, Cube.CUBE_FACE_COUNT, Cube.CUBE_FACE_VERTICES)
 {
 }
Beispiel #30
0
 public InputControlMapper(Destiny game, Avatar avatar, MainUI mainUI)
 {
     _game   = game;
     _avatar = avatar;
     _mainUI = mainUI;
 }