示例#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();
        }
示例#2
0
        public HSRequestView(HubScriptItem HSI, CryptAES Crypt, SHTarget ReqTarget, string AccessToken)
            : this()
        {
            BindItem         = HSI;
            this.Crypt       = Crypt;
            this.ReqTarget   = ReqTarget;
            this.AccessToken = AccessToken;

            XGrant.SetParameter(BindItem.Id, CustomAnchor.TimeKey);
            ShowRequest(ReqTarget);
        }
示例#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();
        }
示例#4
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();
        }