using Muchinfo.MTPClient.Infrastructure.Interfaces;
using System.Collections.Generic;
namespace Muchinfo.MTPClient.UI.Utilities
{
public class BackManager
{
///
/// 执行操作集合,用于后退
///
private static List _backList = new List();
#region 后退操作
///
/// 添加到后退集合
///
/// The item.
public static void AddToBackList(WindowItem item)
{
_backList.Insert(0, item);
}
///
/// 后退
///
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
}
}