648 lines
22 KiB
C#
648 lines
22 KiB
C#
using cfg;
|
|
using cfg.ActorCfg;
|
|
using Cysharp.Threading.Tasks;
|
|
using Framework;
|
|
using Gameplay;
|
|
using Gameplay.Common;
|
|
using Gameplay.Level;
|
|
using Gameplay.Net;
|
|
using PhxhSDK;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using Button = UnityEngine.UI.Button;
|
|
using Image = UnityEngine.UI.Image;
|
|
|
|
public class UI_ItemDetailInfoController : UIWindow
|
|
{
|
|
#region UI
|
|
//UI GameObj
|
|
///Auto Gen Start///
|
|
public Image Image_BG;
|
|
public Image Image_Name;
|
|
public TMP_Text Text_Name1;
|
|
public Image Image_Item;
|
|
public TMP_Text Text_Have;
|
|
public TMP_Text Text_InfoNum;
|
|
public TMP_Text Text_Describe;
|
|
public Image Image_UseBG;
|
|
public Button Button_Min;
|
|
public TMP_Text Text_Min;
|
|
public Button Button_Minus;
|
|
public Button Button_Plus;
|
|
public Button Button_Max;
|
|
public TMP_Text Text_Max;
|
|
public TMP_Text Text_UseNum;
|
|
public Button Button_UseConfirm;
|
|
public TMP_Text Text_Use;
|
|
public Button Button_From;
|
|
public TMP_Text Text_From1;
|
|
public Image Image_Open;
|
|
public TMP_Text Text_From2;
|
|
public Button Button_0;
|
|
public TMP_Text Text_LevelInfo1;
|
|
public TMP_Text Text_GoTo1;
|
|
public TMP_Text Text_Name2;
|
|
public Button Button_ChooseConfirm;
|
|
public TMP_Text Text_Choose;
|
|
|
|
///Auto Gen End///
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// 物品详情窗口
|
|
/// </summary>
|
|
class ItemInfoPopup : UIGameObjectWrapper
|
|
{
|
|
public enum ItemInfoPanelState
|
|
{
|
|
Info,
|
|
Choose
|
|
}
|
|
GameObject BG;
|
|
GameObject ItemInfopanel;
|
|
GameObject ItemChoosepanel;
|
|
|
|
InfoPanel infoPanel;
|
|
ChoosePanel choosePanel;
|
|
|
|
Action closeWindowAction;
|
|
|
|
#region PanelClass
|
|
/// <summary>
|
|
/// 物品信息面板
|
|
/// </summary>
|
|
class InfoPanel : UIGameObjectWrapper
|
|
{
|
|
int ID;
|
|
DataItem dataItem;
|
|
int usageAmount = 1;
|
|
|
|
#region UIGameObj
|
|
GameObject UseTextInput;
|
|
GameObject UseConfirmButton;
|
|
TextMeshProUGUI NameText;
|
|
Image itemIcon;
|
|
TextMeshProUGUI itemCount;
|
|
GameObject itemFrom;
|
|
TextMeshProUGUI itemInfoText;
|
|
GameObject MinButton;
|
|
GameObject MinusButton;
|
|
GameObject PlusButton;
|
|
GameObject MaxButton;
|
|
PhxhScrollView scrollView;
|
|
#endregion
|
|
|
|
ItemInfoPopup parentPopup;
|
|
|
|
public InfoPanel(GameObject Root, bool isScale = false) : base(Root, isScale)
|
|
{
|
|
Root.SetActive(true);
|
|
Binder(Root);
|
|
|
|
BindPanelButtons();
|
|
|
|
SetSourcePanel();
|
|
}
|
|
|
|
public async void Show(int itemID, ItemInfoPopup parent)
|
|
{
|
|
IsScaleShow = true;
|
|
|
|
ID = itemID;
|
|
this.parentPopup = parent;
|
|
usageAmount = 1;
|
|
|
|
dataItem = CategoryManager.Instance.GetItemData(itemID);
|
|
|
|
string itemName = CommonUtils.GetLocalizeText(dataItem.NameLocal);
|
|
NameText.text = itemName;
|
|
var spritePath = CommonUtils.GetItemPath(itemID);
|
|
itemIcon.sprite = await LoadAssetAsync<Sprite>(spritePath);
|
|
itemCount.text = Actor.Instance.Item.GetItemCount(itemID).ToString();
|
|
|
|
UpdateItemButtons(dataItem.Type == ItemType.Useable || CategoryManager.Instance.ItemJumpType(itemID) != cfg.JumpFuncType.None, dataItem.BatchUsing);
|
|
//可使用道具或有跳转功能时显示使用按钮
|
|
|
|
itemFrom.SetActive(AcquisitionAmount() > 0);//有道具来源时显示来源按钮
|
|
|
|
string introduction = CommonUtils.GetLocalizeText(dataItem.IntroductionKey);
|
|
itemInfoText.text = introduction;
|
|
|
|
CommonUtils.GetGameObject(itemFrom, "Image_Open").SetActive(false);
|
|
}
|
|
|
|
public void Hide()
|
|
{
|
|
IsScaleShow = false;
|
|
Dispose();
|
|
}
|
|
|
|
void Binder(GameObject Root)
|
|
{
|
|
UseConfirmButton = CommonUtils.GetGameObject(Root, "ImageBG/Button_UseConfirm");
|
|
UseTextInput = CommonUtils.GetGameObject(Root, "ImageBG/Image_UseBG");
|
|
NameText = CommonUtils.GetComponent<TextMeshProUGUI>(Root, "ImageBG/Image_Name/Text_Name1");
|
|
itemIcon = CommonUtils.GetComponent<Image>(Root, "ImageBG/Image_Item");
|
|
itemCount = CommonUtils.GetComponent<TextMeshProUGUI>(Root, "ImageBG/Image_Item/Text_InfoNum");
|
|
itemFrom = CommonUtils.GetGameObject(Root, "ImageBG/Button_From");
|
|
itemInfoText = GetComponent<TextMeshProUGUI>("ImageBG/Image_Item/Text_Describe");
|
|
MinButton = CommonUtils.GetGameObject(Root, "ImageBG/Image_UseBG/Button_Min");
|
|
MinusButton = CommonUtils.GetGameObject(Root, "ImageBG/Image_UseBG/Button_Minus");
|
|
PlusButton = CommonUtils.GetGameObject(Root, "ImageBG/Image_UseBG/Button_Plus");
|
|
MaxButton = CommonUtils.GetGameObject(Root, "ImageBG/Image_UseBG/Button_Max");
|
|
}
|
|
|
|
void UpdateItemButtons(bool isItemUsable, bool isItemBatchUse)
|
|
{
|
|
UseConfirmButton.SetActive(isItemUsable);
|
|
UseTextInput.SetActive(isItemUsable && isItemBatchUse);
|
|
|
|
TextMeshProUGUI amountText = CommonUtils.GetComponent<TextMeshProUGUI>(UseTextInput, "Text_UseNum");
|
|
amountText.text = usageAmount.ToString();
|
|
}
|
|
|
|
void BindPanelButtons()
|
|
{
|
|
CommonUtils.BindButton(itemFrom.GetComponent<Button>(), () =>
|
|
{
|
|
GameObject panel = CommonUtils.GetGameObject(itemFrom, "Image_Open");
|
|
panel.SetActive(!panel.activeSelf);
|
|
scrollView.UpdateData(true);
|
|
});
|
|
CommonUtils.BindButton(MinButton.GetComponent<Button>(), () =>
|
|
{
|
|
UpdateUsageAmount(1);
|
|
});
|
|
CommonUtils.BindButton(MinusButton.GetComponent<Button>(), () =>
|
|
{
|
|
UpdateUsageAmount(usageAmount - 1);
|
|
});
|
|
CommonUtils.BindButton(PlusButton.GetComponent<Button>(), () =>
|
|
{
|
|
UpdateUsageAmount(usageAmount + 1);
|
|
});
|
|
CommonUtils.BindButton(MaxButton.GetComponent<Button>(), () =>
|
|
{
|
|
UpdateUsageAmount(MaxAmount());
|
|
});
|
|
CommonUtils.BindButton(UseConfirmButton.GetComponent<Button>(), UseItem);
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 物品来源面板
|
|
/// </summary>
|
|
void SetSourcePanel()
|
|
{
|
|
scrollView = CommonUtils.GetComponent<PhxhScrollView>(itemFrom, "Image_Open/PhxhScrollView");
|
|
|
|
scrollView.SetItemCountFunc(AcquisitionAmount);
|
|
//scrollView.SetItemSizeFunc((int index) => new Vector2(SOURCE_BUTTON_WIDTH, SOURCE_BUTTON_HEIGHT));
|
|
scrollView.SetUpdateFunc((int index, RectTransform item) =>
|
|
{
|
|
item.gameObject.SetActive(true);
|
|
|
|
item.GetComponent<Button>().onClick.RemoveAllListeners();
|
|
int JumpID = dataItem.Acquisition[index];
|
|
|
|
TextMeshProUGUI itemSourceText = CommonUtils.GetComponent<TextMeshProUGUI>(item.gameObject, "Text_LevelInfo1");
|
|
TMP_Text Text_GoTo1 = CommonUtils.GetComponent<TMP_Text>(item.gameObject, "Text_GoTo1");
|
|
|
|
if (JumpID > 100000)//TODO 绑定操作移出updatefunc
|
|
{
|
|
itemSourceText.text = LevelManager.Instance.LevelIDToNum(JumpID) + " " + LevelManager.Instance.LevelIDToName(JumpID);
|
|
|
|
CommonUtils.BindButton(item.gameObject.GetComponent<Button>(), () =>
|
|
{
|
|
JumpToLevel(JumpID);
|
|
});
|
|
var btn = item.gameObject.GetComponent<Button>();
|
|
if (btn == null)
|
|
return;
|
|
|
|
if (LevelManager.Instance.CheckLevelUnlock(JumpID))
|
|
{
|
|
btn.interactable = true;
|
|
itemSourceText.color = Color.white;
|
|
CommonUtils.GetComponent<Image>(item.gameObject, "icon").color = new Color(1, 1, 1, 1);
|
|
Text_GoTo1.text = CommonUtils.GetLocalizeText("Package_JumpTo");
|
|
}
|
|
else
|
|
{
|
|
btn.interactable = false;
|
|
itemSourceText.color = new Color(.2f, .2f, .2f, 1);
|
|
CommonUtils.GetComponent<Image>(item.gameObject, "icon").color = new Color(1, 1, 1, .5f);
|
|
Text_GoTo1.text = CommonUtils.GetLocalizeText("Package_Lock");
|
|
}
|
|
}
|
|
else//商店跳转
|
|
{
|
|
var data = ShopManager.Instance.GetShopData(JumpID);
|
|
itemSourceText.text = CommonUtils.GetLocalizeText(data.Name);
|
|
CommonUtils.BindButton(item.gameObject.GetComponent<Button>(), () =>
|
|
{
|
|
JumpToShop(JumpID);
|
|
});
|
|
|
|
var btn = item.gameObject.GetComponent<Button>();
|
|
btn.interactable = true;
|
|
itemSourceText.color = Color.white;
|
|
CommonUtils.GetComponent<Image>(item.gameObject, "icon").color = new Color(1, 1, 1, 1);
|
|
Text_GoTo1.text = CommonUtils.GetLocalizeText("Package_JumpTo");
|
|
}
|
|
});
|
|
}
|
|
/// <summary>
|
|
/// 道具来源数
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
int AcquisitionAmount()
|
|
{
|
|
if (dataItem != null && dataItem.Acquisition != null)
|
|
{
|
|
return dataItem.Acquisition.Length;
|
|
}
|
|
|
|
DebugUtil.LogError("无道具信息或未配置道具来源! 道具id: " + ID);
|
|
return 0;
|
|
}
|
|
|
|
void UpdateUsageAmount(int amount)
|
|
{
|
|
usageAmount = amount;
|
|
if (usageAmount < 1)
|
|
{
|
|
usageAmount = 1;
|
|
}
|
|
if (usageAmount > MaxAmount())
|
|
{
|
|
usageAmount = MaxAmount();
|
|
}
|
|
TextMeshProUGUI amountText = CommonUtils.GetComponent<TextMeshProUGUI>(UseTextInput, "Text_UseNum");
|
|
amountText.text = usageAmount.ToString();
|
|
}
|
|
int MaxAmount()
|
|
{
|
|
return (int)CategoryManager.Instance.GetItemCount(ID);
|
|
}
|
|
void UseItem()
|
|
{
|
|
DataItem data = CategoryManager.Instance.GetItemData(ID);
|
|
ItemUseType useType = (ItemUseType)data.Param1;
|
|
DebugUtil.Log("use item, item id is: " + ID + " type is: " + useType);
|
|
if (useType == ItemUseType.SelectableChest)
|
|
{
|
|
DebugUtil.Log("use selectable chest");
|
|
this.Hide();
|
|
parentPopup.ShowPopup(ItemInfoPanelState.Choose, ID);
|
|
}
|
|
else if (useType == ItemUseType.None)//如果不是消耗品,检查是否有跳转功能
|
|
{
|
|
JumpFuncType jumpFuncType = CategoryManager.Instance.ItemJumpType(ID);
|
|
if (jumpFuncType != cfg.JumpFuncType.None)
|
|
{
|
|
DebugUtil.Log("jump to: " + jumpFuncType);
|
|
JumpToManager.JumpFunc<int, Action>(jumpFuncType, data.JumpToParam, () =>
|
|
{
|
|
parentPopup.CloseWindow();
|
|
});
|
|
}
|
|
else
|
|
{
|
|
DebugUtil.LogError("cannot use!");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
DebugUtil.Log("use item!");
|
|
if (EnergyManager.Instance.isItemCanBuyEnergy(ID, GLConfig.Inst.data.EnergyPointID))
|
|
{
|
|
int upperValue = EnergyManager.Instance.MaxConsumeAmountWithoutConvert(ID, out _);
|
|
if (usageAmount > upperValue)
|
|
{
|
|
CommonUtils.ShowMessageTips(CommonUtils.GetLocalizeText("BuyEnergy_failed_overflow"));// 指挥点数超过上限值!
|
|
return;
|
|
}
|
|
}
|
|
CategoryManager.Instance.UseItem(ID, usageAmount);
|
|
parentPopup.HidePopup();
|
|
}
|
|
}
|
|
|
|
void JumpToLevel(int level)
|
|
{
|
|
if (LevelManager.Instance.CheckLevelUnlock(level))
|
|
{
|
|
SignUpManager.Instance.DoNotShowDailyAccumulate = true;
|
|
JumpToManager.JumpFunc<int, Action>(cfg.JumpFuncType.Level_Detail, level, () =>
|
|
{
|
|
parentPopup.CloseWindow();
|
|
});//JumpToLevelDetail(level);
|
|
}
|
|
else
|
|
DebugUtil.Log("level is locked: " + level);
|
|
}
|
|
void JumpToShop(int ShopId)
|
|
{
|
|
var shopCfg = TableManager.Instance.Tables.Shop;
|
|
if (!shopCfg.DataMap.ContainsKey(ShopId))
|
|
{
|
|
DebugUtil.Log("Jump to shop detail failed, shop id not found: " + ShopId);
|
|
return;
|
|
}
|
|
|
|
SignUpManager.Instance.DoNotShowDailyAccumulate = true;
|
|
JumpToManager.JumpFunc<int, Action>(JumpFuncType.Item_Shop, ShopId, () =>
|
|
{
|
|
parentPopup.CloseWindow();
|
|
});//JumpToShopDetail(ShopId);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 可选礼包打开选择面板
|
|
/// </summary>
|
|
class ChoosePanel : UIGameObjectWrapper
|
|
{
|
|
int ID;
|
|
|
|
Dictionary<int, ChooseItem> ViewContentButton = new Dictionary<int, ChooseItem>();
|
|
PhxhScrollView itemView;
|
|
Button chooseConfirmButton;
|
|
|
|
ItemInfoPopup parentPopup;
|
|
|
|
int maxChooseAmount = 1;//TODO 目前可选礼包只能选择一个物品兑换
|
|
|
|
List<int> chosenItems = new List<int>();
|
|
|
|
public ChoosePanel(GameObject go, bool isScale = false) : base(go, isScaleShow: isScale)
|
|
{
|
|
go.SetActive(true);
|
|
itemView = GetComponent<PhxhScrollView>("ImageBG/PhxhScrollView");
|
|
chooseConfirmButton = GetComponent<Button>("ImageBG/Button_ChooseConfirm");
|
|
|
|
itemView.SetItemCountFunc(ChooseItemsCount);
|
|
itemView.SetUpdateFunc(UpdateItem);
|
|
//itemView.SetItemSizeFunc(CellSize);
|
|
|
|
CommonUtils.BindButton(chooseConfirmButton, () =>
|
|
{
|
|
ConfirmChoose();
|
|
});
|
|
}
|
|
|
|
public void Show(int itemID, ItemInfoPopup parent)
|
|
{
|
|
ID = itemID;
|
|
IsScaleShow = true;
|
|
parentPopup = parent;
|
|
|
|
itemView.UpdateData(true);
|
|
}
|
|
public void Hide()
|
|
{
|
|
IsScaleShow = false;
|
|
Dispose();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
base.Dispose();
|
|
chosenItems.Clear();
|
|
}
|
|
|
|
#region scrollviewFunc
|
|
/// <summary>
|
|
/// 自选礼包内容数
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
int ChooseItemsCount()
|
|
{
|
|
DataItem item = CategoryManager.Instance.GetItemData(ID);
|
|
return item.Selections.Count;
|
|
}
|
|
|
|
//Vector2 CellSize(int index)
|
|
//{
|
|
// return new Vector2(ITEM_BUTTON_WIDTH, ITEM_BUTTON_HEIGHT);
|
|
//}
|
|
|
|
void UpdateItem(int index, RectTransform item)
|
|
{
|
|
var go = item.gameObject;
|
|
go.SetActive(true);
|
|
|
|
if (!ViewContentButton.TryGetValue(go.GetInstanceID(), out ChooseItem Button))
|
|
{
|
|
Button = new ChooseItem(go, ItemChoose);
|
|
ViewContentButton.Add(go.GetInstanceID(), Button);
|
|
}
|
|
DataItem itemData = CategoryManager.Instance.GetItemData(ID);
|
|
var itemCount = itemData.Selections[index];
|
|
|
|
ViewContentButton[go.GetInstanceID()].RefreshData(itemCount.Id, itemCount.Count, chosenItems.Contains(itemCount.Id));
|
|
}
|
|
#endregion
|
|
|
|
#region buttonListener
|
|
void ItemChoose(int itemID)
|
|
{
|
|
if (chosenItems.Contains(itemID))
|
|
{
|
|
chosenItems.Remove(itemID);
|
|
}
|
|
else
|
|
{
|
|
if (maxChooseAmount > 0 && chosenItems.Count >= maxChooseAmount)
|
|
{
|
|
chosenItems.RemoveAt(0);
|
|
}
|
|
chosenItems.Add(itemID);
|
|
}
|
|
itemView.UpdateData(true);
|
|
}
|
|
void ConfirmChoose()
|
|
{
|
|
if (chosenItems.Count > 0)
|
|
{
|
|
int chosenItem = chosenItems[0];
|
|
CategoryManager.Instance.UseItem(ID, itemAmount: 1, chosenItem);
|
|
parentPopup.HidePopup();
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// 可选礼包内道具按钮
|
|
/// </summary>
|
|
class ChooseItem : UIGameObjectWrapper
|
|
{
|
|
int itemID;
|
|
Action<int> callback;
|
|
GameObject chosenCircle;
|
|
|
|
public ChooseItem(GameObject go, Action<int> OnClick, bool isScale = true) : base(go, isScale)
|
|
{
|
|
chosenCircle = CommonUtils.GetGameObject(go, "ChooseRect");
|
|
callback = OnClick;
|
|
CommonUtils.BindButton(go.GetComponent<Button>(), OnButtonClicked);
|
|
}
|
|
|
|
public async void RefreshData(int itemID, int itemCount, bool isChosen)
|
|
{
|
|
if (this.itemID != itemID)
|
|
{
|
|
Dispose();
|
|
Image icon = GetComponent<Image>("ItemIcon");
|
|
var spritePath = CommonUtils.GetItemPath(itemID);
|
|
icon.sprite = await LoadAssetAsync<Sprite>(spritePath);
|
|
|
|
this.itemID = itemID;
|
|
}
|
|
|
|
TextMeshProUGUI countText = GetComponent<TextMeshProUGUI>("ImageCount/TextCount");
|
|
countText.text = itemCount.ToString();
|
|
chosenCircle.SetActive(isChosen);
|
|
}
|
|
|
|
void OnButtonClicked()
|
|
{
|
|
callback?.Invoke(itemID);
|
|
}
|
|
}
|
|
|
|
}
|
|
#endregion
|
|
|
|
public ItemInfoPopup(GameObject go, Action closeWindow, bool isScale = true) : base(go, isScaleShow: isScale)
|
|
{
|
|
BG = CommonUtils.GetGameObject(go, "Image_BG");
|
|
closeWindowAction = closeWindow;
|
|
|
|
//info panel
|
|
ItemInfopanel = CommonUtils.GetGameObject(go, "ItemInfo");
|
|
|
|
infoPanel = new InfoPanel(ItemInfopanel);
|
|
|
|
//choose panel
|
|
ItemChoosepanel = CommonUtils.GetGameObject(go, "ItemChoose");
|
|
|
|
choosePanel = new ChoosePanel(ItemChoosepanel);
|
|
|
|
BG.AddComponent<Button>().onClick.AddListener(() => HidePopup());
|
|
}
|
|
|
|
public void ShowPopup(ItemInfoPanelState panel, int itemID)
|
|
{
|
|
IsScaleShow = true;
|
|
switch (panel)
|
|
{
|
|
case ItemInfoPanelState.Info:
|
|
infoPanel.Show(itemID, this);
|
|
|
|
break;
|
|
case ItemInfoPanelState.Choose:
|
|
choosePanel.Show(itemID, this);
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void HidePopup()
|
|
{
|
|
IsScaleShow = false;
|
|
infoPanel.Hide();
|
|
choosePanel.Hide();
|
|
}
|
|
|
|
public void CloseWindow()
|
|
{
|
|
closeWindowAction.Invoke();
|
|
}
|
|
}
|
|
|
|
class OpenData
|
|
{
|
|
public int itemID;
|
|
public Action CloseCallback;
|
|
|
|
public OpenData(int itemID, Action CloseCallback)
|
|
{
|
|
this.itemID = itemID;
|
|
this.CloseCallback = CloseCallback;
|
|
}
|
|
}
|
|
|
|
ItemInfoPopup panel;
|
|
int ItemID;
|
|
RawImage GaussianBlurMask;
|
|
Action callback;
|
|
|
|
// deal with input data
|
|
|
|
public static UniTask<UIWindow> Open(int itemID, Action JumpCloseCallback)
|
|
{
|
|
CommonUtils.CaptureScreenshot();
|
|
var data= new OpenData(itemID, JumpCloseCallback);
|
|
return UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_ItemDetailInfo, data);
|
|
}
|
|
|
|
public override void PreLoad(object data = null)
|
|
{
|
|
var openData = (OpenData)data;
|
|
|
|
ItemID = openData.itemID;
|
|
callback = openData.CloseCallback;
|
|
}
|
|
|
|
// Use this for initialization
|
|
public override void OnInit()
|
|
{
|
|
//bind UI GameObj
|
|
UI_ItemDetailInfoBinder.GetComponents(this);
|
|
GaussianBlurMask = GetComponent<RawImage>("GaussianBlurMask");
|
|
GaussianBlurMask.texture = CommonUtils.GetScreenTexture2D();
|
|
|
|
panel = new ItemInfoPopup(gameObject, () =>
|
|
{
|
|
CloseWindow();
|
|
callback?.Invoke();
|
|
});
|
|
panel.ShowPopup(ItemInfoPopup.ItemInfoPanelState.Info, ItemID);
|
|
|
|
AddBgClose(OnCloseClick);
|
|
}
|
|
|
|
//invoke when open window
|
|
protected override void OnShowWindow(object data = null)
|
|
{
|
|
|
|
}
|
|
|
|
//invoke when reload window
|
|
protected override void OnReloadWindow(object data = null)
|
|
{
|
|
|
|
}
|
|
|
|
//invoke when close window
|
|
protected override void OnHideWindow()
|
|
{
|
|
|
|
}
|
|
|
|
//invoke when destroy
|
|
public override void OnRelease()
|
|
{
|
|
base.OnRelease();
|
|
}
|
|
|
|
protected override void OnCloseClick()
|
|
{
|
|
CloseWindow();
|
|
base.OnCloseClick();
|
|
}
|
|
} |