private async void InitPhaseConverter() { List <CustomConv> Phases = await Shared.BooksDb.LoadCollectionAsync(CurrentBook.Entry, x => x.ConvPhases, x => x.Phase); Phases.ForEach(x => Paragraph.Translator.AddTable(x.Table)); if (IsHorz) { TRTable Table = new TRTable(); Paragraph.Translator.AddTable(await Table.Get("vertical")); } }
public async void ResetSource() { IsLoading = true; TRTable TableLoader = new TRTable(); byte[] Data = await TableLoader.Download(TableName); if (Data.Any()) { await Task.Run(() => Shared.Storage.WriteBytes(Local, Data)); ConvTable.Items = null; SourceData = null; Reload(); } IsLoading = false; }
public async Task Up() { try { Mesg(stx.Text("MigrateDatabase")); using (DbContext Context = new BooksContext()) { Context.Database.Migrate(); } TRTable Table = new TRTable(); Mesg(stx.Text("Active", "AdvDM") + " ntw_ws2t"); if (!(await Table.Get("ntw_ws2t")).Any()) { Mesg(stx.Text("Failure_NTW")); } Mesg(stx.Text("Active", "AdvDM") + " ntw_ps2t"); if (!(await Table.Get("ntw_ps2t")).Any()) { Mesg(stx.Text("Failure_NTW")); } Mesg(stx.Text("Active", "AdvDM") + " vertical"); if (!(await Table.Get("vertical")).Any()) { Mesg(stx.Text("Failure_Vertical")); } Mesg(stx.Text("Active", "AdvDM") + " synpatch"); if (!(await Table.Get("synpatch")).Any()) { Mesg(stx.Text("Failure_Synpatch")); } Mesg(stx.Text("MigrationComplete") + " - M0002"); } catch (Exception ex) { Mesg(ex.Message); } }