예제 #1
0
        public static void BlockPair(PoloniexAPI.CurrencyPair pair, bool state)
        {
            mainForm.strategyControl1.SetBlockedPairData(pair, state);
            mainForm.strategyControl1.Invalidate();

            PairSummariesManager.SetPairBlock(pair, state);
            UpdatePairSummaries();
        }
예제 #2
0
 public static bool UnmarkPairUser(PoloniexAPI.CurrencyPair pair)
 {
     if (PairSummariesManager.MarkPairSummary(pair, false))
     {
         UpdatePairSummaries();
         return(true);
     }
     else
     {
         return(false);
     }
 }
예제 #3
0
 public static void ClearPairSummaries()
 {
     PairSummariesManager.ClearPairSummaries();
     UpdatePairSummaries();
 }
예제 #4
0
 public static void RemovePairSummary(PoloniexAPI.CurrencyPair pair)
 {
     PairSummariesManager.RemovePairSummary(pair);
     UpdatePairSummaries();
 }
예제 #5
0
 public static void SetPairSummary(PoloniexAPI.CurrencyPair pair, PoloniexAPI.TickerChangedEventArgs[] tickers, double volume)
 {
     PairSummariesManager.SetPairSummary(pair, tickers, volume);
     UpdatePairSummaries();
 }
예제 #6
0
        // --------------------------

        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();
            }
        }