示例#1
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("AppBar", "ContextMenu", "AppResources");

            // Major Controls
            FavBtn        = UIAliases.CreateAppBarBtn(Symbol.Favorite, "");
            FavBtn.Click += AddOrRemoveFav;

            TOCBtn        = UIAliases.CreateAppBarBtn(Symbol.OpenWith, stx.Text("TOC"));
            TOCBtn.Click += TOCBtn_Click;

            // Comment Button
            CommentBtn = UIAliases.CreateAppBarBtn(Symbol.Comment, stx.Text("Comments", "AppResources"));

            // Minor Controls
            AppBarButton ThemeBtn = UIAliases.CreateAppBarBtn(Symbol.Caption, stx.Text("CustomBackground", "ContextMenu"));

            ThemeBtn.Click += (s, e) => { FlyoutBase.ShowAttachedFlyout(ThemeBtn); };

            FlyoutBase.SetAttachedFlyout(ThemeBtn, ( MenuFlyout )Resources["ThemeFlyout"]);

            BrowserBtn        = UIAliases.CreateAppBarBtn(Symbol.Globe, stx.Text("OpenInBrowser"));
            BrowserBtn.Click += BrowserBtn_Click;

            MajorControls = new ICommandBarElement[] { FavBtn, TOCBtn };
            MinorControls = new ICommandBarElement[] { ThemeBtn, BrowserBtn };
        }
示例#2
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("NavigationTitles");

            if (StoreServicesFeedbackLauncher.IsSupported())
            {
                FeedbackBtn        = UIAliases.CreateAppBarBtn(SegoeMDL2.FeedbackApp, stx.Text("Feedback"));
                FeedbackBtn.Click += FeedbackBtn_Click;
                MinorControls      = new ICommandBarElement[] { FeedbackBtn };
            }

            NewsBtn        = UIAliases.CreateAppBarBtn(Symbol.Important, stx.Text("News"));
            NewsBtn.Click += NewsBtn_Click;

            NewsStory = new Storyboard();
            SimpleStory.DoubleAnimation(NewsStory, NewsBtn, "Opacity", 0, 1, 350);
            NewsStory.AutoReverse    = true;
            NewsStory.RepeatBehavior = RepeatBehavior.Forever;

            MajorControls = new ICommandBarElement[] { NewsBtn };

            GetAnnouncements();

            MessageBus.SendUI(typeof(GR.GSystem.ActionCenter), AppKeys.PM_CHECK_TILES);
        }
示例#3
0
        private void InitAppBar()
        {
            StringResources stx       = StringResources.Load("Settings", "Message", "ContextMenu");
            AppBarButton    LogoutBtn = UIAliases.CreateAppBarBtn(SegoeMDL2.ChevronLeft, stx.Text("Account_Logout"));

            LogoutBtn.Click += async(s, e) =>
            {
                bool Yes = false;
                await Popups.ShowDialog(UIAliases.CreateDialog(
                                            stx.Str("ConfirmLogout", "Message")
                                            , () => Yes = true
                                            , stx.Str("Yes", "Message"), stx.Str("No", "Message")
                                            ));

                if (Yes)
                {
                    X.Singleton <IMember>(XProto.SHMember).Logout();
                    ControlFrame.Instance.GoBack();
                    ControlFrame.Instance.BackStack.Remove(PageId.SH_USER_INFO);
                }
            };

            SecondaryIconButton ManageAuth = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.Manage, stx.Text("ManageAuths", "ContextMenu"));

            ManageAuth.Click += (s, e) => ControlFrame.Instance.SubNavigateTo(this, () => new ManageAuth());

            MajorControls    = new ICommandBarElement[] { LogoutBtn };
            Major2ndControls = new ICommandBarElement[] { ManageAuth };
        }
