admin 管理员组

文章数量: 887019


2024年1月12日发(作者:十进制转二进制批量工具)

case _SELECTED: ct(); break; case _ADDED: ct(); ers(); break; case _UPDATED: ct(); ers(); break; } }}using UnityEngine;using tions;using ns;using aces;using c;//更新UserForm部分public class UserFormMediator : Mediator, IMediator{ private UserProxy userProxy; public new const string NAME = "UserFormMediator"; private UserForm View { get { return (UserForm)ViewComponent; } } public UserFormMediator(UserForm viewComponent) : base(NAME, viewComponent) { ("UserFormMediator()"); r += UserForm_AddUser; User += UserForm_UpdateUser; User += UserForm_CancelUser; } public override void OnRegister() { ster(); userProxy = veProxy() as UserProxy; } void UserForm_AddUser() { UserVO user = ; m(user); SendNotification(_ADDED, user); orm(); } void UserForm_UpdateUser() { UserVO user = ; Item(user); SendNotification(_UPDATED, user); orm(); } void UserForm_CancelUser() { SendNotification(_SELECTED); orm(); }

public override IList ListNotificationInterests() { IList list = new List(); (_USER); (_DELETED); (_SELECTED); return list; } public override void HandleNotification(INotification note) { UserVO user; switch () { case _USER: user = (UserVO); er(user, ); break; case _DELETED: orm(); break; case _SELECTED: user = (UserVO); er(user, ); break; } }}补充,UI的选择部分using UnityEngine;using ;using tions;[RequireComponent(typeof(Toggle))]public class UGUI_MyToggle : MonoBehaviour{

[SerializeField]Toggle toggle; [SerializeField]UGUI_MyToggleGroup myToggleGroup; void Start() { if (toggle == null) toggle = ponent(); if (myToggleGroup == null) myToggleGroup = ponent(); tener(onToggle); } void onToggle(bool value) { if(value) { Toggle(toggle); } }}//[lzh]using UnityEngine;using ;using ;

using tions;public class ToggleEvent : UnityEvent { }[RequireComponent(typeof(ToggleGroup))]public class UGUI_MyToggleGroup : MonoBehaviour{public ToggleGroup toggleGroup;public ToggleEvent onToggleChange = new ToggleEvent();void Start(){ if (toggleGroup == null) toggleGroup = ponent();}public void ChangeToggle(Toggle toggle){ (toggle);}}


本文标签: 二进制 选择 批量 工具 部分