private async Task <bool> _RowAction(IGRRow _Row) { GRRow <BookDisplay> Row = (GRRow <BookDisplay>)_Row; BookInstruction Payload = ( BookInstruction )Row.Source.Payload; if (Payload != null) { // Save the book here Payload.SaveInfo(); // Reload the BookDisplay as Entry might changed from SaveInfo Row.Source = new BookDisplay(Payload.Entry); } SpiderBook Item = await SpiderBook.CreateSAsync(Row.Source.Entry.ZoneId, Row.Source.Entry.ZItemId, Payload?.BookSpiderDef); Item.PropertyChanged += Item_PropertyChanged; XParameter Metadata = Item.PSettings.Parameter("METADATA") ?? new XParameter("METADATA"); Metadata.SetValue(new XKey("payload", Row.Source.Entry.Meta[AppKeys.GLOBAL_SSID])); Item.PSettings.SetParameter(Metadata); if (!Item.ProcessSuccess && Item.CanProcess) { await ItemProcessor.ProcessLocal(Item); } Item.PropertyChanged -= Item_PropertyChanged; (( BookDisplayPageExt )Extension).OpenItem(_Row); return(true); }
private async void AddServer() { string SrvUri = ServiceUri.Text.Trim(); if (string.IsNullOrEmpty(SrvUri)) { return; } try { new Uri(SrvUri); } catch (Exception) { await Popups.ShowDialog(new MessageDialog( "Invalid Uri" )); return; } XParameter Param = new XParameter(SrvUri); Param.SetValue(new XKey("uri", 1)); ServerReg.SetParameter(Param); ServerReg.Save(); ServiceUri.Text = ""; RefreshServers(); }
public async void CreateTileUpdateForBookSpider(string BookId, string TileId) { if (!CanBackground) { await Popups.ShowDialog(UIAliases.CreateDialog( "Background Task Manager" , "Backgorund Task is disabled. Unable to create tile update")); return; } XParameter BookParam = new XParameter(BookId); BookParam.SetValue(new XKey("tileId", TileId)); BookParam.SetValue(new XKey("spider", true)); XReg.SetParameter(BookParam); XReg.Save(); }
public void ShowHelp() { if (MainStage.Instance.IsPhone || Settings.GetBool(Name)) { return; } Settings.SetValue(new XKey(Name, true)); XReg.SetParameter(Settings); XReg.Save(); PopupHelp(); }
private void RemoveServer(object sender, RoutedEventArgs e) { Button B = sender as Button; if (B == null) { return; } ServerChoice C = B.DataContext as ServerChoice; XParameter Param = new XParameter(C.Name); Param.SetValue(new XKey("disabled", true)); ServerReg.SetParameter(Param); ServerReg.Save(); RefreshServers(); }