91 lines
1.9 KiB
C#
91 lines
1.9 KiB
C#
![]() |
// ***********************************************************************
|
|||
|
// Assembly : Game
|
|||
|
// Author : Kimch
|
|||
|
// Created : 2021-06-07
|
|||
|
// Description :
|
|||
|
// Last Modified By :
|
|||
|
// Last Modified On :
|
|||
|
// ***********************************************************************
|
|||
|
// <copyright file= "HomeWindow.View" company="Kunpo"></copyright>
|
|||
|
// <summary></summary>
|
|||
|
// ***********************************************************************
|
|||
|
namespace G.UI
|
|||
|
{
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
partial class BusinessWindow
|
|||
|
{
|
|||
|
#region Field
|
|||
|
|
|||
|
#pragma warning disable CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|||
|
[KUIFlag]
|
|||
|
KUIList __listAffairs;
|
|||
|
[KUIFlag]
|
|||
|
Button _btnBack;
|
|||
|
#pragma warning restore CS0649 // 从未对字段赋值,字段将一直保持其默认值 null
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Method
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
private void InitView()
|
|||
|
{
|
|||
|
SetViewData();
|
|||
|
__listAffairs.AddTemplate<BusinessItemWidget>();
|
|||
|
_btnBack.onClick.AddListener(this.OnBackBtnClick);
|
|||
|
}
|
|||
|
|
|||
|
private void RefreshView()
|
|||
|
{
|
|||
|
__listAffairs.Clear();
|
|||
|
if (BusinessProxy.Instance)
|
|||
|
{
|
|||
|
var affairs = BusinessProxy.Instance.GetBusinessInfos();
|
|||
|
foreach (var affair in affairs)
|
|||
|
{
|
|||
|
__listAffairs.GetItem().SetData(affair);
|
|||
|
if (affair.status == 0)
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
private void UpdateView()
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
private void OnBackBtnClick()
|
|||
|
{
|
|||
|
CloseWindow(this);
|
|||
|
}
|
|||
|
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Mediator
|
|||
|
|
|||
|
//readonly int[] _notificationInterests = new int[]
|
|||
|
//{
|
|||
|
|
|||
|
//};
|
|||
|
|
|||
|
//public override System.Collections.Generic.IList<int> ListNotificationInterests()
|
|||
|
//{
|
|||
|
// return _notificationInterests;
|
|||
|
//}
|
|||
|
|
|||
|
//public override void HandleNotification(PureMVC.Interfaces.INotification notification)
|
|||
|
//{
|
|||
|
// RefreshView();
|
|||
|
//}
|
|||
|
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|