Exemplo n.º 1
0
        public override void OnBackPressed()
        {
            TreePagerAdapter.bmp = null;
            ListItems.Syokika();

            Console.WriteLine("ああああああああああああああああああああああああああああああ");
            Finish();
        }
Exemplo n.º 2
0
        private async Task UpdateCheckedTodoItem(TodoItem item)
        {
            // This code takes a freshly completed TodoItem and updates the database. When the MobileService
            // responds, the item is removed from the list
            await todoTable.UpdateAsync(item);

            items.Remove(item);
            ListItems.Focus(Windows.UI.Xaml.FocusState.Unfocused);

            //await SyncAsync(); // offline sync
        }
Exemplo n.º 3
0
        protected void Getfromdb()
        {
            string dbPath = System.IO.Path.Combine(
                Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim).ToString(), "App4no.db");
            SQLiteConnection db = new SQLiteConnection(dbPath);

            var table_sorted = plan_main.SortCard(db);

            ListItems.Syokika();
            foreach (var a in table_sorted)
            {
                ListItems.IdList.Add(a.Id);
                ListItems.DateList.Add(a.dateTime.Year + "/" + a.dateTime.Month + "/" + a.dateTime.Day);
                ListItems.TimeList.Add(a.dateTime.Hour.ToString() + ":" + a.dateTime.Minute.ToString());
                ListItems.CommentList.Add(a.Comment);
                ListItems.PlanList.Add(a.Plan);
            }
        }
Exemplo n.º 4
0
        public override void OnSwiped(ViewHolder viewHolder, int direction)
        {
            int position = viewHolder.AdapterPosition;

            ListItems.DateList.RemoveAt(position);
            ListItems.TimeList.RemoveAt(position);
            ListItems.CommentList.RemoveAt(position);
            ListItems.PlanList.RemoveAt(position);

            string           dbPath = Path.Combine(Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim).ToString(), "App4no.db");
            SQLiteConnection db     = new SQLiteConnection(dbPath);

            mAdapter.NotifyItemRemoved(position);
            int SwipedId = ListItems.IdList[position];

            db.Query <Stock>("DELETE FROM Items WHERE _id=?", SwipedId);

            ListItems.Syokika();
            Getfromdb();
        }