internal bool StartRefreshCurrentTask(SyncList sl, int shownList) { return(StartTask(sl, SyncTask.UPDATE, null, shownList)); }
internal bool StartRefreshNewTask(SyncList sl, int shownList) { return(StartTask(sl, SyncTask.NEW, null, shownList)); }
internal bool StartRefreshOneTask(SyncList sl, SyncItem si, int shownList) { return(StartTask(sl, SyncTask.ONE, si, shownList)); }
//methods internal bool StartRefreshAllTask(SyncList sl, int shownList) { return(StartTask(sl, SyncTask.ALL, null, shownList)); }
public void RefreshOne(SyncList l, SyncItem si) { //TODO implement prog++; }
internal static ListData LoadTestLists() { ListData data = new ListData(); MList list1 = new MList("group a"); list1.AddToTemplate("notes", FieldType.BASIC, null); list1.AddToTemplate("date", FieldType.DATE, null); list1.AddToTemplate("dec", FieldType.DECIMAL, new DecimalMetadata(2, 3.14f, 10.26f)); list1.AddToTemplate("num", FieldType.NUMBER, new NumberMetadata(0, 10)); MItem li1a = list1.Add(); li1a["notes"].Value = "There are many things here"; li1a["date"].Value = new XDate(DateTime.Today); li1a["dec"].Value = 50f; li1a["num"].Value = 6; MItem li2a = list1.Add(); li2a["notes"].Value = "more notes"; li2a["date"].Value = new XDate(DateTime.Today); li2a["dec"].Value = 40f; li2a["num"].Value = 5; data.AddList(list1); MList list2 = new MList("group b"); list2.AddToTemplate("notes", FieldType.BASIC, null); list2.AddToTemplate("date", FieldType.DATE, null); list2.AddToTemplate("img", FieldType.IMAGE, new ImageMetadata(50.0)); MItem li1b = list2.Add(); li1b["notes"].Value = "More notes"; li1b["date"].Value = new XDate(DateTime.Today); li1b["img"].Value = new XImage("http://images2.fanpop.com/images/photos/8300000/Rin-Kagamine-Vocaloid-Wallpaper-vocaloids-8316875-1024-768.jpg", true); MItem li2b = list2.Add(); li2b["notes"].Value = "More notes"; li2b["date"].Value = new XDate(DateTime.Today); li2b["img"].Value = new XImage(@"F:\Documents\Visual Studio 2015\Projects\ListApp\a.jpg", false); data.AddList(list2); SyncList list4 = new SyncList("AnimeSchema (Sync)", SyncList.SchemaType.ANIME_LIST, new string[] { "progressivespoon" }); List <SchemaOption> opts = list4.Schema.GenerateOptions(); foreach (SchemaOption so in opts) { list4.AddToTemplate(so); } list4.AddToTemplate("random tag", FieldType.ENUM, new EnumMetadata("one", "two", "three")); data.AddList(list4); //PrintLists(); /* TEST FOR LOTS OF COLUMNS * list1.AddToTemplate("status", FieldType.ENUM, new EnumMetadata("completed", "started", "on hold")); * list1.AddToTemplate("a", FieldType.BASIC, null); * list1.AddToTemplate("b", FieldType.BASIC, null); * list1.AddToTemplate("f", FieldType.BASIC, null); * list1.AddToTemplate("q", FieldType.IMAGE, new ImageMetadata(10.0)); * list1.AddToTemplate("z", FieldType.DATE, null); * list1.AddToTemplate("adfsd", FieldType.DATE, null); * list1.AddToTemplate("ccccc", FieldType.DATE, null); * list1.AddToTemplate("a333", FieldType.DATE, null); * list1.AddToTemplate("a2334", FieldType.DATE, null); * list1.AddToTemplate("a3aaaa4", FieldType.DATE, null); * list1.AddToTemplate("a32aaaaaaaaa4", FieldType.DATE, null); * list1.AddToTemplate("a445fd", FieldType.DATE, null); * list1.AddToTemplate("zxd", FieldType.DATE, null); * list1.AddToTemplate("a32ddd", FieldType.DATE, null); * list1.AddToTemplate("hytrd", FieldType.DATE, null); * list1.AddToTemplate("a44ree", FieldType.DATE, null); * list1.AddToTemplate("aaaaaaaa", FieldType.DATE, null); * list1.SetMetadata("status", new EnumMetadata("a", "b", "c", "d")); * li1a["status"].Value = 1; */ //list2.ReorderTemplate(2, 0); //list2.ResolveFieldFields(); //li2a.SetFieldData("status", 1); return(data); }