示例#4
0
        public async void OpenItem(object DataContext)
        {
            if (DataContext is GRRow <FTSResult> RsRow)
            {
                Chapter Ch = Shared.BooksDb.Chapters.Find(RsRow.Source.ChapterId);
                if (Ch == null)
                {
                    StringResources stx = StringResources.Load("Message");
                    await Popups.ShowDialog(UIAliases.CreateDialog(string.Format(stx.Str("FTSNeedsRebuild"))));

                    return;
                }

                Ch.Book = Shared.BooksDb.QueryBook(x => x.Id == Ch.BookId).FirstOrDefault();

                // Chapter is hard-linked to Volume. So we can load it confidently
                await Shared.BooksDb.LoadCollectionAsync(Ch.Book, x => x.Volumes, x => x.Index);

                foreach (Volume V in Ch.Book.Volumes)
                {
                    await Shared.BooksDb.LoadCollectionAsync(V, x => x.Chapters, x => x.Index);
                }

                BookItem BkItem = ItemProcessor.GetBookItem(Ch.Book);
                PageProcessor.NavigateToReader(BkItem, Ch);
            }
        }
示例#5
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("AppBar");

            List <ICommandBarElement> Btns = new List <ICommandBarElement>();

            if (GRConfig.System.EnableOneDrive)
            {
                AppBarButtonEx OneDriveBtn = UIAliases.CreateAppBarBtnEx(SegoeMDL2.Cloud, stx.Text("Sync"));

                ButtonOperation Op = new ButtonOperation(OneDriveBtn);
                Op.SetOp(Manager.OneDriveSync);
                Op.SetComplete(ThemePresets);

                Btns.Add(OneDriveBtn);
            }

            AppBarButton SaveBtn = UIAliases.CreateAppBarBtn(Symbol.Save, stx.Text("Save"));

            SaveBtn.Click += SaveBtn_Click;

            Btns.Add(SaveBtn);

            MajorControls = Btns.ToArray();
        }
示例#6
0
        private async void CloseInputBox()
        {
            if (!(string.IsNullOrEmpty(TweetInput.Text) || TweetInput.Text == (" " + Keywords.Text + " #wenku10")))
            {
                bool Discard = false;

                StringResources stx = StringResources.Load("Message");
                await Popups.ShowDialog(UIAliases.CreateDialog(
                                            stx.Str("ConfirmDiscard")
                                            , () => Discard = true
                                            , stx.Str("Yes"), stx.Str("No")
                                            ));

                if (!Discard)
                {
                    return;
                }
            }

            InReplyTo        = null;
            ReplyToName.Text = "";

            TransitionDisplay.SetState(TweetBox, TransitionState.Inactive);

            MajorControls = CommentControls;
            ControlChanged?.Invoke(this);
        }
示例#7
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("AppBar");

            AddWidgetBtn        = UIAliases.CreateAppBarBtn(Symbol.Add, stx.Text("AddWidget"));
            AddWidgetBtn.Click += AddWidgetBtn_Click;

            MajorControls = MajorControls.Concat(new ICommandBarElement[] { AddWidgetBtn }).ToArray();
        }
示例#8
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("AppBar");

            Rebuild        = UIAliases.CreateAppBarBtn(SegoeMDL2.ResetDrive, stx.Text("RebuildIndex"));
            Rebuild.Click += Rebuild_Click;

            MajorControls = new ICommandBarElement[] { Rebuild };
        }
示例#9
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("ContextMenu");

            PlaceBtn        = UIAliases.CreateAppBarBtn(Symbol.Add, stx.Text("PlaceRequest"));
            PlaceBtn.Click += (sender, e) => PlaceRequest();

            MajorControls = new AppBarButton[] { PlaceBtn };
        }
示例#10
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load();

            UploadBtn        = UIAliases.CreateAppBarBtnEx(Symbol.Send, stx.Text("SubmitScript"));
            UploadBtn.Click += Upload;

            MajorControls = new ICommandBarElement[] { UploadBtn };
        }
示例#11
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("AppResources", "ContextMenu");

            ActivyBtn = new AppBarButtonEx()
            {
                Icon       = new SymbolIcon(Symbol.Message),
                Label      = stx.Text("Messages"),
                Foreground = new SolidColorBrush(LayoutSettings.RelativeMajorBackgroundColor)
            };

            ActivyBtn.Click += ToggleActivities;

            AppBarButton UploadBtn = UIAliases.CreateAppBarBtn(SegoeMDL2.Upload, stx.Text("SubmitScript"));

            UploadBtn.Click += (s, e) => ControlFrame.Instance.SubNavigateTo(Page, () => new ScriptUpload(UploadExit));

            SecondaryIconButton MAuthBtn = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.Manage, stx.Text("ManageAuths", "ContextMenu"));

            MAuthBtn.Click += ManageAuths;

            MajorControls = new ICommandBarElement[] { ActivyBtn, UploadBtn };

            LoginBtn        = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.ChevronRight, stx.Text("Login"));
            LoginBtn.Click += (s, e) => SHLoginOrInfo();

