| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Data.Helper;
- using Muchinfo.MTPClient.Data.Model;
- using Muchinfo.MTPClient.Data.Model.Account;
- using Muchinfo.MTPClient.Trade.ViewModels.Unified;
- using System;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Input;
- using Xceed.Wpf.Toolkit;
- namespace Muchinfo.MTPClient.Trade.Views
- {
- /// <summary>
- /// EntrustOrderFrame.xaml 的交互逻辑
- /// </summary>
- public partial class EntrustOrderFrame : Window
- {
- public EntrustOrderFrame(QuoteGoods goods, Direction direction, ePriceMode priceMode = ePriceMode.PRICEMODE_MARKET)
- {
- InitializeComponent();
- this.DataContext = new EntrustOrderViewModel(goods, direction, priceMode);
- }
- public EntrustOrderFrame(OrderBase orderBase, ePriceMode priceMode = ePriceMode.PRICEMODE_MARKET)
- {
- InitializeComponent();
- this.DataContext = new EntrustOrderViewModel(orderBase, priceMode);
- }
- public EntrustOrderFrame()
- {
- InitializeComponent();
- }
- private void Window_MouseDown(object sender, MouseButtonEventArgs e)
- {
- if (e.LeftButton == MouseButtonState.Pressed)
- {
- DragMove();
- }
- }
- private void btnClose_Click(object sender, RoutedEventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 使用new显示隐藏基类ShowDialog()方法
- /// 把ShowDialog方法抛到UI线程(解决弹出下单界面后报价牌行情不跳问题)
- /// </summary>
- new public void ShowDialog()
- {
- Application.Current.Dispatcher.BeginInvoke(new Action(() =>
- {
- base.ShowDialog();
- }));
- }
- private void DecimalUpDown_KeyDown(object sender, KeyEventArgs e)
- {
- if ((e.Key >= Key.NumPad0 && e.Key <= Key.NumPad9) || (e.Key >= Key.D0 && e.Key <= Key.D9))
- {
- e.Handled = false;
- }
- else
- {
- e.Handled = true;
- }
- }
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- //AppMessengerHelper.PopupNoticeMessage.Send(true);
- }
-
-
- }
- }
|