void SendMsg(TitleEnum enumType, MsgData msg) { EventParameter par = EventParameter.Get(msg); par.intParameter = (int)enumType; CoreEntry.gEventMgr.TriggerEvent(GameEvent.GE_CC_PlayerTitleUpdate, par); }
public override int GetHashCode() { var hash = base.GetHashCode(); hash ^= Readonly.GetHashCode(); hash ^= IntId.GetHashCode(); hash ^= UIntId.GetHashCode(); hash ^= LongId.GetHashCode(); hash ^= ULongId.GetHashCode(); hash ^= ShortId.GetHashCode(); hash ^= UShortId.GetHashCode(); hash ^= DoulbeId.GetHashCode(); hash ^= ByteId.GetHashCode(); hash ^= CharId.GetHashCode(); hash ^= SByteId.GetHashCode(); hash ^= CharRef.GetHashCode(); hash ^= ByteRef.GetHashCode(); hash ^= SByteRef.GetHashCode(); hash ^= Int16Id.GetHashCode(); hash ^= UInt16Id.GetHashCode(); hash ^= Int32Id.GetHashCode(); hash ^= UInt32Id.GetHashCode(); hash ^= Int64Id.GetHashCode(); hash ^= UInt64Id.GetHashCode(); hash ^= DateTime.GetHashCode(); hash ^= TitleEnum.GetHashCode(); hash ^= ATitleEnum.GetHashCode(); hash ^= FirstName.GetHashCode(); hash ^= LastName.GetHashCode(); hash ^= Bool.GetHashCode(); hash ^= BoolRef.GetHashCode(); if (Array != null) { hash ^= Array.GetHashCode(); } if (Enumerable != null) { hash ^= Enumerable.GetHashCode(); } if (Father != null) { hash ^= Father.GetHashCode(); } if (Mother != null) { hash ^= Mother.GetHashCode(); } if (Hidden != null) { hash ^= Hidden.GetHashCode(); } return(hash); }
public PersonalInfo(TitleEnum aTitle, string aFirstName, string aLastName, string anEmail, string aPassword , DateTime aBirthDate, Boolean aNewsLetter, Boolean aSpecialOffers, string aCompany, Address anAddress , string anAddressAlias, string anAditionalInfo, string aHomePhone, string aMobilePhone) { Title = aTitle; FirstName = aFirstName; LastName = aLastName; Email = anEmail; Password = aPassword; BirthDate = aBirthDate; Newsletter = aNewsLetter; SpecialOffers = aSpecialOffers; Company = aCompany; Address = anAddress; AddressAlias = anAddressAlias; AdditionalInfo = anAditionalInfo; HomePhone = aHomePhone; MobilePhone = aMobilePhone; }
public List <CustomerItem> GetCustomersFromInputFile(string InputFilePath) { List <CustomerItem> customerList = new List <CustomerItem>(); //Used to remember the column positions in the CSV file. if (File.Exists(InputFilePath)) { using (TextFieldParser parser = new TextFieldParser(InputFilePath, Encoding.GetEncoding("iso-8859-1"))) { Dictionary <int, string> columnOrdinal = new Dictionary <int, string>(); parser.Delimiters = new string[] { "," }; while (!parser.EndOfData) { string[] columns = parser.ReadFields(); if (columns == null) { break; } else { if (columnOrdinal.Count == 0) { for (int i = 0; i < columns.Length; i++) { columnOrdinal.Add(i, columns[i].ToUpperInvariant()); } } else { int outIntValue = -1; double outDoubleValue = -1; TitleEnum titleEnum = TitleEnum.Mrs; CustomerItem customerItem = new CustomerItem(); for (int i = 0; i < columns.Length; i++) { switch (columnOrdinal[i]) { case "ID": if (int.TryParse(columns[i], out outIntValue)) { customerItem.ID = outIntValue; } break; case "TITLE": if (Enum.TryParse(columns[i], out titleEnum)) { customerItem.Title = titleEnum.ToString(); } else { customerItem.Title = string.Empty; } break; case "FIRSTNAME": customerItem.FirstName = columns[i].Trim(); break; case "SURNAME": customerItem.SurName = columns[i].Trim(); break; case "PRODUCTNAME": customerItem.ProductName = columns[i].Trim(); break; case "PAYOUTAMOUNT": if (double.TryParse(columns[i], out outDoubleValue)) { customerItem.PaymentAmount = outDoubleValue; } break; case "ANNUALPREMIUM": if (double.TryParse(columns[i], out outDoubleValue)) { customerItem.AnnualPremium = outDoubleValue; } break; } } customerList.Add(customerItem); } } } } } else { throw new FileNotFoundException("File Not Found", InputFilePath); } return(customerList); }