private void OnDeleteOKClick() { if (this._deleteRequestUI.IsActiveControl) { this._deleteRequestUI.DoClose(); } RecyclingInfoPanelUI infoPanelUi = this._recyclingUI.InfoPanelUI; if (Object.op_Equality((Object)infoPanelUi, (Object)null) || !infoPanelUi.IsNumberInput) { return; } ValueTuple <ItemListController, ItemListController, ItemNodeUI, int, ButtonType> itemInfo = infoPanelUi.GetItemInfo(); ItemNodeUI itemNodeUi = (ItemNodeUI)itemInfo.Item3; StuffItem source = !Object.op_Inequality((Object)itemNodeUi, (Object)null) ? (StuffItem)null : itemNodeUi.Item; if (Object.op_Equality((Object)itemNodeUi, (Object)null) || source == null) { return; } int sel = (int)itemInfo.Item4; StuffItem stuffItem = new StuffItem(source); stuffItem.Count = Mathf.Min(source.Count, infoPanelUi.InputNumber); bool flag = source.Count <= stuffItem.Count; this.ListController.RemoveItem(sel, stuffItem); if (!flag) { return; } this._itemListUI.ForceSetNonSelect(); infoPanelUi.DetachItem(); }
private void SendItem(RecyclingInfoPanelUI panelUI) { if (Object.op_Equality((Object)panelUI, (Object)null) || !panelUI.IsActiveItemInfo || !panelUI.IsNumberInput) { return; } ValueTuple <ItemListController, ItemListController, ItemNodeUI, int, ButtonType> itemInfo = panelUI.GetItemInfo(); this.SendItem(panelUI.InputNumber, ((ItemListController)itemInfo.Item1).PanelType, (ItemListController)itemInfo.Item1, (ItemListController)itemInfo.Item2, (int)itemInfo.Item4, (ItemNodeUI)itemInfo.Item3); }