void ReleaseDesignerOutlets()
        {
            if (AdditionalValueCell != null)
            {
                AdditionalValueCell.Dispose();
                AdditionalValueCell = null;
            }

            if (CommentCell != null)
            {
                CommentCell.Dispose();
                CommentCell = null;
            }

            if (IconCell != null)
            {
                IconCell.Dispose();
                IconCell = null;
            }

            if (MainValueCell != null)
            {
                MainValueCell.Dispose();
                MainValueCell = null;
            }

            if (NameCell != null)
            {
                NameCell.Dispose();
                NameCell = null;
            }
        }
Пример #2
0
        private IconCell FindMin(List <IconCell> list)
        {
            IconCell nearItem = null;
            float    dis      = float.MaxValue;

            foreach (IconCell iconCell in list)
            {
                float nowDis = Math.Abs(iconCell.Y - 231);
                if (nowDis < dis)
                {
                    nearItem = iconCell;
                    dis      = nowDis;
                }
            }
            return(nearItem);
        }
Пример #3
0
        void ReleaseDesignerOutlets()
        {
            if (CityCell != null)
            {
                CityCell.Dispose();
                CityCell = null;
            }

            if (IconCell != null)
            {
                IconCell.Dispose();
                IconCell = null;
            }

            if (NameCell != null)
            {
                NameCell.Dispose();
                NameCell = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (CommentCell != null)
            {
                CommentCell.Dispose();
                CommentCell = null;
            }

            if (IconCell != null)
            {
                IconCell.Dispose();
                IconCell = null;
            }

            if (PeriodCell != null)
            {
                PeriodCell.Dispose();
                PeriodCell = null;
            }

            if (PeriodIconCell != null)
            {
                PeriodIconCell.Dispose();
                PeriodIconCell = null;
            }

            if (TimeCell != null)
            {
                TimeCell.Dispose();
                TimeCell = null;
            }

            if (UserCell != null)
            {
                UserCell.Dispose();
                UserCell = null;
            }
        }
Пример #5
0
        public override void RestartGame()
        {
            base.RestartGame();
            #region 初始化各个元素

            c1ItemList.Clear();
            c2ItemList.Clear();
            c3ItemList.Clear();
            for (int i = 0; i < 7; i++)
            {
                IconCell ic = new IconCell();
                ic.Index = i + 1;
                ic.Y     = i * 77;
                ic.X     = 52;
                c1ItemList.Add(ic);
            }
            for (int i = 0; i < 7; i++)
            {
                IconCell ic = new IconCell();
                ic.Index = i + 1;
                ic.Y     = i * 77;
                ic.X     = 141;
                c2ItemList.Add(ic);
            }
            for (int i = 0; i < 7; i++)
            {
                IconCell ic = new IconCell();
                ic.Index = i + 1;
                ic.Y     = i * 77;
                ic.X     = 230;
                c3ItemList.Add(ic);
            }
            #endregion
            trialLeft = 3;
            InitState();
        }