示例#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
        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);
 }