public TodoSwitchItemViewModel() { Item = new TodoSwitchItem() { DateTime = DateTime.Now }; }
private void FillTodoSwitchItem(SQLiteConnection connection) { var random = new Random(); for (int i = 0; i < 100; i++) { var date = DateTime.Now.AddHours(-2); date = date.AddDays(i - 50); var todoItem = new TodoSwitchItem() { Name = "Switch Todo №" + (i + 1), DateTime = date, IsSwitched = random.Next(0, 1) == 1 }; connection.Insert(todoItem); } }
public TodoSwitchItemViewModel(TodoSwitchItem item) : base(item) { IsSwitched = item.IsSwitched; }