public void UpdateDot(DamageDotListItem sender, string update) { for(int i=0; i< model.GetCurrentFrame().DamageDots.Count(); ++i) { if (model.GetCurrentFrame().DamageDots[i] == sender.original) { string[] dimensions = update.Split(','); try { Rectangle rect = new Rectangle( int.Parse(dimensions[0]), int.Parse(dimensions[1]), int.Parse(dimensions[2]), int.Parse(dimensions[3])); model.GetCurrentFrame().DamageDots[i] = rect; sender.original = rect; } catch { } return; } } OnPropertyChanged(() => this.DamageDotItems); }
public void RemoveDotFromFrame(DamageDotListItem sender) { model.GetCurrentFrame().DamageDots = model.GetCurrentFrame().DamageDots.ToList().Where(r => MetaFileAnimationManager.GetRectangleCSV(r) != sender.DotLocation).ToArray(); OnPropertyChanged(() => this.DamageDotItems); LogDebug("AddingDot"); }