コード例 #1
0
        public Leilao()
        {
            InitializeComponent();

            myGrid = grid;
            //grid.RowDefinitions = new RowDefinitionCollection();
            //grid.ColumnDefinitions = new ColumnDefinitionCollection();

            //for (int MyCount = 0; MyCount < 5; MyCount++)
            //{

            //    grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            //    grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });

            //}
            Cell cell = null;


            for (int i = 50; i > 0; i--)
            {
                var l = new leilao();

                mydata.Push(new leilao());
            }


            #region API
            //cenas da api

            int col = 3;
            int row = mydata.Count() / col + 1;
            for (int i = 0; i < row; i++)
            {
                for (int j = 0; j < col; j++)
                {
                    if (i * col + j <= 49)
                    {
                        myGrid.Children.Add(new Cell(mydata.Pop()), j, i);
                    }
                }
            }



            #endregion

            #region GRID

            #endregion

            //evento

            //void btnDirectory_Clicked(object sender, EventArgs e)
            //{

            //    Navigation.PushAsync(new Page1(((leilao)sender).ID));
            //}
            //myTimer = new Timer(TimerCallback, null, 0, 1000);
        }
コード例 #2
0
        public Cell(leilao leilota)
        {
            this.ID = leilota.ID;
            InitializeComponent();
            lblTitle.Text = leilota.titulo;
            this.titulo   = leilota.titulo;
            this.valor    = leilota.valor;
            timer         = leilota.data_fim;
            this.data_fim = leilota.data_fim;
            endDate       = leilota.data_fim;

            // Image.Source = leilota.image;
            this.image = leilota.image;
        }