Ejemplo n.º 1
0
        public ConnectAPI(Privacies privacy)
        {
            int index = 0;

            this.privacy = privacy;
            InitializeComponent();

            foreach (Control control in Controls)
            {
                FindControlRecursive(control);
            }

            if (string.IsNullOrEmpty(privacy.SecurityAPI) == false)
            {
                securites                             = new Secrecy().Decipher(privacy.Security, privacy.SecurityAPI);
                textCertificate.Text                  = securites[index++];
                textPassword.Text                     = securites[++index];
                textIdentity.Text                     = securites[++index];
                checkPrivacy.CheckState               = CheckState.Checked;
                textPassword.UseSystemPasswordChar    = true;
                textCertificate.UseSystemPasswordChar = true;
            }
            Codes      = new HashSet <Codes>();
            Strategics = new HashSet <IStrategics>();
            Stocks     = new T8411();
            Options    = new T8414();
            JIF        = new JIF();
        }
Ejemplo n.º 2
0
        public ConnectAPI(Privacies privacy)
        {
            int index = 0;

            this.privacy = privacy;
            InitializeComponent();

            foreach (Control control in Controls)
            {
                FindControlRecursive(control);
            }

            if (string.IsNullOrEmpty(privacy.SecurityAPI) == false)
            {
                securites                             = new Secrecy().Decipher(privacy.Security, privacy.SecurityAPI);
                textCertificate.Text                  = securites[index++];
                textPassword.Text                     = securites[++index];
                textIdentity.Text                     = securites[++index];
                checkPrivacy.CheckState               = CheckState.Checked;
                textPassword.UseSystemPasswordChar    = true;
                textCertificate.UseSystemPasswordChar = true;
            }
            var now = DateTime.Now;

            Codes      = new HashSet <Codes>();
            Strategics = new HashSet <IStrategics>();
            querys     = (now.Hour == 0xF && now.Minute < 0x2D || now.Hour < 0xF) && now.Hour > 4 ? new IQuerys <SendSecuritiesAPI>[] { new CFOBQ10500(), new T0441() } : new IQuerys <SendSecuritiesAPI>[] { new CCEBQ10500(), new CCEAQ50600() };
            Stocks     = new T8411();
            Options    = new T8414();
            JIF        = new JIF();
        }