void OnSelectionChange(string item) { if (item == CSUtils.GetWorkModeName(CSConst.pwtFarmForMag)) { m_ManageUI.enabled = true; m_HarvestUI.enabled = false; m_PlantUI.enabled = false; if (m_RefNpc != null) { m_RefNpc.TrySetWorkMode(CSConst.pwtFarmForMag); } if (ShowStatusTips) { CSUI_MainWndCtrl.ShowStatusBar(UIMsgBoxInfo.mFarmerForManage.GetString(), 6f); } } else if (item == CSUtils.GetWorkModeName(CSConst.pwtFarmForHarvest)) { m_ManageUI.enabled = false; m_HarvestUI.enabled = true; m_PlantUI.enabled = false; if (m_RefNpc != null) { m_RefNpc.TrySetWorkMode(CSConst.pwtFarmForHarvest); } if (ShowStatusTips) { CSUI_MainWndCtrl.ShowStatusBar(UIMsgBoxInfo.mFarmerForHarvest.GetString(), 6f); } } else if (item == CSUtils.GetWorkModeName(CSConst.pwtFarmForPlant)) { m_ManageUI.enabled = false; m_HarvestUI.enabled = true; m_PlantUI.enabled = false; if (m_RefNpc != null) { m_RefNpc.TrySetWorkMode(CSConst.pwtFarmForPlant); } if (ShowStatusTips) { CSUI_MainWndCtrl.ShowStatusBar(UIMsgBoxInfo.mFarmerForPlant.GetString(), 6f); } } if (onSelectChange != null) { onSelectChange(item); } }