#if DEBUG || TESTING
            StringResources     sts          = StringResources.Load("Settings");
            SecondaryIconButton ChangeServer = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.DirectAccess, sts.Text("Advanced_Server"));
            ChangeServer.Click += async(s, e) =>
            {
                ValueHelpInput VH = new ValueHelpInput(
                    Shared.ShRequest.Server.ToString()
                    , sts.Text("Advanced_Server"), "Address"
                    );

                await Popups.ShowDialog(VH);

                if (VH.Canceled)
                {
                    return;
                }

                try
                {
                    Shared.ShRequest.Server     = new Uri(VH.Value);
                    ONSSystem.Config.ServiceUri = VH.Value;
                }
                catch (Exception) { }
            };

            Major2ndControls = new ICommandBarElement[] { LoginBtn, MAuthBtn, ChangeServer };
#else
            Major2ndControls = new ICommandBarElement[] { LoginBtn, MAuthBtn };
#endif
        }
示例#12
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("AppBar");

            AppBarButton ExportBtn = UIAliases.CreateAppBarBtn(SegoeMDL2.Export, stx.Text("Export"));

            ExportBtn.Click += ExportBtn_Click;

            MajorControls = new ICommandBarElement[] { ExportBtn };
        }
示例#13
0
        private void InitAppBar(StringResources stx)
        {
            ExportAuthBtn        = UIAliases.CreateAppBarBtn(Symbol.SaveLocal, stx.Text("Export", "AppBar"));
            ExportAuthBtn.Click += ExportAuths;

            ImportKeyBtn        = UIAliases.CreateAppBarBtn(Symbol.Add, stx.Text("Add", "AppBar"));
            ImportKeyBtn.Click += ImportKey;

            ImportTokBtn        = UIAliases.CreateAppBarBtn(Symbol.Add, stx.Text("Add", "AppBar"));
            ImportTokBtn.Click += ImportToken;
        }
示例#14
0
        private void InitAppBar()
        {
            StringResources stx      = StringResources.Load("AppBar");
            AppBarButton    OpenFile = UIAliases.CreateAppBarBtn(SegoeMDL2.OpenFile, stx.Text("OpenZone"));

            OpenFile.Click += OpenFile_Click;

            SecondaryIconButton SpiderEditor = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.Edit, stx.Text("SpiderEdit", "ContextMenu"));

            SpiderEditor.Click += (s, e) => ControlFrame.Instance.NavigateTo(PageId.PROC_PANEL, () => new ProcPanelWrapper(null));

            MajorControls    = new ICommandBarElement[] { OpenFile };
            Major2ndControls = new ICommandBarElement[] { SpiderEditor };
        }
示例#15
0
 private async void RemovePin(object sender, RoutedEventArgs e)
 {
     if (AppSettings.DeviceId == SelectedRecord.DevId)
     {
         PM.RemovePin(SelectedRecord.Id);
         UpdatePinData();
     }
     else
     {
         StringResources stx = StringResources.Load("Message");
         await Popups.ShowDialog(UIAliases.CreateDialog(
                                     stx.Str("PinMgr_NoRemoteAction")
                                     ));
     }
 }
