少年修仙传客户端代码仓库
client_linchunjie
2019-03-21 0780d6f78efd25030fdbb0701a14d43d73a0ebe2
System/Auction/FullServiceAuctionWin.cs
@@ -26,11 +26,12 @@
        [SerializeField] Button m_TypeTipBtn;
        [SerializeField] Text m_JobTipText;
        [SerializeField] Text m_TypeTipText;
         List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//全服拍品列表
        List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//全服拍品列表
        AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
        AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
        private bool IsSendBool = true;
        private int Times = 0;
        protected override void BindController()
        {
            m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
@@ -48,25 +49,28 @@
        protected override void OnPreOpen()
        {
            IsSendBool = true;
            Times = 0;
            auctionHelpModel.isOpenPanel = true;
            IsSendBool = false;
            GlobalTimeEvent.Instance.secondEvent += secondEvent;
            model.FullServiceAuctionUpdate += FullServiceAuctionUpdate;//数据请求刷新
            model.RefreshAuctionItemUpdate += RefreshAuctionItemUpdate;//刷新
            model.ClearAuctionUpdate += ClearAuctionUpdate;//清除
            model.BiddingItemInfoUpdate += BiddingItemInfoUpdate;//竞价物品信息刷新
            GlobalTimeEvent.Instance.secondEvent += secondEvent;
            model.BiddingItemInfoUpdate += BiddingItemInfoUpdate;//竞价物品信息刷新
            Reset();
            CloseTip();
            ListSort();
            OnCreateGridLineCell(m_ScrollerController);
            OnCreateGridLineCellJob(m_ScrollerControllerJob);
            OnCreateGridLineCellType(m_ScrollerControllerType);
            OnCreateGridLineCellType(m_ScrollerControllerType);
            OnCreateGridLineCellItem(m_ScrollerControllerItem);
            SetTipText();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
@@ -77,7 +81,7 @@
            model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//竞价物品信息刷新
            GlobalTimeEvent.Instance.secondEvent -= secondEvent;
        }
        protected override void OnAfterClose()
        {
        }
@@ -85,6 +89,11 @@
        private void secondEvent()
        {
            Times += 1;
            if (Times >= 3 && auctionHelpModel.isOpenPanel)
            {
                auctionHelpModel.isOpenPanel = false;
            }
            if (IsSendBool)
            {
                IsSendBool = false;
@@ -105,7 +114,7 @@
        }
        private void BiddingItemInfoUpdate()
        {
        }
        private void OnClickJobTipBtn()
        {
@@ -118,7 +127,7 @@
        }
        private void OnCreateGridLineCell(ScrollerController gridCtrl)
        {
            gridCtrl.Refresh();
            for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
            {
@@ -172,7 +181,7 @@
            if (index != -1)
            {
                var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
                if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length!=0)
                if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length != 0)
                {
                    gridCtrl.Refresh();
                    for (int i = 0; i < fullServiceAuction.ChooseItem1.Length; i++)
@@ -200,7 +209,7 @@
                    if (index != config.JobEntry)
                    {
                        auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
                        IsSendBool = true;
                        IsSendBool = true;
                        SetTipText();
                    }
                });
@@ -217,7 +226,7 @@
            if (index != -1)
            {
                var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
                if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length!=0)
                if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length != 0)
                {
                    gridCtrl.Refresh();
                    for (int i = 0; i < fullServiceAuction.ChooseItem2.Length; i++)
@@ -245,7 +254,7 @@
                    if (index != config.TypeEntry)
                    {
                        auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
                        IsSendBool=true;
                        IsSendBool = true;
                        SetTipText();
                    }
                });
@@ -271,9 +280,9 @@
            else
            {
                model.LocationQuery = false;
            }
            }
            gridCtrl.Refresh();
            for (int i = 0; i <FullServiceAuctionListSort.Count; i++)
            for (int i = 0; i < FullServiceAuctionListSort.Count; i++)
            {
                gridCtrl.AddCell(ScrollerDataType.Header, i);
            }
@@ -297,14 +306,14 @@
            {
                AuctionInquiry.Instance.SendQueryAuction(string.Empty, sendNumber, 1);
            }
        }
        private void CloseTip()
        {
            m_JobTip.SetActive(false);
            m_TypeTip.SetActive(false);
        }
        private  void SetTipText()
        private void SetTipText()
        {
            var selectedGenreNow = auctionHelpModel.SelectedGenreNow;
            if (auctionHelpModel.FullServiceAuctionDic.ContainsKey(selectedGenreNow))
@@ -323,7 +332,7 @@
            }
        }
        private void  ListSort()
        private void ListSort()
        {
            FullServiceAuctionListSort.Clear();
            var sendNumber = AuctionInquiry.Instance.GetSendNumber();
@@ -343,7 +352,7 @@
                    {
                        FullServiceAuctionListSort.Add(vlaue);
                    }
                }
                }
            }
            FullServiceAuctionListSort.Sort(Compare);
        }
@@ -360,7 +369,7 @@
            if (havex1.CompareTo(havey1) != 0)//是否参与
            {
                return -havex1.CompareTo(havey1);
            }
            }
            return 1;
        }
        private bool IsHighestPrice(string GUID)
@@ -383,7 +392,7 @@
                isBool = true;
            }
            return isBool;
        }
        }
    }
}