Connect(Privacies privacy, ShareInvest.Catalog.XingAPI.LoadServer load) { if (ConnectServer(load.Server, 0x4E21) && Login(privacy.Identity, privacy.Password, privacy.Certificate, 0, string.IsNullOrEmpty(privacy.Certificate) == false) && IsLoadAPI()) { _IXASessionEvents_Event_Login += OnEventConnect; Disconnect += Dispose; secrecy = new Secrecy(); Request = Delay.GetInstance(0xCD); while (TimerBox.Show(secrecy.Connection, load.Date, MessageBoxButtons.OK, MessageBoxIcon.Information, 0xC57).Equals(DialogResult.OK)) { if (Accounts != null) { Request.Run(); return; } } } else { Dispose(); } }
internal static Connect GetInstance(Privacies privacy, ShareInvest.Catalog.XingAPI.LoadServer load) { if (API == null) { HoldingStock = new Dictionary <string, Holding>(); API = new Connect(privacy, load); } return(API); }