This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO:后退栈
- Loading branch information
tobiichiamane
committed
Apr 17, 2019
1 parent
38f6865
commit 29e1411
Showing
6 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Page | ||
x:Class="PixivFSUWP.IllustDetailPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:PixivFSUWP" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
<ScrollViewer> | ||
<Grid Margin="0,75,0,0"> | ||
<TextBlock x:Name="txtTitle"/> | ||
</Grid> | ||
</ScrollViewer> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using FSharp.Data; | ||
using PixivFS; | ||
using PixivFSCS; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using System.Threading.Tasks; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板 | ||
|
||
namespace PixivFSUWP | ||
{ | ||
/// <summary> | ||
/// 可用于自身或导航至 Frame 内部的空白页。 | ||
/// </summary> | ||
public sealed partial class IllustDetailPage : Page | ||
{ | ||
int illustID; | ||
|
||
public IllustDetailPage() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
protected override void OnNavigatedTo(NavigationEventArgs e) | ||
{ | ||
((Frame.Parent as Grid)?.Parent as MainPage)?.SelectNavPlaceholder("详情"); | ||
illustID = (int)e.Parameter; | ||
base.OnNavigatedTo(e); | ||
_ = loadContent(); | ||
} | ||
|
||
private async Task loadContent() | ||
{ | ||
var res = await Task.Run(() => | ||
new PixivAppAPI(Data.OverAll.GlobalBaseAPI) | ||
.csfriendly_illust_detail(illustID.ToString())); | ||
txtTitle.Text = res.Item("illust").Item("title").AsString(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters