Example #1
0
        public void InitializeStack(List<string> listAddress)
        {
            //this.Width = SystemParameters.PrimaryScreenWidth;
            //this.Height = SystemParameters.PrimaryScreenHeight;
            List<ItemInfo> Listitems = new List<ItemInfo>();
            foreach (var item in listAddress)
            {
                ItemInfo info = new ItemInfo();
                info.Source = item;
                Listitems.Add(info);
            }
            List<ItemInfo> ListItems = Listitems;
            Stack<PopCell> PopCellQueue = new Stack<PopCell>();
            #region 资源分类
            for (int i = 0; i < ListItems.Count; i++)
            {

                TypeEnum_BigScreen_图片(PopCellQueue, ListItems[i]);
            }
            #endregion
            int n = PopCellQueue.Count;
            for (int i = 0; i < n; i++)
            {
                StackRight.Push(PopCellQueue.Pop());
            }
            InitializeCanvas();
        }
Example #2
0
        private void TypeEnum_BigScreen_图片(Stack<PopCell> PopCellQueue, ItemInfo itemInfo)
        {
            PopCell cell = new PopCell();
            cell.TilePosition = ICESetting.Control.PopCell.TilePositionEnum.Other;

            cell.CellSource = itemInfo.Source;
            cell.X = (this.Width - cell.Width) / 2.0;
            cell.Y = (this.Height - cell.Height) / 2.0;
            cell.ID = itemInfo.ID;
            cell.UID = itemInfo.UID;

            PopCellQueue.Push(cell);

            PopCellList.Add(cell);
        }