| | |
| | | [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; |
| | |
| | | |
| | | 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() |
| | |
| | | model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//竞价物品信息刷新
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent; |
| | | }
|
| | | |
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | |
| | | |
| | | private void secondEvent()
|
| | | {
|
| | | Times += 1;
|
| | | if (Times >= 3 && auctionHelpModel.isOpenPanel)
|
| | | {
|
| | | auctionHelpModel.isOpenPanel = false;
|
| | | }
|
| | | if (IsSendBool)
|
| | | {
|
| | | IsSendBool = false;
|
| | |
| | | } |
| | | private void BiddingItemInfoUpdate()
|
| | | {
|
| | | |
| | |
|
| | | } |
| | | private void OnClickJobTipBtn()
|
| | | {
|
| | |
| | | } |
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | |
| | |
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
|
| | | {
|
| | |
| | | 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++)
|
| | |
| | | if (index != config.JobEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
|
| | | IsSendBool = true; |
| | | IsSendBool = true;
|
| | | SetTipText();
|
| | | }
|
| | | });
|
| | |
| | | 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++)
|
| | |
| | | if (index != config.TypeEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
|
| | | IsSendBool=true; |
| | | IsSendBool = true;
|
| | | SetTipText();
|
| | | }
|
| | | });
|
| | |
| | | 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);
|
| | | }
|
| | |
| | | {
|
| | | 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))
|
| | |
| | | }
|
| | | } |
| | | |
| | | private void ListSort()
|
| | | private void ListSort()
|
| | | {
|
| | | FullServiceAuctionListSort.Clear();
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | |
| | | {
|
| | | FullServiceAuctionListSort.Add(vlaue);
|
| | | }
|
| | | } |
| | | }
|
| | | }
|
| | | FullServiceAuctionListSort.Sort(Compare);
|
| | | }
|
| | |
| | | if (havex1.CompareTo(havey1) != 0)//是否参与
|
| | | {
|
| | | return -havex1.CompareTo(havey1);
|
| | | } |
| | | }
|
| | | return 1;
|
| | | }
|
| | | private bool IsHighestPrice(string GUID)
|
| | |
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | }
|
| | | } |
| | | |
| | | } |