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(); }
private void ResetServer(object sender, RoutedEventArgs e) { ServerReg = new XRegistry("<Server />", FileLinks.ROOT_SETTING + "Server.xml", false); ServerReg.Save(); RefreshServers(); }
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 SetGranted(string Id) { RequestsSource.Any(x => { if (x.Id == Id) { x.Granted = true; return(true); } return(false); }); XParameter XParam = XGrant.Parameter(BindItem.Id); XParam.SetParameter(new XParameter(Id)); XGrant.SetParameter(XParam); XGrant.Save(); }
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(); }