Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit fa6cab9

Browse files
MVVM新写法
1 parent 2e6d50d commit fa6cab9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎GameFramework/Runtime/UI/MVVM/BindingSet.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ namespace Wanderer.GameFramework
1010
public interface IBindingSet
1111
{
1212
void Set(JsonData jsonData);
13-
1413
}
1514

16-
1715
public class BindResult: IBindingSet
1816
{
1917
private string _key;

‎GameFramework/Runtime/UI/MVVM/UIModel.cs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ public T1 Variable
5353
}
5454
set
5555
{
56-
Model.Variable = value;
56+
if (!value.Equals(Model.Variable))
57+
{
58+
Model.Variable = value;
59+
}
5760
}
5861
}
5962

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /