Esempio n. 1
0
        //        private AppTimer timerAlerts;

//        Dictionary<string, TradePair> tradePairs;


        public Form1()
        {
            InitializeComponent();

//            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls12;
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

            labelInfo.Text = "Please wait..Loading";
            Helper.Init();
            Global.uiScheduler = TaskScheduler.FromCurrentSynchronizationContext();

            AppSettingsManager.LoadSettings();
            Global.markets.Init();
            Global.marketsState.Init();
            StatusBar.Init(statusLabelDate, statusLabelMain);

            toolStripComboBoxMarket.Items.Clear();
            foreach (var market in Global.markets.GetMarketList())
            {
                toolStripComboBoxMarket.Items.Add(market.ToString());
            }
            RequestConsumer.requestManager.Create(Global.markets.GetMarketList());
            RequestConsumer.CreateRequestThreads(Global.markets.GetMarketList());


            timerMarkets     = new AppTimer(26000, TimerMarkets_Tick, this);
            timerCheckAlerts = new AppTimer(5000, TimerCheckAlerts_Tick, this);
            timerCheckAlerts.Start();
            toolStripComboBoxMarket.SelectedIndex = 0;
        }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();
            Helper.Init();

            Global.uiScheduler = TaskScheduler.FromCurrentSynchronizationContext();

            toolStripComboBoxMarket.Items.Clear();
            foreach (var market in Global.markets.GetMarketList())
            {
                toolStripComboBoxMarket.Items.Add(market.ToString());
            }

            RequestConsumer.requestManager.Create(Global.markets.GetMarketList());
            RequestConsumer.CreateRequestThreads(Global.markets.GetMarketList());

            timerMarkets = new AppTimer(45000, TimerMarkets_Tick, this);
            toolStripComboBoxMarket.SelectedIndex = 0;
        }