| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702 |
- using GalaSoft.MvvmLight;
- using GalaSoft.MvvmLight.Command;
- using GalaSoft.MvvmLight.Ioc;
- using Muchinfo.MTPClient.Data;
- using Muchinfo.MTPClient.Data.DTO;
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Data.Model;
- using Muchinfo.MTPClient.Data.Model.Account;
- using Muchinfo.MTPClient.Infrastructure.Cache;
- using Muchinfo.MTPClient.Infrastructure.Helpers;
- using Muchinfo.MTPClient.Infrastructure.MessageBox;
- using Muchinfo.MTPClient.Infrastructure.Utilities;
- using Muchinfo.MTPClient.IService;
- using Muchinfo.MTPClient.Resources;
- using Muchinfo.WPF.Controls.Windows;
- using System;
- using System.Linq;
- //----------------------------------------------------------------
- //Module Name: $safeprojectname$
- //Purpose:
- //CopyRight: Muchinfo
- //History:
- //----------------------------------------------------------------
- //DateTime 2016/2/2 16:45:23
- //Author
- //Description Create
- //----------------------------------------------------------------
- using System.Timers;
- using System.Windows;
- namespace Muchinfo.MTPClient.Trade.ViewModels
- {
- public class QuickOrderViewModel : ViewModelBase
- {
- private QuoteGoods _currentGoods;
- private IGoodsService _igoodsService;
- /// <summary>
- /// 当前商品
- /// </summary>
- public QuoteGoods CurrentGoods
- {
- get { return _currentGoods; }
- set
- {
- Set(() => CurrentGoods, ref _currentGoods, value);
- }
- }
- public QuickOrderViewModel()
- {
- ////todo:注册改变当前商品消息
- MessengerHelper.DefaultRegister<QuoteGoodsDTO>(this, MessengerTokens.SelectGoodsChange, SelectGoodsChange);
- MessengerHelper.DefaultRegister<QuoteGoodsDTO>(this, MessengerTokens.QuickSell, QuickSellCommand);
- MessengerHelper.DefaultRegister<QuoteGoodsDTO>(this, MessengerTokens.QuickBuy, QuickBuyCommand);
- _igoodsService = SimpleIoc.Default.GetInstance<IGoodsService>();
- }
- private const decimal c_LotBit = 0.01m; //数量的小数位数
- /// <summary>
- /// 正在加载中
- /// </summary>
- private bool _isBusy;
- public bool IsBusy
- {
- get { return _isBusy; }
- set
- {
- Set(() => IsBusy, ref _isBusy, value);
- }
- }
- private bool _canOpenMarket;
- public bool CanOpenMarket
- {
- get
- {
- return _canOpenMarket;
- }
- set
- {
- Set(() => CanOpenMarket, ref _canOpenMarket, value);
- }
- }
- private decimal _lot;
- /// <summary>
- /// 建仓手数
- /// </summary>
- public decimal Lot
- {
- get { return _lot; }
- set
- {
- Set(() => Lot, ref _lot, value);
- RaisePropertyChanged(() => ShowMessage);
- }
- }
- public string ShowMessage
- {
- get
- {
- var returnString = "";
- if (Lot % c_LotBit != 0)
- returnString = Client_Resource.Trade_OnlyTwoDecimalPlaces;
- if (this._currentGoods != null)
- {
- var minLots = _igoodsService.GetGoodsParamerRule((int)_currentGoods.GoodsId,
- _currentGoods.TradeMode, GoodsTradeConts.MINOPENTRADEQTY);
- var maxLots = _igoodsService.GetGoodsParamerRule((int)_currentGoods.GoodsId,
- _currentGoods.TradeMode, GoodsTradeConts.MAXOPENTRADEQTY);
-
- if (minLots != null && Lot < minLots.FeeValue)
- {
- returnString = string.Format(Client_Resource.Lot_Open_UpOfMinOpenLot,
- minLots.FeeValue);
- }
- else if (maxLots != null && Lot > maxLots.FeeValue)
- {
- returnString = string.Format(Client_Resource.Lot_Open_DownOfMaxOpenLot,
- maxLots.FeeValue);
- }
- else if (minLots != null && minLots.FeeValue != 0 && Lot % minLots.FeeValue != 0)
- {
- returnString = string.Format(Client_Resource.Trade_LotCountIncorrect, minLots.FeeValue);
- }
- }
- else
- {
- returnString = Client_Resource.Select_Goods_Error;
- }
- if (Lot <= 0)
- {
- returnString = Client_Resource.Lot_Vailed_MustUpOfZero;
- }
- return returnString;
- }
- }
- private Visibility _market_AllownPubsVisiable = Visibility.Collapsed;
- public Visibility Market_AllownPubsVisiable
- {
- get
- {
- return _market_AllownPubsVisiable;
- }
- set
- {
- Set(() => Market_AllownPubsVisiable, ref _market_AllownPubsVisiable, value);
- }
- }
- private decimal _maxLost;
- /// <summary>
- /// 单笔建仓最大数量
- /// </summary>
- public decimal MaxLot
- {
- get { return _maxLost; }
- set { Set(() => MaxLot, ref _maxLost, value); }
- }
- /// <summary>
- /// 市价建买
- /// </summary>
- public RelayCommand BuyCommand
- {
- get
- {
- return new RelayCommand(() =>
- {
- QuickBuy();
- });
- }
- }
- /// <summary>
- /// 市价建卖
- /// </summary>
- public RelayCommand SellCommand
- {
- get
- {
- return new RelayCommand(QuickSell);
- }
- }
- /// <summary>
- /// 快捷卖单消息
- /// </summary>
- /// <param name="goods">The goods.</param>
- private void QuickSellCommand(QuoteGoodsDTO goods)
- {
- //改变当前商品
- SelectGoodsChange(goods);
- //改变数量
- Lot = goods.Lot;
- //内部卖逻辑
- QuickSell();
- }
- /// <summary>
- /// 快捷下买单消息
- /// </summary>
- /// <param name="goods">The goods.</param>
- private void QuickBuyCommand(QuoteGoodsDTO goods)
- {
- //改变当前商品
- SelectGoodsChange(goods);
- //改变数量
- Lot = goods.Lot;
- //内部买逻辑
- QuickBuy();
- }
- /// <summary>
- /// 选择商品改变
- /// </summary>
- /// <param name="goods">The goods.</param>
- private void SelectGoodsChange(QuoteGoodsDTO goods)
- {
- var quoteGoods = CacheManager.CacheGoodsBaseInfos.FirstOrDefault((item) => item.Symbol == goods.Symbol);
- CurrentGoods = quoteGoods;
- if (goods != null)
- {
- //todo:赋值MaxLot
- //MaxLot = goods.GoodsParameters.MaxOpenNumber;
- Lot = goods.Lot;
- }
- CanOpenMarket = true;
- }
- /// <summary>
- /// 内部卖逻辑
- /// </summary>
- private void QuickSell()
- {
- // OpenCloseMode = OpenCloseMode.BUILDTYPE_CLOSE;
- CanOpenMarket = false;
- string errorMsg = "";
- if (VailedFormData(out errorMsg, Direction.Ask))
- {
- string preViewMessage = Client_Resource.Warning_Order_confirm + Environment.NewLine + "\r\n";
- //if (_currentGoods.GoodsParameters.TradeMode != eTradeMode.TRADEMODE_MARKETMAKE)
- //{
- // preViewMessage = @"您确认要限价下单吗?" + Environment.NewLine + "\r\n";
- //}
- preViewMessage += Client_Resource.QuickOrderViewModel_Goods + _currentGoods.GoodsParameters.GoodsName + Environment.NewLine;
- preViewMessage += Client_Resource.QuickOrderViewModel_Direction + Client_Resource.Content_SellOut + Environment.NewLine;
- if (_currentGoods.TradeMode == eTradeMode.TRADEMODE_MARKETMAKE)
- {
- preViewMessage += Client_Resource.QuickOrderViewModel_Price + _currentGoods.AskPrice + Environment.NewLine;
- }
- //else
- //{
- // var currentPrice = decimal.Zero;
- // //竞价、混合=》默认限价下单【取值:最新价OR昨结算价】20160725-Idea from qiang
- // if (_currentGoods.CurrentPrice != decimal.Zero)
- // {
- // currentPrice = _currentGoods.CurrentPrice;
- // }
- // else
- // {
- // currentPrice = _currentGoods.LastSettlement;
- // }
- // preViewMessage += "价 格:" + currentPrice + Environment.NewLine;
- //}
- preViewMessage += Client_Resource.QuickOrderViewModel_Qty + Lot + Environment.NewLine;
- if (MessageBoxHelper.ShowQuestion(preViewMessage, Client_Resource.APP_Tips) == MessageBoxResult.Yes)
- //if (MessageBoxHelper.ShowQuestion(Client_Resource.Warning_Order_confirm, Client_Resource.APP_Tips) == MessageBoxResult.Yes)
- {
- try
- {
- InitTimer();
- PostOrder(Direction.Ask);
- CanOpenMarket = true;
- }
- finally
- {
- CanOpenMarket = true;
- DisposeTimer();
- }
- }
- else
- {
- CanOpenMarket = true;
- }
- }
- else
- {
- MessageBoxHelper.ShowInfo(errorMsg, Client_Resource.MessageBox_Error_Title);
- CanOpenMarket = true;
- }
- }
- /// <summary>
- /// 内部买逻辑
- /// </summary>
- private void QuickBuy()
- {
- CanOpenMarket = false;
- string errorMsg = "";
- if (VailedFormData(out errorMsg, Direction.Bid))
- {
- string preViewMessage = Client_Resource.WarningOpen + Environment.NewLine + "\r\n";
- //if (_currentGoods.GoodsParameters.TradeMode != eTradeMode.TRADEMODE_MARKETMAKE)
- //{
- // preViewMessage = @"您确认要限价{0}建仓吗?" + Environment.NewLine + "\r\n";
- //}
- preViewMessage += Client_Resource.QuickOrderViewModel_Goods + _currentGoods.GoodsParameters.GoodsName + Environment.NewLine;
- preViewMessage += Client_Resource.QuickOrderViewModel_Direction + Client_Resource.Content_Purchase + Environment.NewLine;
- if (_currentGoods.TradeMode == eTradeMode.TRADEMODE_MARKETMAKE)
- {
- preViewMessage += Client_Resource.QuickOrderViewModel_Price + _currentGoods.BidPrice + Environment.NewLine;
- }
- //else
- //{
- // var currentPrice = decimal.Zero;
- // //竞价、混合=》默认限价下单【取值:最新价OR昨结算价】20160725-Idea from qiang
- // if (_currentGoods.CurrentPrice!=decimal.Zero)
- // {
- // currentPrice = _currentGoods.CurrentPrice;
- // }
- // else
- // {
- // currentPrice = _currentGoods.LastSettlement;
- // }
- // preViewMessage += "价 格:" + currentPrice + Environment.NewLine;
- //}
- preViewMessage += Client_Resource.QuickOrderViewModel_Qty + Lot + Environment.NewLine;
- //if (MessageBoxHelper.ShowQuestion(string.Format(Client_Resource.WarningOpen, Client_Resource.Content_Purchase), Client_Resource.WarningOpenPrompt) == MessageBoxResult.Yes)
- if (MessageBoxHelper.ShowQuestion(string.Format(preViewMessage, Client_Resource.Content_Purchase), Client_Resource.WarningOpenPrompt) == MessageBoxResult.Yes)
- {
- try
- {
- InitTimer();
- PostOrder(Direction.Bid);
- }
- finally
- {
- CanOpenMarket = true;
- DisposeTimer();
- }
- }
- else
- {
- CanOpenMarket = true;
- }
- }
- else
- {
- MessageBoxHelper.ShowInfo(errorMsg, Client_Resource.MessageBox_Error_Title);
- CanOpenMarket = true;
- }
- }
- /// <summary>
- /// 验证表单数据是否正确
- /// </summary>
- /// <param name="errorMsg"></param>
- /// <returns></returns>
- private bool VailedFormData(out string errorMsg, Direction direction)
- {
- if (CurrentGoods == null ||string.IsNullOrWhiteSpace((_currentGoods.Name)))
- {
- errorMsg = Client_Resource.Select_Goods_Error; ;
- return false;
- }
- if ((CurrentGoods.ContainsGoodsSrc & (int)GoodsFromScr.Trade) != (int)GoodsFromScr.Trade) ////浏览的商品
- {
- errorMsg = string.Format(Client_Resource.Goods_WithOutTrade_Power, CurrentGoods.Name);
- return false;
- }
-
-
- #region MyRegion
- if (Lot % c_LotBit != 0)
- {
- errorMsg = Client_Resource.Trade_OnlyTwoDecimalPlaces;
- return false;
- }
- if (this._currentGoods != null)
- {
- var minLots = _igoodsService.GetGoodsParamerRule((int)_currentGoods.GoodsId,
- _currentGoods.TradeMode, GoodsTradeConts.MINOPENTRADEQTY);
- var maxLots = _igoodsService.GetGoodsParamerRule((int)_currentGoods.GoodsId,
- _currentGoods.TradeMode, GoodsTradeConts.MAXOPENTRADEQTY);
- if (_currentGoods.GoodsParameters.MoneyMode == eMoneyMode.MONEYMODE_PAY && direction == Direction.Ask)
- {
- #region //全额商品区分买入卖出方向
- var holdingOrders = UserManager.GetCacheOrders<HoldingOrder>();
- if (holdingOrders == null || !holdingOrders.Any())
- {
- errorMsg = Client_Resource.Quick_OrderHasNoHolds;
- return false;
- }
- var holds = holdingOrders.Where((item) => item.GoodsId == CurrentGoods.GoodsParameters.GoodsId && item.Direction == Direction.Bid).ToList();
- if (holds == null || !holds.Any())
- {
- errorMsg = Client_Resource.Quick_OrderHasNoHolds;
- return false;
- }
- else
- {
- //最大数量=持仓汇总-冻结寸头
- var tempMaxLot = (int)(holds.Sum((item) => item.Lot-item.LockQty) - holds.FirstOrDefault().PositionFzQty);
- //全额商品-下单数量是否大于持仓数量
- if (Lot > tempMaxLot)
- {
- errorMsg =string.Format( Client_Resource.Lot_Close_DownOfMaxOpenLot,tempMaxLot);
- return false;
- }
- }
- #endregion
- }
- else
- {
- #region //非全额商品 买入卖出都只有建仓模式
- if (minLots != null && Lot < minLots.FeeValue)
- {
- errorMsg = string.Format(Client_Resource.Lot_Open_UpOfMinOpenLot,
- minLots.FeeValue);
- return false;
- }
- else if (maxLots != null && Lot > maxLots.FeeValue)
- {
- errorMsg = string.Format(Client_Resource.Lot_Open_DownOfMaxOpenLot,
- maxLots.FeeValue);
- return false;
- }
- #endregion
- }
-
- if (minLots != null && minLots.FeeValue != 0 && Lot % minLots.FeeValue != 0)
- {
- errorMsg = string.Format(Client_Resource.Trade_LotCountIncorrect, minLots.FeeValue);
- return false;
- }
- }
- else
- {
- errorMsg = Client_Resource.Select_Goods_Error;
- return false;
- }
- if (Lot <= 0)
- {
- errorMsg = Client_Resource.Lot_Vailed_MustUpOfZero;
- return false;
- }
- #endregion
- errorMsg = string.Empty;
- return true;
- }
- /// <summary>
- /// 发送下单消息
- /// </summary>
- /// <returns>返回下单错误码</returns>
- private void PostOrder(Direction direction)
- {
- var entrustOrder = new NewEntrustOrder()
- {
- GoodsId = (uint)this._currentGoods.GoodsParameters.GoodsId,
- AccountType = UserManager.CurrentTradeAccount.AccountType,
- BuyOrSell = direction,
- EntrustQuantity = Lot,
- OperaterId = UserManager.CurrentTradeAccount.AccountId,
- BuildType = OpenCloseMode.BUILDTYPE_OPEN,
- EntrurstTime = ApplicationParameter.ServerTimeNow,
- PriceMode = ePriceMode.PRICEMODE_MARKET,
- CurrentGoods = this.CurrentGoods,
- GoodsCode = this.CurrentGoods.GoodsCode,
- MemberAreaId = UserManager.CurrentTradeAccount.MemberAreaId,
- ValidType = ExpirationType.Today,
- MarketId = this.CurrentGoods.MarketID,
- TradeMode = CurrentGoods.TradeMode,
- LoginID = UserManager.CurrentTradeAccount.AccountId,
- AccountId = UserManager.CurrentTradeAccount.FundsAccountId,
- OrderFlag = (uint)OrderMethods.NormalOrder,
- OrderFormType = eOrderFormType.Commom,
- };
- var allowPips = _igoodsService.GetGoodsParamerRule((int)_currentGoods.GoodsId,
- _currentGoods.TradeMode, GoodsTradeConts.AllowPips);
- if (_currentGoods.GoodsParameters.MoneyMode == eMoneyMode.MONEYMODE_PAY && direction == Direction.Ask)
- {
- entrustOrder.BuildType = OpenCloseMode.BUILDTYPE_CLOSE;
- }
- //Edit by DK 20160725 //竞价、混合=》默认限价下单【取值:最新价OR昨结算价】-Idea from qiang
- //if (_currentGoods.GoodsParameters.TradeMode != eTradeMode.TRADEMODE_MARKETMAKE)
- //{
- // entrustOrder.PriceMode = ePriceMode.PRICEMODE_LIMIT;
- // if (_currentGoods.CurrentPrice != decimal.Zero)
- // {
- // entrustOrder.EntrustPrice = _currentGoods.CurrentPrice;
- // }
- // else
- // {
- // entrustOrder.EntrustPrice = _currentGoods.LastSettlement;
- // }
-
- //}
- //todo:默认点差
- entrustOrder.AllowTradeSub = allowPips == null ? 0 : allowPips.FeeValue;//ApplicationParameter.AllowTradeSub; //点差只能设置整数
- var orderService = SimpleIoc.Default.GetInstance<IOrderService>();
- //if (UserManager.CurrentTradeAccount.FundsAccounts.Any() &&
- // UserManager.CurrentTradeAccount.FundsAccounts[0] != null)
- //{
- // entrustOrder.AccountId = UserManager.CurrentTradeAccount.FundsAccounts[0].AccountId;
- //}
- //else
- //{
- // entrustOrder.AccountId = UserManager.CurrentTradeAccount.AccountId;
- //}
- if (_currentGoods.GoodsParameters == null)
- {
- MessageBoxHelper.ShowInfo(Client_Resource.APP_Tips, Client_Resource.QuickOrder_ParamersError);
- }
- else
- {
- switch (_currentGoods.TradeMode)
- {
- case eTradeMode.TRADEMODE_MARKETMAKE:
- entrustOrder.EntrustPrice = direction == Direction.Bid
- ? _currentGoods.BidPrice
- : _currentGoods.AskPrice;
- entrustOrder.OrderMode = OrderMode.InValid;
- entrustOrder.CurtQuotePrice = entrustOrder.EntrustPrice;
- orderService.MakeMarketEntrustOrder(entrustOrder, EntrurstSuccessCallBack, EntrurstErrorCallBack);
- break;
- case eTradeMode.TRADEMODE_BIDDING:
- entrustOrder.EntrustPrice = 0;
- entrustOrder.OrderMode = OrderMode.STD;
- entrustOrder.CurtQuotePrice = entrustOrder.EntrustPrice;
- // entrustOrder.TradeCloseMode = TradeCloseMode.IsVailed;
- orderService.BidMarketEntrustOrder(entrustOrder, EntrurstSuccessCallBack, EntrurstErrorCallBack);
- break;
- case eTradeMode.TRADEMODE_BIDDINGMARKETMAKE:
- entrustOrder.EntrustPrice = 0;
- entrustOrder.OrderMode = OrderMode.InValid;
- entrustOrder.CurtQuotePrice = entrustOrder.EntrustPrice;
- // entrustOrder.TradeCloseMode = TradeCloseMode.IsVailed;
- orderService.MixMarketEntrustOrder(entrustOrder, EntrurstSuccessCallBack, EntrurstErrorCallBack);
- break;
- case eTradeMode.TRADEMODE_ENTRUST_HEDGE:
- entrustOrder.CurtQuotePrice = direction == Direction.Ask ? _currentGoods.BidPrice : _currentGoods.AskPrice;
- entrustOrder.ChannelPriceMode = ChannelPriceMode.MarketPrice;
- orderService.ChannelEntrustOrder(entrustOrder, EntrurstSuccessCallBack, EntrurstErrorCallBack);
- break;
- default:
- var message = string.Format(Client_Resource.QuickOrder_TradeModeError, _currentGoods.TradeMode);
- MessageBoxHelper.ShowInfo(Client_Resource.APP_Tips, message);
- break;
- }
- }
- }
- /// <summary>
- /// 提交成功返回
- /// </summary>
- /// <param name="order"></param>
- private void EntrurstSuccessCallBack(OrderDetail order)
- {
- //更新相应的单据
- MessengerHelper.DefaultSend(UserManager.CurrentTradeAccount, MessengerTokens.OrderNoticeToken);
- Application.Current.Dispatcher.BeginInvoke(new Action(() =>
- {
- MessageBoxHelper.ShowSuccess(Client_Resource.Order_Success_Result,
- Client_Resource.Open_MessageBox_Title);
- IsBusy = false;
- }));
-
- }
- /// <summary>
- /// 委托失败返回
- /// </summary>
- /// <param name="errorEntity"></param>
- private void EntrurstErrorCallBack(ErrorEntity errorEntity)
- {
- Application.Current.Dispatcher.BeginInvoke(new Action(() =>
- {
- ErrorManager.ShowReturnError(errorEntity, Client_Resource.UI2014_Tips, true);
- IsBusy = false;
- }));
- }
- #region 设置下单倒数定时器
- private string _busyTips;
- /// <summary>
- /// 服务忙提示
- /// </summary>
- public string BusyTips
- {
- get
- {
- return _busyTips;
- }
- set
- {
- Set(() => BusyTips, ref _busyTips, value);
- }
- }
- private Timer _timer; //下单计时
- private int _countTime; //倒计时时间
- private bool _isOrderVisible = false;
- /// <summary>
- /// 是否显示快速下单
- /// </summary>
- public bool IsOrderVisible
- {
- get { return _isOrderVisible; }
- set { Set(() => IsOrderVisible, ref _isOrderVisible, value); }
- }
- /// <summary>
- /// 初始化下单计时时间
- /// </summary>
- private void InitTimer()
- {
- _countTime = ApplicationParameter.ServerTimeOut;
- this._timer = new Timer(1000);
- this._timer.AutoReset = true;
- this._timer.Elapsed += _timer_Elapsed;
- this._timer.Start();
- IsOrderVisible = true;
- BusyTips = string.Format(Client_Resource.Busy_Summit_Wait, _countTime);
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- void _timer_Elapsed(object sender, ElapsedEventArgs e)
- {
- _countTime--;
- BusyTips = string.Format(Client_Resource.Busy_Summit_Wait, _countTime);
- }
- /// <summary>
- /// 清除计时器
- /// </summary>
- private void DisposeTimer()
- {
- this._timer.Stop();
- this._timer.Elapsed -= _timer_Elapsed;
- this._timer.Close();
- IsOrderVisible = false;
- }
- #endregion
- }
- }
|