public void CleanUp() { m_DataModel = new FieldFinalDataModel(); Table.ForeachWarFlag(tab => { FieldFinalCellDataModel cell = new FieldFinalCellDataModel(); cell.FlagId = tab.Id; cell.AllianceName = string.Empty; m_DataModel.Cells.Add(cell); return(true); }); }
private void OnEnable() { #if !UNITY_EDITOR try { #endif var controller = UIManager.Instance.GetController(UIConfig.FieldFinalUI); DataModel = controller.GetDataModel("") as FieldFinalDataModel; Binding.SetBindDataSource(DataModel); #if !UNITY_EDITOR } catch (Exception ex) { Logger.Error(ex.ToString()); } #endif }