public override IList <SettingItem> GetConnectionParameters() { var infoItem = new SelectItem(CONNECTION_INFO, CONNECTION_INFO); var tradingItem = new SelectItem(CONNECTION_TRADING, CONNECTION_TRADING); var relation = new SettingItemRelationEnability(CONNECTION, tradingItem); var result = new List <SettingItem> { new SettingItemGroup(LOGIN_PARAMETER_GROUP, new List <SettingItem> { new SettingItemRadioLocalized(CONNECTION, infoItem, new List <SelectItem> { infoItem, tradingItem }), new SettingItemString(PARAMETER_API_KEY, string.Empty) { Text = "API key", Relation = relation }, new SettingItemPassword(PARAMETER_SECRET_KEY, new PasswordHolder()) { Text = "Secret key", Relation = relation } }) }; return(result); }
public static VendorMetaData GetVendorMetaData() => new VendorMetaData { VendorName = OKExConsts.VENDOR_NAME, GetDefaultConnections = () => new List <ConnectionInfo> { CreateDefaultConnectionInfo(OKExConsts.VENDOR_NAME, OKExConsts.VENDOR_NAME, Path.Combine("OKExV5Vendor", "okex.svg"), null, true, links: new List <ConnectionInfoLink>() { new ConnectionInfoLink() { Text = "Register account", URL = @"https://www.okex.com/join/8738452" } }) }, GetConnectionParameters = () => { var infoItem = new SelectItem(OKExConsts.CONNECTION_INFO, OKExConsts.CONNECTION_INFO); var tradingItem = new SelectItem(OKExConsts.CONNECTION_TRADING, OKExConsts.CONNECTION_TRADING); var relation = new SettingItemRelationEnability(CONNECTION, tradingItem); return(new List <SettingItem> { new SettingItemGroup(LOGIN_PARAMETER_GROUP, new List <SettingItem> { new SettingItemRadioLocalized(CONNECTION, infoItem, new List <SelectItem> { infoItem, tradingItem }), new SettingItemString(OKExConsts.PARAMETER_API_KEY, string.Empty) { Text = loc.key("API key"), Relation = relation }, new SettingItemPassword(OKExConsts.PARAMETER_SECRET_ID, new PasswordHolder()) { Text = loc.key("Secret key"), Relation = relation }, new SettingItemPassword(OKExConsts.PARAMETER_PASSPHRASE_ID, new PasswordHolder()) { Text = loc.key("Password"), Relation = relation } }) }); } };
public static VendorMetaData GetVendorMetaData() => new VendorMetaData { VendorName = VENDOR_NAME, VendorDescription = loc.key("Market data connection. Trading coming soon."), GetDefaultConnections = () => new List <ConnectionInfo> { CreateDefaultConnectionInfo("HitBTC", VENDOR_NAME, "HitBTCVendor\\hit_btc.svg") }, GetConnectionParameters = () => { var infoItem = new SelectItem(CONNECTION_INFO, CONNECTION_INFO); var tradingItem = new SelectItem(CONNECTION_TRADING, CONNECTION_TRADING); var relation = new SettingItemRelationEnability(CONNECTION, tradingItem); return(new List <SettingItem> { new SettingItemGroup(LOGIN_PARAMETER_GROUP, new List <SettingItem> { new SettingItemRadioLocalized(CONNECTION, infoItem, new List <SelectItem> { infoItem, tradingItem }), new SettingItemString(PARAMETER_API_KEY, string.Empty) { Text = loc.key("API key"), Relation = relation }, new SettingItemPassword(PARAMETER_SECRET_KEY, new PasswordHolder()) { Text = loc.key("Secret key"), Relation = relation } }) }); }, };