public void UpdateFromModel(GuildShieldInfo Model, bool RaiseChangedEvent) { if (RaiseChangedEvent) { GuildID = Model.GuildID; GuildName = Model.GuildName; Color1 = Model.Color1; Color2 = Model.Color2; Design = Model.Design; } else { guildID = Model.GuildID; guildName = Model.GuildName; color1 = Model.Color1; color2 = Model.Color2; design = Model.Design; // update examplemodel exampleModel.ColorTranslation = ColorTransformation.GetGuildShieldColor(color1, color2); if (design > 0 && shields != null && shields.Length > (design - 1)) { exampleModel.OverlayFileRID = shields[design - 1].Value; exampleModel.OverlayFile = shields[design - 1].Name; exampleModel.Resource = shields[design - 1].Resource; } } }
public void Clear(bool RaiseChangedEvent) { if (RaiseChangedEvent) { GuildID = new ObjectID(); GuildName = DESIGNNOTAVAILABLE; Color1 = WHITECOLOR; Color2 = WHITECOLOR; Design = 1; } else { guildID = new ObjectID(); guildName = DESIGNNOTAVAILABLE; color1 = WHITECOLOR; color2 = WHITECOLOR; design = 1; // update examplemodel exampleModel.ColorTranslation = ColorTransformation.GetGuildShieldColor(color1, color2); if (design > 0 && shields != null && shields.Length > (design - 1)) { exampleModel.OverlayFileRID = shields[design - 1].Value; exampleModel.OverlayFile = shields[design - 1].Name; exampleModel.Resource = shields[design - 1].Resource; } } }