public ShakeListEditorView(ShakeList editList, bool isAClon = false) { __presenter = new ShakeListEditorPresenter(this, editList); __mode = (isAClon) ? AppViewMode.New : AppViewMode.Edit; this.EdgesForExtendedLayout = UIRectEdge.None; this.View.BackgroundColor = UIColor.White; }
public static List<ShakeList> GetRecentLists() { List<ShakeList> recentLists = new List<ShakeList>(); string selectRecentsQuery = string.Format("SELECT * FROM {0} ORDER BY {1} DESC LIMIT {2}", TABLE_NAME, LAST_OPENED_DATE, 5); DataTable table = SQLiteLinker.GetDataTable(selectRecentsQuery); foreach (DataRow singleRow in table.Rows) { ShakeList newList = new ShakeList(); newList.LoadData(singleRow); recentLists.Add(newList); } return recentLists; }
public static List<ShakeList> GetAllLists() { List<ShakeList> allLists = new List<ShakeList>(); string selectAllQuery = string.Format("SELECT * FROM {0}", TABLE_NAME); DataTable table = SQLiteLinker.GetDataTable(selectAllQuery); foreach (DataRow singleRow in table.Rows) { ShakeList newList = new ShakeList(); newList.LoadData(singleRow); allLists.Add(newList); } return allLists; }
public ShakeListViewerView(ShakeList list) { this.EdgesForExtendedLayout = UIRectEdge.None; this.View.BackgroundColor = UIColor.White; __presenter = new ShakeListViewerPresenter(this, list); }
public ShakeList Clone() { ShakeList clonedList = new ShakeList(); clonedList.Name = this.Name; foreach (ShakeItem item in _items) { ShakeItem newClonedItem = item.Clone(); clonedList.AddItem(newClonedItem); } return clonedList; }