예제 #1
0
        protected override void OnInitialize()
        {
            base.OnInitialize();
            //初始化Binder
            Binder.Add <string>("Name", OnNamePropertyVlaueChanged);
            Binder.Add <int>("Level", OnLevelPropertyValueChanged);
            Binder.Add <string>("Face", OnFacePropertyValueChanged);
            Binder.Add <Badge>("Badge", OnBadgePropertyValueChanged);
            //监听事件
            var beginDragEntry = new EventTrigger.Entry();

            beginDragEntry.eventID = EventTriggerType.BeginDrag;
            beginDragEntry.callback.AddListener(eventData => { OnBeginDrag(); });
            eventTrigger.triggers.Add(beginDragEntry);

            var dragEntry = new EventTrigger.Entry();

            dragEntry.eventID = EventTriggerType.Drag;
            dragEntry.callback.AddListener(eventData => { OnDrag(); });
            eventTrigger.triggers.Add(dragEntry);

            var endDragEntry = new EventTrigger.Entry();

            endDragEntry.eventID = EventTriggerType.EndDrag;
            endDragEntry.callback.AddListener(eventData => { OnEndDrag(); });
            eventTrigger.triggers.Add(endDragEntry);

            var pointClickEntry = new EventTrigger.Entry();

            pointClickEntry.eventID = EventTriggerType.PointerClick;
            pointClickEntry.callback.AddListener(eventData => { OnClick(); });
            eventTrigger.triggers.Add(pointClickEntry);
        }
예제 #2
0
        protected override void OnInitialize()
        {
            base.OnInitialize();

            Binder.Add <string>("TestName", OnTestNameValueChanged);

            Binder.Add <string>("TestInput", OnTestInputValueChanged);
        }
예제 #3
0
파일: WindowHint.cs 프로젝트: junfff/mygame
        public override void Initialize()
        {
            base.Initialize();
            info = dictBind.FindUI <Text>("info");

            dictBind.AddButton("BackButton", OnBackButton);
            Binder.Add <string>("info", OnInfo);
        }
예제 #4
0
 public override void Initialize()
 {
     base.Initialize();
     Binder.Add <string>("Name", OnNamePropertyValueChanged);
     Binder.Add <string>("Job", OnJobPropertyValueChanged);
     Binder.Add <int>("ATK", OnATKPropertyValueChanged);
     Binder.Add <float>("SuccessRate", OnSuccessRatePropertyValueChanged);
     Binder.Add <State>("State", OnStatePropertyValueChanged);
 }
예제 #5
0
        protected override void OnInit()
        {
            NBsn.C_Global.Instance.Log.InfoFormat("NBsn.NMVVM.LuaConsoleV.OnInit()");

            Binder.Add <string>("TextOutput", VMOnTextOutputChanged);

            var vm = new LuaConsoleVM();

            SetVM(vm);
        }
예제 #6
0
파일: LoginV.cs 프로젝트: bsn069/bsnxlua
        protected override void OnInit()
        {
            NBsn.C_Global.Instance.Log.InfoFormat("NBsn.NMVVM.LoginV.OnInit()");

            Binder.Add <string>("NameDefault", VMOnNameDefaultChanged);

            var vm = new LoginVM();

            SetVM(vm);
        }
예제 #7
0
        public override void Initialize()
        {
            base.Initialize();
            LoginState   = dictBind.FindUI <Text>("LoginState");
            InputAccount = dictBind.FindUI <InputField>("InputAccount");
            InputPassed  = dictBind.FindUI <InputField>("InputPassed");

            dictBind.AddButton("LoginButton", OnLoginButton);
            dictBind.AddButton("BackButton", OnBackButton);
            Binder.Add <string>("LoginState", OnLoginState);
        }
예제 #8
0
        protected override void OnInit()
        {
            NBsn.C_Global.Instance.Log.InfoFormat("NBsn.NMVVM.MsgV.OnInit()");

            Binder.Add <string>("Name", VMOnNameChanged);
            Binder.Add <string>("Desc", VMOnDescChanged);

            var vm = new MsgVM();

            SetVM(vm);
        }
예제 #9
0
        protected override void OnInitialize()
        {
            base.OnInitialize();

            Binder.Add <string>("AccountText", OnAccountInputValueChanged);

            Binder.Add <string>("PasswordText", OnPasswordInputValueChanged);

            //Binder.Add<string>(nameof(ViewModel.AccountText), OnAccountInputValueChanged);

            //Binder.Add<string>(nameof(ViewModel.PasswordText), OnAccountInputValueChanged);
        }
예제 #10
0
        protected override void OnInit()
        {
            NBsn.C_Global.Instance.Log.InfoFormat("NBsn.NMVVM.UpdateV.OnInit()");

            Binder.Add <string>("TextCenter", VMOnTextCenterChanged);
            Binder.Add <string>("TextName", VMOnTextNameChanged);
            Binder.Add <string>("TextDesc", VMOnTextDescChanged);
            Binder.Add <string>("TextLocalVer", VMOnTextLocalVerChanged);
            Binder.Add <string>("TextServerVer", VMOnTextServerVerChanged);
            Binder.Add <uint>("SliderValue", VMOnSliderValueChanged);

            var vm = new UpdateVM();

            SetVM(vm);
        }
예제 #11
0
        public override void Initialize()
        {
            base.Initialize();
            LoginState = dictBind.FindUI <Text>("LoginState");
            InputField = dictBind.FindUI <InputField>("InputField");

            dictBind.AddButton("StartButton", OnStartButton);
            dictBind.AddButton("LoginButton", OnLoginButton);
            dictBind.AddButton("SendButton", OnSendButton);
            dictBind.AddButton("RegisterButton", OnRegisterButton);

            Binder.Add <string>("LoginState", OnLoginState);

            //Binder.Add<string>("Job", OnJobPropertyValueChanged);
            //Binder.Add<int>("ATK", OnATKPropertyValueChanged);
            //Binder.Add<float>("SuccessRate", OnSuccessRatePropertyValueChanged);
            //Binder.Add<State>("State", OnStatePropertyValueChanged);
        }
예제 #12
0
 protected override void OnInitialize()
 {
     base.OnInitialize();
     Binder.Add <string>("Color", OnColorPropertyValueChanged);
 }
예제 #13
0
 protected override void OnInitialize()
 {
     base.OnInitialize();
     Binder.Add <string>("Icon", OnIconPropertyValueChanged);
     Binder.Add <string>("ElementColor", OnElementColorPropertyValueChanged);
 }