예제 #1
0
        public void CreateColleagues()
        {
            checkGuest   = new ColleagueCheckbox("Guest", true);
            checkLogin   = new ColleagueCheckbox("Login", false);
            textUser     = new ColleagueTextField();
            textPass     = new ColleagueTextField();
            buttonOk     = new ColleagueButton("OK");
            buttonCancel = new ColleagueButton("Cancel");
            //设置Mediator
            checkGuest.SetMediator(this);
            checkLogin.SetMediator(this);
            textUser.SetMediator(this);
            textPass.SetMediator(this);
            buttonOk.SetMediator(this);
            buttonOk.SetMediator(this);

            //设置Listener
            //checkGuest.CheckedChanged += checkGuest.ItemStateChanged();
        }
예제 #2
0
 void Start()
 {
     checkGuest.SetMediator(this);
     checkLogin.SetMediator(this);
     textUser.SetMediator(this);
     textPass.SetMediator(this);
     buttonOk.SetMediator(this);
     buttonCancel.SetMediator(this);
     textUser.SetColleagueEnabled(false);
     textPass.SetColleagueEnabled(false);
     buttonOk.SetColleagueEnabled(true);
     buttonCancel.SetColleagueEnabled(true);
 }