Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        private void ResetServer(object sender, RoutedEventArgs e)
        {
            ServerReg = new XRegistry("<Server />", FileLinks.ROOT_SETTING + "Server.xml", false);
            ServerReg.Save();

            RefreshServers();
        }
Ejemplo n.º 3
0
        public void ShowHelp()
        {
            if (MainStage.Instance.IsPhone || Settings.GetBool(Name))
            {
                return;
            }
            Settings.SetValue(new XKey(Name, true));
            XReg.SetParameter(Settings);
            XReg.Save();

            PopupHelp();
        }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }