| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- using Muchinfo.MTPClient.Infrastructure.Interfaces;
- using System.Collections.Generic;
- namespace Muchinfo.MTPClient.UI.Utilities
- {
- public class BackManager
- {
- /// <summary>
- /// 执行操作集合,用于后退
- /// </summary>
- private static List<WindowItem> _backList = new List<WindowItem>();
- #region 后退操作
- /// <summary>
- /// 添加到后退集合
- /// </summary>
- /// <param name="item">The item.</param>
- public static void AddToBackList(WindowItem item)
- {
- _backList.Insert(0, item);
- }
- /// <summary>
- /// 后退
- /// </summary>
- public static void BackOff()
- {
- //粤国际:取消此功能
- return;
- //if (!_backList.Any()) return;
- ////删除当前的
- //if (_backList.Count > 1) _backList.RemoveAt(0);
- //var item = _backList.FirstOrDefault();
- //if (item == null) return;
- //_backList.Remove(item);
- //switch (item.WindowType)
- //{
- // case WindowType.QuoteListView:
- // var commandItem = item as WindowItemWithCommandType;
- // if (commandItem == null) return;
- // WindowHelper.OpenQuoteListWindow(commandItem.Title, commandItem.MenuCommandType, commandItem.AdditionalInfo);
- // break;
- // case WindowType.TikDetails:
- // case WindowType.TradeDetails:
- // var goods = CacheManager.CacheGoodsBaseInfos.FirstOrDefault(z => z.Id == item.AdditionalInfo);
- // if (goods == null) return;
- // //var quoteGoods = goods.ToQuoteGoods();
- // if (item.WindowType == WindowType.TradeDetails)
- // {
- // PriceCardHelper.OpenSubPenDetail(goods);
- // }
- // else
- // {
- // PriceCardHelper.OpenSubPriceDetail(goods);
- // }
- // break;
- // case WindowType.QuoteChartView:
- // var chartItem = item as ChartWindowItem;
- // if (chartItem == null) return;
- // var arg = new OpenQuoteChartWindowArg(chartItem.Goods, chartItem.CycleType);
- // WindowHelper.OpenQuoteChartWindow(arg);
- // break;
- // case WindowType.NewsView:
- // var newsItem = item as NewsWindowItem;
- // if (newsItem == null) return;
- // WindowHelper.OpenNewsWindow(newsItem.CategoryCode);
- // break;
- //}
- }
- #endregion
- }
- }
|