Skip to content

Commit b08db2c

Browse files
author
邹杭特
committed
现在View可以调用ProperyBinder中的方法实现触发ViewModel中对应的方法
1 parent 4a29e03 commit b08db2c

File tree

160 files changed

+2271
-768
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2271
-768
lines changed

Assets/BridgeUI/Core/Attributes/DefultValue.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

Assets/BridgeUI/Core/Behaiver/Panels/PanelBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected virtual void LoadPropDictionary(IViewModel viewModel, IDictionary data
137137
var value = dataDic[key];
138138
if (value != null)
139139
{
140-
var prop = viewModel.GetBindablePropertySelfty(key.ToString(), value.GetType());
140+
var prop = viewModel.GetBindableProperty(key.ToString(), value.GetType());
141141
if (prop != null)
142142
{
143143
prop.ValueBoxed = value;

Assets/BridgeUI/Core/Binding/Delegets.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ namespace BridgeUI.Binding
1818
public delegate void BindHandler(IBindingContext source);
1919
public delegate void UnBindHandler(IBindingContext source);
2020

21+
public delegate void PanelAction(IBindingContext panel);
2122
public delegate void PanelAction<T>(IBindingContext panel,T arg0);
2223
public delegate void PanelAction<T,S>(IBindingContext panel,T arg0,S arg1);
2324
public delegate void PanelAction<T,S,R>(IBindingContext panel,T arg0,S arg1,R arg2);
2425
public delegate void PanelAction<T,S,R,Q>(IBindingContext panel,T arg0,S arg1,R arg2,Q arg3);
25-
public delegate void PanelAction(IBindingContext panel);
26+
public delegate void PanelAction<T,S,R,Q,P>(IBindingContext panel, T arg0,S arg1,R arg2,Q arg3,P arg4);
2627
}

Assets/BridgeUI/Core/Binding/IBindingContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ public interface IBindingContext
66
{
77
Binding.PropertyBinder Binder { get; }
88
IViewModel ViewModel { get; set; }
9-
void OnViewModelChanged(IViewModel newValue);
109
}
1110

1211
}

Assets/BridgeUI/Core/Binding/IViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ public interface IViewModel
88
void OnBinding(IBindingContext context);
99
void OnUnBinding(IBindingContext context);
1010
BindableProperty<T> GetBindableProperty<T>(string keyward);
11-
BindableProperty<T> GetBindablePropertySelfty<T>(string keyward);
12-
IBindableProperty GetBindablePropertySelfty(string keyward, System.Type type);
11+
IBindableProperty GetBindableProperty(string keyward, System.Type type);
1312
void SetBindableProperty(string keyward, IBindableProperty value);
1413
}
1514

0 commit comments

Comments
 (0)