using System.Collections.Generic; namespace Muchinfo.MTPClient.UI.Utilities { public class ChartManager { private static Dictionary _customMinutes = new Dictionary(); /// /// Gets the current custom minute. /// /// The window key. /// System.Int32. public static int GetCurrentCustomMinute(string windowKey) { if (_customMinutes.ContainsKey(windowKey)) { return _customMinutes[windowKey]; } return 0; } /// /// Adds the custom minute. /// /// The window key. /// The minute. public static void AddOrUpdateCustomMinute(string windowKey, int minute) { if (_customMinutes.ContainsKey(windowKey)) { _customMinutes[windowKey] = minute; } else { _customMinutes.Add(windowKey, minute); } } /// /// Removes the custom minute. /// /// The window key. public static void RemoveCustomMinute(string windowKey) { if (_customMinutes.ContainsKey(windowKey)) { _customMinutes.Remove(windowKey); } } /// /// Gets the active view custom minute. /// /// System.Int32. public static int GetActiveViewCustomMinute() { return 0; //var activeChartView = WindowHelper.GetWindow(WindowType.QuoteChartView); //if (activeChartView == null) return 1; //var key = activeChartView.WindowItem.WindowKey; //return GetCurrentCustomMinute(key); } } }