示例#16
0
        private async void SetAccelerScroll()
        {
            var ACSConf = GRConfig.ContentReader.AccelerScroll;

            ACScroll = new AccelerScroll
            {
                ProgramBrake      = true,
                TrackAutoAnchor   = ACSConf.TrackAutoAnchor,
                Brake             = ACSConf.Brake,
                BrakeOffset       = ACSConf.BrakeOffset,
                BrakingForce      = ACSConf.BrakingForce,
                AccelerMultiplier = ACSConf.AccelerMultiplier,
                TerminalVelocity  = ACSConf.TerminalVelocity
            };

            ACScroll.UpdateOrientation(App.ViewControl.DispOrientation);

            StringResources stx = StringResources.Load("Settings", "Message");

            ToggleAcceler        = UIAliases.CreateMenuFlyoutItem(stx.Text("Enabled"), new SymbolIcon(Symbol.Accept));
            ToggleAcceler.Click += (s, e) => ToggleAccelerScroll();

            CallibrateAcceler = new MenuFlyoutItem()
            {
                Text = stx.Text("Callibrate")
            };
            CallibrateAcceler.Click += CallibrateAcceler_Click;

            AccelerMenu.Items.Add(ToggleAcceler);
            AccelerMenu.Items.Add(CallibrateAcceler);

            if (ACScroll.Available && !ACSConf.Asked)
            {
                bool EnableAccel = false;

                await Popups.ShowDialog(UIAliases.CreateDialog(
                                            stx.Str("EnableAccelerScroll", "Message")
                                            , () => EnableAccel = true
                                            , stx.Str("Yes", "Message"), stx.Str("No", "Message")
                                            ));

                ACSConf.Asked  = true;
                ACSConf.Enable = EnableAccel;
            }

            ToggleAccelerScroll(ACSConf.Enable);
            UpdateAccelerDelta();
        }
示例#17
0
        private async Task <AsyncTryOut <Chapter> > TryFoundIllustration()
        {
            Volume       V      = ReaderPage.CurrentChapter.Volume;
            ChapterImage CImage = Shared.BooksDb.ChapterImages.FirstOrDefault(x => V.Chapters.Contains(x.Chapter));

            if (CImage != null)
            {
                return(new AsyncTryOut <Chapter>(true, CImage.Chapter));
            }

            bool NeedDownload = Shared.BooksDb.Chapters.Any(x => x.Volume == V && x.Content == null);

            if (!NeedDownload)
            {
                Message.Text = "No Image for this volume";
                return(new AsyncTryOut <Chapter>());
            }

            NeedDownload = false;

            StringResources stm = StringResources.Load("Message");

            await Popups.ShowDialog(UIAliases.CreateDialog(
                                        "Not enough information to see if there were any illustrations within this volume. Download this volume?"
                                        , () => NeedDownload = true
                                        , stm.Str("Yes"), stm.Str("No")
                                        ));

            if (!NeedDownload)
            {
                Message.Text = "Not enough information for finding illustrations. Consider downloading a specific chapter";
                return(new AsyncTryOut <Chapter>());
            }

            ChapterList.ItemsSource = V.Chapters.Select(x => new ChapterVModel(x));
            await AutoCache.DownloadVolumeAsync(ReaderPage.CurrentBook, V);

            Chapter ImageChapter = V.Chapters.FirstOrDefault(x => x.Image != null);

            if (ImageChapter == null)
            {
                Worker.UIInvoke(() => Message.Text = "No Illustration available");
                return(new AsyncTryOut <Chapter>());
            }

            return(new AsyncTryOut <Chapter>(true, ImageChapter));
        }
示例#18
0
        private async void ResetBtn_Click(object sender, RoutedEventArgs e)
        {
            bool            Reset = false;
            StringResources stx   = StringResources.Load("Message");

            await Popups.ShowDialog(UIAliases.CreateDialog(
                                        stx.Str("ConfirmResetConvTable"), stx.Str("ConfirmReset")
                                        , () => Reset = true
                                        , stx.Str("Yes"), stx.Str("No")
                                        ));

            if (Reset)
            {
                ToggleSaveBtn(false);
                ViewSource.ConvDataSource.ResetSource();
            }
        }
示例#19
0
        private async void RemoteAddress_LostFocus(object sender, RoutedEventArgs e)
        {
            string IP = RemoteAddress.Text.Trim();

            IPAddress NotUsed;

            if (!IPAddress.TryParse(IP, out NotUsed))
            {
                await Popups.ShowDialog(UIAliases.CreateDialog("This IP Address is invalid"));

                RemoteAddress.Text = Properties.RSYSTEM_LOG_ADDRESS;
            }
            else
            {
                Properties.RSYSTEM_LOG_ADDRESS = IP;
            }
        }
示例#20
0
        private void InitAppBar()
        {
            StringResources stx = StringResources.Load("AppBar");

            AppBarButton OpenFolder = UIAliases.CreateAppBarBtn(SegoeMDL2.OpenLocal, stx.Text("OpenFolder"));

            OpenFolder.Click += (s, e) => ViewSource.BSData.OpenDirectory();

            AppBarButton OpenUrl = UIAliases.CreateAppBarBtn(SegoeMDL2.Link, stx.Text("OpenUrl"));

            OpenUrl.Click += OpenUrl_Click;

            ProcessBtn        = UIAliases.CreateAppBarBtn(Symbol.Play, stx.Text("ProcessAll"));
            ProcessBtn.Click += ProcessAll;

            MajorControls = new ICommandBarElement[] { OpenFolder, OpenUrl, ProcessBtn };
        }
