コード例 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
            ServicePointManager.SecurityProtocol            = (SecurityProtocolType)3072; //TLS 1.2
            // CheckForIllegalCrossThreadCalls = false; //para que los hilos secomporten como en clases de netframework 1.1 o 2.0

            configuragrafica();

            Bitso bit = new Bitso(true);

            bit.consultamonedasBitso(dgvMonedas, ref lstMonedas);
            tHilogral.Enabled    = true;
            tHiloOrdenes.Enabled = false;
        }
コード例 #2
0
        private void leedatos()
        {
            Bitso bitso = new Bitso("JkkXaYKKDo", "578d14362dd2d68d05cb4dd0b2a92012", true);

            bitso.consultaHistorialMonedas();
            foreach (var mh in bitso.lHistrialmoney)
            {
                this.lstHistrialmoney.Add(new CMonedaHistorial {
                    moneda     = mh.moneda,
                    valormin   = mh.valormin,
                    valormax   = mh.valormax,
                    tiempomin  = mh.tiempomin,
                    tiempomax  = mh.tiempomax,
                    valorclose = mh.valorclose,
                    valoropen  = mh.valoropen
                });
            }
        }
コード例 #3
0
        private void tHilogral_Tick(object sender, EventArgs e)
        {
            for (Int32 index = 0; index < dgvMonedas.Rows.Count; index++)
            {
                Bitso           bitso = new Bitso(true);
                delegadomonedas dm1   = new delegadomonedas(bitso.consultamoneda); //
                IAsyncResult    ar    = dm1.BeginInvoke(dgvMonedas.Rows[index].Cells["dgcolmoneda"].Value.ToString().Trim(), dgvMonedas, index, null, null);

                string sReturn = string.Empty;
                //dm1.EndInvoke(ref sReturn, ar);
                if (ar.IsCompleted)
                {
                    ar.AsyncWaitHandle.Close();
                    //dhilos.Mensaje -= new Bitso.MensajeErrorDelegate(cmh_Mensaje);
                }
                //dhilos.Mensaje += new CDatosMonedas.MensajeErrorDelegate(cmh_Mensaje);
                bitso.Mensaje += new Bitso.MensajeErrorDelegate(cmh_Mensaje);
            }
        }//finaliza timer general