コード例 #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;
        }
コード例 #2
0
ファイル: ShakeList_DB.cs プロジェクト: jhenier13/ShakeMyList
        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;
        }
コード例 #3
0
ファイル: ShakeList_DB.cs プロジェクト: jhenier13/ShakeMyList
        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;
        }
コード例 #4
0
 public ShakeListViewerView(ShakeList list)
 {
     this.EdgesForExtendedLayout = UIRectEdge.None;
     this.View.BackgroundColor = UIColor.White;
     __presenter = new ShakeListViewerPresenter(this, list);
 }
コード例 #5
0
ファイル: ShakeList.cs プロジェクト: jhenier13/ShakeMyList
        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;
        }