示例#21
0
        private void CreateSystemCommands()
        {
            List <ICommandBarElement> Btns = new List <ICommandBarElement>();

            SecondaryIconButton SettingsBtn = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.Settings, stx.Text("Settings", "AppBar"));

            SettingsBtn.Click += CreateCmdHandler(PageId.MAIN_SETTINGS, () => new global::wenku10.Pages.Settings.MainSettings());

            SecondaryIconButton BackupBtn = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.UpdateRestore, stx.Text("BackupAndRestore", "AppBar"));

            BackupBtn.Click += BackupBtn_Click;

            SecondaryIconButton ConsoleBtn = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.CommandPrompt, stx.Text("ConsoleMode", "AppBar"));

            ConsoleBtn.Click += ConsoleBtn_Click;

            AboutBtn = new SecretSwipeButton(SegoeMDL2.Info)
            {
                Label  = stx.Text("About", "AppBar"),
                Label2 = "(゚∀゚)",
                Glyph2 = SegoeMDL2.Accept
            };

            AboutBtn.PendingClick  += CreateCmdHandler(PageId.ABOUT, () => new About());
            AboutBtn.CanSwipe       = true;
            AboutBtn.OnIndexUpdate += (s, i) => Logger.Log(AboutBtn.Label2, i.ToString(), LogType.DEBUG);

            Btns.Add(ConsoleBtn);
            Btns.Add(BackupBtn);
            Btns.Add(new AppBarSeparator());
            Btns.Add(SettingsBtn);
            Btns.Add(AboutBtn);

            if (MainStage.Instance.IsPhone)
            {
                SecondaryIconButton ExitBtn = UIAliases.CreateSecondaryIconBtn(SegoeMDL2.ChromeClose, stx.Text("Exit", "AppBar"));
                ExitBtn.Click += (s, e) =>
                {
                    Windows.ApplicationModel.Core.CoreApplication.Exit();
                };
                Btns.Add(ExitBtn);
            }

            SystemCommands = Btns.ToArray();
        }
示例#22
0
        private async void CtrlSubmit()
        {
            if (TweetInput.FocusState == FocusState.Keyboard)
            {
                bool            Continue = false;
                StringResources stx      = StringResources.Load("Message");
                await Popups.ShowDialog(UIAliases.CreateDialog(
                                            stx.Str("ConfirmSubmit")
                                            , () => Continue = true
                                            , stx.Str("Yes"), stx.Str("No")
                                            ));

                if (Continue)
                {
                    Submit();
                }
            }
        }
示例#23
0
        private async void ConsoleBtn_Click(object sender, RoutedEventArgs e)
        {
            StringResources stx = StringResources.Load("Message");

            bool ConfirmRestart = false;

            await Popups.ShowDialog(UIAliases.CreateDialog(
                                        stx.Str("RestartToConsole")
                                        , () => ConfirmRestart = true
                                        , stx.Str("Yes"), stx.Str("No"))
                                    );

            if (ConfirmRestart)
            {
                Config.Properties.CONSOLE_MODE = true;
                await Utils.RestartOrExit();
            }
        }
示例#24
0
        private async void OpenReader(object DataContext)
        {
            if (TryGetBookItem(DataContext, out BookItem BkItem))
            {
                AsyncTryOut <Chapter> TryAutoAnchor = await PageExtOperations.Run(PageProcessor.TryGetAutoAnchor(BkItem));

                if (TryAutoAnchor)
                {
                    PageProcessor.NavigateToReader(BkItem, TryAutoAnchor.Out);
                }
                else
                {
                    StringResources stx = StringResources.Load("Message");
                    await Popups.ShowDialog(UIAliases.CreateDialog(stx.Str("AnchorNotSetYet")));

                    OpenTOC(BkItem);
                }
            }
        }
