public override void Refresh(User user) { SizeX.Set(user.XSize.Value); SizeY.Set(user.YSize.Value); CellItems.Set((new int[user.XSize.Value * user.YSize.Value]).Select((i, index) => new CellItemViewModel.Parametrs() { X = index % user.XSize.Value, Y = index / user.XSize.Value }).ToList()); SetFlagCount(user); SetFlagMode(user); }
public RecordsViewModel() { var user = AppModel.GetUser(); Records.Set(user.Records.Select(item => new RecordItemViewModel.Parametrs(item.Name, item.Time)).ToList()); }