Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 public ShakeListViewerView(ShakeList list)
 {
     this.EdgesForExtendedLayout = UIRectEdge.None;
     this.View.BackgroundColor = UIColor.White;
     __presenter = new ShakeListViewerPresenter(this, list);
 }
Ejemplo n.º 5
0
        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;
        }