示例#25
0
        protected void InitAppBar()
        {
            StringResources           stx  = StringResources.Load("AppBar");
            List <ICommandBarElement> Btns = new List <ICommandBarElement>();

            if (GRConfig.System.EnableOneDrive)
            {
                AppBarButtonEx  OneDriveBtn = UIAliases.CreateAppBarBtnEx(SegoeMDL2.Cloud, stx.Text("SyncBookmarks"));
                ButtonOperation SyncOp      = new ButtonOperation(OneDriveBtn);

                SyncOp.SetOp(OneDriveRsync);
                Btns.Add(OneDriveBtn);
            }

            JumpMarkBtn        = UIAliases.CreateAppBarBtn(Symbol.Tag, stx.Text("JumpToAnchor"));
            JumpMarkBtn.Click += JumpToBookmark;

            CRDirToggle ReaderDirBtn = new CRDirToggle(ThisBook)
            {
                Label      = stx.Str("ContentDirection"),
                Foreground = UIAliases.ContextColor,
                OnToggle   = ToggleDir
            };

            AppBarButtonEx ReloadBtn = UIAliases.CreateAppBarBtnEx(Symbol.Refresh, stx.Text("Reload"));

            ReloadBtn.Click += (sender, e) =>
            {
                ReloadBtn.IsLoading = true;
                new VolumeLoader(b =>
                {
                    SetTOC(b);
                    ReloadBtn.IsLoading = false;
                }).Load(ThisBook, false);
            };

            Btns.Add(ReaderDirBtn);
            Btns.Add(JumpMarkBtn);
            Btns.Add(ReloadBtn);

            MajorControls = Btns.ToArray();
        }
示例#26
0
        private async void OpenTwitter(object sender, RoutedEventArgs e)
        {
            CommentBtn.IsEnabled = false;

            if (!GRConfig.System.TwitterConfirmed)
            {
                GRConfig.System.TwitterConfirmed = true;
                StringResources stx = StringResources.Load("Message");
                await Popups.ShowDialog(UIAliases.CreateDialog(stx.Str("ConfirmTwitter"), "Twitter"));
            }

            if (!await GR.Model.Twitter.AuthData.Authenticate())
            {
                return;
            }

            ControlFrame.Instance.SubNavigateTo(this, () => new TwitterCommentView(ThisBook));

            CommentBtn.IsEnabled = true;
        }
示例#27
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();
        }
示例#28
0
        protected async void DownloadVolume(object sender, RoutedEventArgs e)
        {
            StringResources stx = StringResources.Load("Message", "ContextMenu");

            bool Confirmed = false;

            await Popups.ShowDialog(
                UIAliases.CreateDialog(
                    RightClickedVolume.Title, stx.Text("AutoUpdate", "ContextMenu")
                    , () => Confirmed = true
                    , stx.Str("Yes"), stx.Str("No")
                    ));

            if (!Confirmed)
            {
                return;
            }

            AutoCache.DownloadVolume(ThisBook, RightClickedVolume);
        }
示例#29
0
        public static async Task RegLiveSpider(SpiderBook SBook, BookInstruction Book, string TileId)
        {
            if (!SBook.HasChakra)
            {
                StringResources stx = StringResources.Load("Message");

                bool Confirmed = false;

                await Popups.ShowDialog(UIAliases.CreateDialog(
                                            stx.Str("TileUpdateSupport"), stx.Str("ShellTile")
                                            , () => Confirmed = true
                                            , stx.Str("Yes"), stx.Str("No")
                                            ));

                if (Confirmed)
                {
                    BackgroundProcessor.Instance.CreateTileUpdateForBookSpider(Book.GID, TileId);
                }
            }
        }
示例#30
0
        private async void JumpButton_Click(object sender, RoutedEventArgs e)
        {
            Button Btn = ( Button )sender;

            Btn.IsEnabled = false;

            // AnchorSync is already handled on this page
            AsyncTryOut <Chapter> TryAutoAnchor = await PageProcessor.TryGetAutoAnchor(ThisBook, false);

            if (TryAutoAnchor)
            {
                PageProcessor.NavigateToReader(ThisBook, TryAutoAnchor.Out);
            }
            else
            {
                StringResources stx = StringResources.Load("Message");
                await Popups.ShowDialog(UIAliases.CreateDialog(stx.Str("AnchorNotSetYet")));
            }

            Btn.IsEnabled = true;
        }