Rename AuxiliaryDataResources -> OrderAuxiliaryPopupResources
The old name was unnecessarily vague
This commit is contained in:
1 parent
6b31f7383c
commit
c9e3cf8c67
4 files changed
+14
-14
No files matched your search
@@ -92,7 +92,7 @@ namespace mbts.ui.spark {
|
||||
|
||||
void _show_mini_orderbook(IReadOnlyList<SecurityImmutable> securities, Columns col) {
|
||||
var (vm, context, title, fg) = _vm.orderbook_params(securities, col);
|
||||
_show_popup(vm, new AuxiliaryDataHeader {
|
||||
_show_popup(vm, new OrderAuxiliaryPopupHeader {
|
||||
context = context,
|
||||
title = title,
|
||||
title_foreground = fg
|
||||
@@ -104,7 +104,7 @@ namespace mbts.ui.spark {
|
||||
|
||||
void _show_mini_fills(IEnumerable<SecurityImmutable> securities, Columns col) {
|
||||
var (vm, context, title, fg) = _vm.fills_params(securities, col);
|
||||
_show_popup(vm, new AuxiliaryDataHeader {
|
||||
_show_popup(vm, new OrderAuxiliaryPopupHeader {
|
||||
context = context,
|
||||
title = title,
|
||||
title_foreground = fg
|
||||
@@ -114,7 +114,7 @@ namespace mbts.ui.spark {
|
||||
async void _show_order_ticket(
|
||||
SecurityMD security_md, double price = double.NaN, double size = 0) {
|
||||
var resources = new OrderTicketResources();
|
||||
resources.MergedDictionaries.Add(new AuxiliaryDataResources());
|
||||
resources.MergedDictionaries.Add(new OrderAuxiliaryPopupResources());
|
||||
|
||||
var account = await _vm.get_default_account(security_md.security);
|
||||
var def = _model.factory.order(security_md.security, account);
|
||||
@@ -136,7 +136,7 @@ namespace mbts.ui.spark {
|
||||
}
|
||||
|
||||
void _show_popup(object content, object header) {
|
||||
var resources = new AuxiliaryDataResources();
|
||||
var resources = new OrderAuxiliaryPopupResources();
|
||||
resources.MergedDictionaries.Add(new AutoHideScrollbarResources());
|
||||
_show_popup(content, header, resources);
|
||||
}
|
||||
@@ -148,9 +148,9 @@ namespace mbts.ui.spark {
|
||||
Header = header,
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Top,
|
||||
Resources = resources ?? new AuxiliaryDataResources()
|
||||
Resources = resources ?? new OrderAuxiliaryPopupResources()
|
||||
};
|
||||
view.Style = view.Resources[AuxiliaryDataResources.PopupChildStyleKey] as Style;
|
||||
view.Style = view.Resources[OrderAuxiliaryPopupResources.PopupChildStyleKey] as Style;
|
||||
init_view?.Invoke(view);
|
||||
_popup_man.show(view);
|
||||
}
|
||||
|
||||
@@ -407,16 +407,16 @@ namespace bts.shell.pnl {
|
||||
void _show_auxiliary_popup<T>(T content, string context_desc, string title_desc, Color fg) {
|
||||
var view = new HeaderedContentControl {
|
||||
Content = content,
|
||||
Header = new AuxiliaryDataHeader {
|
||||
Header = new OrderAuxiliaryPopupHeader {
|
||||
context = context_desc,
|
||||
title = title_desc,
|
||||
title_foreground = fg
|
||||
},
|
||||
HorizontalAlignment = HorizontalAlignment.Left,
|
||||
VerticalAlignment = VerticalAlignment.Top,
|
||||
Resources = new AuxiliaryDataResources()
|
||||
Resources = new OrderAuxiliaryPopupResources()
|
||||
};
|
||||
view.Style = view.Resources[AuxiliaryDataResources.PopupChildStyleKey] as Style;
|
||||
view.Style = view.Resources[OrderAuxiliaryPopupResources.PopupChildStyleKey] as Style;
|
||||
_popup_man.show(view);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<ResourceDictionary
|
||||
x:Class="mbts.ui.spark.AuxiliaryDataResources"
|
||||
x:Class="mbts.ui.spark.OrderAuxiliaryPopupResources"
|
||||
x:ClassModifier="internal"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -17,7 +17,7 @@
|
||||
<sp:MiniOrderBookView/>
|
||||
</DataTemplate>
|
||||
<!--Header (Title Bar)-->
|
||||
<DataTemplate DataType="{x:Type usp:AuxiliaryDataHeader}">
|
||||
<DataTemplate DataType="{x:Type usp:OrderAuxiliaryPopupHeader}">
|
||||
<Grid MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=ContentPresenter}}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
+3
-3
@@ -4,14 +4,14 @@ using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace mbts.ui.spark {
|
||||
partial class AuxiliaryDataResources : ResourceDictionary {
|
||||
public AuxiliaryDataResources() =>
|
||||
partial class OrderAuxiliaryPopupResources : ResourceDictionary {
|
||||
public OrderAuxiliaryPopupResources() =>
|
||||
InitializeComponent();
|
||||
|
||||
public static string PopupChildStyleKey => nameof(PopupChildStyleKey);
|
||||
}
|
||||
|
||||
class AuxiliaryDataHeader : ViewModelBase {
|
||||
class OrderAuxiliaryPopupHeader : ViewModelBase {
|
||||
string
|
||||
_title,
|
||||
_context;
|
||||
Reference in new issue
Block a user