OrderBookVM now implements IRequestRowSelection and appropriately invokes it via all_rows_selected setter
This commit is contained in:
1 parent
c52b98d17c
commit
efa78ee5fc
1 file changed
+4
-2
@@ -18,6 +18,7 @@ using mbts.ui.spark;
|
||||
using mbts.ui.utility;
|
||||
using mbts.utils;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Collections.ObjectModel;
|
||||
@@ -31,7 +32,7 @@ using System.Windows.Input;
|
||||
using Columns = mbts.spark.OrderBookGridView.ColumnKeys;
|
||||
|
||||
namespace mbts.spark {
|
||||
partial class OrderBookVM : DisposableViewModelBase, IHandleRowSelection, IHandleGridSorting {
|
||||
partial class OrderBookVM : DisposableViewModelBase, IHandleRowSelection, IHandleGridSorting, IRequestRowSelection {
|
||||
const double
|
||||
_min_right_panel_width = 200,
|
||||
_min_order_params_height = 300,
|
||||
@@ -346,6 +347,7 @@ namespace mbts.spark {
|
||||
|
||||
public event Action<OrderRecordImmutable?> selected_order_changed;
|
||||
public event Action begin_attaching, end_attaching;
|
||||
public event Action<IEnumerable> request_selection;
|
||||
|
||||
public ObservableAppendCollection<DIYGrid.ColumnBase> columns { get; }
|
||||
public ObservableCollection<DIYGrid.ColumnBase> core_columns => _columns;
|
||||
@@ -435,7 +437,7 @@ namespace mbts.spark {
|
||||
get => _all_rows_selected;
|
||||
set {
|
||||
Set(ref _all_rows_selected, value);
|
||||
_row_collection.ForEach(r => r.is_selected = value);
|
||||
request_selection?.Invoke(_row_collection);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user