using System; using System.Collections.Generic; using System.Text; namespace data.BC { public class ConnectionRequest { public ConnectionRequest() { this._ProtocolId = ProtocolId.Default; this._PlatformId = "IX86"; this._ProductId = "D2XP"; this._Version = Version.Default; this._ProductLanguage = ProductLanguage.English; this._TimeZone = TimeZone.Est; this._LocalId = LocalId.Default; this._LanguageId = LanguageId.Default; this._Country = Country.Canada; } public ConnectionRequest(uint LocalIP, string CountryAbvr, string CountryString) { this._ProtocolId = ProtocolId.Default; this._PlatformId = "IX86"; this._ProductId = "D2XP"; this._Version = Version.Default; this._ProductLanguage = ProductLanguage.English; this._TimeZone = TimeZone.Est; this._LocalId = LocalId.Default; this._LanguageId = LanguageId.Default; this._Country = Country.Canada; this.LocalIP = LocalIP; this.CountryAbvr = CountryAbvr; this.CountryString = CountryString; } public ConnectionRequest(string PlatformId, string ProductId, Country country, ProtocolId protocolid, Version version, ProductLanguage productlanguage, TimeZone timezone, LocalId localid, LanguageId languageid) { this._ProtocolId = protocolid; this._PlatformId = PlatformId; this._ProductId = ProductId; this._Version = version; this._ProductLanguage = productlanguage; this._TimeZone = timezone; this._LocalId = localid; this._LanguageId = languageid; this._Country = country; } public ConnectionRequest(string PlatformId, string ProductId, Country country, ProtocolId protocolid, Version version, ProductLanguage productlanguage, TimeZone timezone, LocalId localid , LanguageId languageid, uint LocalIP, string CountryAbvr, string CountryString) { this._ProtocolId = protocolid; this._PlatformId = PlatformId; this._ProductId = ProductId; this._Version = version; this._ProductLanguage = productlanguage; this._TimeZone = timezone; this._LocalId = localid; this._LanguageId = languageid; this._Country = country; this.LocalIP = LocalIP; this.CountryAbvr = CountryAbvr; this.CountryString = CountryString; } public ProtocolId _ProtocolId; public string _PlatformId; public string _ProductId; public Version _Version; public ProductLanguage _ProductLanguage; public TimeZone _TimeZone; public LocalId _LocalId; public LanguageId _LanguageId; public Country _Country; private uint LocalIP = 0x0a02a8c0; private string CountryAbvr = "CAN"; private string CountryString = "Canada"; public byte[] Build() { MBNCSUtil.BncsPacket myPacket = new MBNCSUtil.BncsPacket(0x50); myPacket.InsertInt32((int)this._ProtocolId); myPacket.InsertDwordString(this._PlatformId); myPacket.InsertDwordString(this._ProductId); myPacket.InsertInt32((int)this._Version); myPacket.InsertInt32((int)this._LanguageId); //lang myPacket.InsertInt32((int)this.LocalIP); myPacket.InsertInt32((int)this._TimeZone);//timezone myPacket.InsertInt32((int)this._LocalId); //local id myPacket.InsertInt32((int)this._LanguageId); //langID myPacket.InsertCString(this.CountryAbvr); myPacket.InsertCString(this.CountryString); return myPacket.GetData(); } } }