public static void BlockPair(PoloniexAPI.CurrencyPair pair, bool state) { mainForm.strategyControl1.SetBlockedPairData(pair, state); mainForm.strategyControl1.Invalidate(); PairSummariesManager.SetPairBlock(pair, state); UpdatePairSummaries(); }
public static bool UnmarkPairUser(PoloniexAPI.CurrencyPair pair) { if (PairSummariesManager.MarkPairSummary(pair, false)) { UpdatePairSummaries(); return(true); } else { return(false); } }
public static void ClearPairSummaries() { PairSummariesManager.ClearPairSummaries(); UpdatePairSummaries(); }
public static void RemovePairSummary(PoloniexAPI.CurrencyPair pair) { PairSummariesManager.RemovePairSummary(pair); UpdatePairSummaries(); }
public static void SetPairSummary(PoloniexAPI.CurrencyPair pair, PoloniexAPI.TickerChangedEventArgs[] tickers, double volume) { PairSummariesManager.SetPairSummary(pair, tickers, volume); UpdatePairSummaries(); }
// -------------------------- private static void UpdatePairSummaries() { List <PairSummariesManager.PairSummary> pairs = new List <PairSummariesManager.PairSummary>(PairSummariesManager.GetPairsSorted()); pairs.Sort(); pairs.Reverse(); for (int i = 0; i < mainForm.pairControls.Length; i++) { mainForm.pairControls[i].SetToNoData(); if (i < pairs.Count) { mainForm.pairControls[i].UpdatePair(pairs[i].Pair, pairs[i].Tickers, pairs[i].MarkedUser); mainForm.pairControls[i].SetBlocked(pairs[i].Blocked); } mainForm.pairControls[i].Invalidate(); } }