OrderTypeVMBase - raise prop changed when editable_properties_open changes
This commit is contained in:
1 parent
b5beac8a51
commit
f731530fc1
1 file changed
+8
-2
@@ -53,10 +53,13 @@ namespace mbts.spark {
|
||||
protected readonly OrdersModel model;
|
||||
protected OrderFactory factory => model.factory;
|
||||
|
||||
readonly Property<bool> _editable_properties_open;
|
||||
|
||||
protected OrderTypeVMBase(OrdersModel model, string id, string display_name) {
|
||||
this.model = model;
|
||||
this.id = id;
|
||||
this.display_name = display_name;
|
||||
_editable_properties_open = backing<bool>(nameof(editable_properties_open));
|
||||
}
|
||||
|
||||
public abstract CustomOneofCase order_type { get; }
|
||||
@@ -66,7 +69,10 @@ namespace mbts.spark {
|
||||
public string display_name { get; }
|
||||
public OrderMetadata meta => factory.get_metadata(order_type);
|
||||
public virtual bool has_editable_properties => !meta.NoProps;
|
||||
public virtual bool editable_properties_open { get; set; }
|
||||
public virtual bool editable_properties_open {
|
||||
get => _editable_properties_open.Value;
|
||||
set => _editable_properties_open.Value = value;
|
||||
}
|
||||
|
||||
public abstract void assign_to(CustomOrderDefinition value);
|
||||
|
||||
@@ -92,4 +98,4 @@ namespace mbts.spark {
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user