Skip to content

Commit

Permalink
Annict用のUIを実装 silane#7
Browse files Browse the repository at this point in the history
  • Loading branch information
noriokun4649 committed Feb 16, 2021
1 parent c857eb9 commit e1b37ac
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions TVTComment/Views/SettingsWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<Window x:Class="TVTComment.Views.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://prismlibrary.com/"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:prism="http://prismlibrary.com/"
xmlns:local="clr-namespace:TVTComment.Views"
xmlns:converters="clr-namespace:TVTComment.Views.Converters"
xmlns:behaviors="clr-namespace:TVTComment.Views.Behaviors"
xmlns:settingswindowcontents="clr-namespace:TVTComment.Views.SettingsWindowContents"
mc:Ignorable="d"
prism:ViewModelLocator.AutoWireViewModel="True"
Title="SettingWindow" Height="550" Width="400" WindowStyle="ToolWindow">
Expand Down Expand Up @@ -114,7 +112,7 @@
<TextBlock Text="設定後は現在使用中のコメント元をいったん無効にして再度有効にする必要があります" TextWrapping="Wrap" Grid.Row="0"/>
<GroupBox Header="TwitterAPI設定" Grid.Row="1">
<StackPanel>
<Grid local:Grid.Shape="auto,*:auto,auto,auto,auto,auto">
<Grid local:Grid.Shape="auto,*:auto,auto">
<Label Content="API key" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="0"/>
<TextBox Text="{Binding TwitterApiKey.Value}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"/>
<Label Content="API secret" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="1"/>
Expand Down Expand Up @@ -148,7 +146,7 @@
<TextBox Text="{Binding TwitterPinCode.Value}" Grid.Column="1" Grid.Row="0" />
</Grid>
<Button Content="PINでログイン" Command="{Binding EnterTwitter}" Margin="0,10,0,0"/>
</StackPanel>
</StackPanel>
</GroupBox>
<TextBlock Text="{Binding TwitterStatus.Value}" HorizontalAlignment="Right" Grid.Row="4" Height="57"/>
<Button Content="ログアウト" Command="{Binding LogoutTwitterCommand}" Grid.Row="5" HorizontalAlignment="Stretch" Margin="5,5,5,0" VerticalAlignment="Top"/>
Expand All @@ -157,6 +155,37 @@
</GroupBox>
</Grid>
</TabItem>
<TabItem Header="Annict">
<Grid local:Grid.Shape="*:auto,auto,auto">
<TextBlock Text="設定後は現在使用中のコメント元をいったん無効にして再度有効にする必要があります" TextWrapping="Wrap" Grid.Row="0"/>
<TextBlock Text="AnnictはTwitter実況においてハッシュタグをアニメ毎に自動取得するのに利用します。アニメ毎に自動取得する機能を使わない場合認証は必要ありません。" TextWrapping="Wrap" Grid.Row="1"/>
<GroupBox Header="AnnictAPI設定" Grid.Row="2">
<Grid local:Grid.Shape="*:auto,auto,auto,*">
<TextBlock Text="Annictアカウントにログインするには以下の2つの方法のいずれかを利用する必要があります" TextWrapping="Wrap" Grid.Row="0"/>
<GroupBox Header="個人用アクセストークン認証" Grid.Row="1">
<Grid local:Grid.Shape="*:auto,auto,*">
<Grid local:Grid.Shape="auto,*:auto">
<Label Content="アクセストークン" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="0"/>
<TextBox Text="{Binding AnnictAccessToken.Value}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"/>
</Grid>
<Button Content="適用" Command="{Binding AnnictAccessTokenApplyCommand}" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Row="2"/>
</Grid>
</GroupBox>
<TextBlock Text="or" TextWrapping="Wrap" HorizontalAlignment="Center" Grid.Row="2"/>
<GroupBox Header="OAuth認証" Grid.Row="3">
<Grid local:Grid.Shape="*:auto,auto,*">
<Button Content="Annict OAuth認証画面を開く" Command="{Binding AnnictOAuthOpenCommand}" HorizontalAlignment="Stretch" Grid.Row="0"/>
<Grid local:Grid.Shape="auto,*:auto" Grid.Row="1">
<Label Content="認証コード" HorizontalAlignment="Right" Grid.Column="0" Grid.Row="0"/>
<TextBox Text="{Binding AnnictPin.Value}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0"/>
</Grid>
<Button Content="認証" Command="{Binding AnnictOAuthCertificationCommand}" HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Row="2"/>
</Grid>
</GroupBox>
</Grid>
</GroupBox>
</Grid>
</TabItem>
<TabItem Header="2ch">
<Grid local:Grid.Shape="*:auto,auto,auto,auto,*,auto">
<TextBlock TextWrapping="Wrap" Grid.Row="0">現在使用中のコメント元には変更は適用されません</TextBlock>
Expand Down

0 comments on commit e1b37ac

Please sign in to comment.