Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 152b536

Browse files
committed
ツイキャスで使用していない設定項目を削除した
1 parent 4ef2fda commit 152b536

File tree

4 files changed

+7
-61
lines changed

4 files changed

+7
-61
lines changed

‎TwicasSitePlugin/Message/MessageMetadata.cs‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ public Color BackColor
2424
{
2525
return _options.FirstCommentBackColor;
2626
}
27-
else if (_message is ITwicasKiitos)
28-
{
29-
return _siteOptions.KiitosBackColor;
30-
}
3127
else if (_message is ITwicasItem)
3228
{
3329
return _siteOptions.ItemBackColor;
@@ -52,10 +48,6 @@ public Color ForeColor
5248
{
5349
return _options.FirstCommentForeColor;
5450
}
55-
else if (_message is ITwicasKiitos)
56-
{
57-
return _siteOptions.KiitosForeColor;
58-
}
5951
else if (_message is ITwicasItem)
6052
{
6153
return _siteOptions.ItemForeColor;
@@ -197,18 +189,6 @@ private void SiteOptions_PropertyChanged(object sender, System.ComponentModel.Pr
197189
RaisePropertyChanged(nameof(ForeColor));
198190
}
199191
break;
200-
case nameof(_siteOptions.KiitosBackColor):
201-
if (_message is ITwicasKiitos)
202-
{
203-
RaisePropertyChanged(nameof(BackColor));
204-
}
205-
break;
206-
case nameof(_siteOptions.KiitosForeColor):
207-
if (_message is ITwicasKiitos)
208-
{
209-
RaisePropertyChanged(nameof(ForeColor));
210-
}
211-
break;
212192
case nameof(_siteOptions.IsShowItem):
213193
if (_message is ITwicasItem)
214194
{

‎TwicasSitePlugin/TwicasOptionsPanel.xaml‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@
88
mc:Ignorable="d"
99
d:DesignHeight="450" d:DesignWidth="800">
1010
<Grid>
11-
<Label Content="コメント取得間隔(秒)" HorizontalAlignment="Left" Margin="42,79,0,0" VerticalAlignment="Top"/>
12-
<TextBox HorizontalAlignment="Left" Height="23" Margin="190,82,0,0" TextWrapping="Wrap" Text="{Binding CommentRetrieveIntervalSec}" VerticalAlignment="Top" Width="120" />
13-
<CheckBox Content="@のあとの文字列を自動的にコテハンとして登録する" IsChecked="{Binding IsAutoSetNickname}" HorizontalAlignment="Left" Margin="46,125,0,0" VerticalAlignment="Top"/>
14-
<Label Content="アイテム背景色" HorizontalAlignment="Left" Margin="45,192,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.457,0.731"/>
15-
<xctk:ColorPicker SelectedColor="{Binding ItemBackColor}" Margin="145,192,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" RenderTransformOrigin="3.467,1.727" />
16-
<Label Content="アイテム文字色" HorizontalAlignment="Left" Margin="45,223,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.109,-0.577"/>
17-
<xctk:ColorPicker SelectedColor="{Binding ItemForeColor}" Margin="145,223,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" RenderTransformOrigin="0.4,2.591" />
18-
<Label Content="キートス背景色" HorizontalAlignment="Left" Margin="45,254,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.457,0.731"/>
19-
<xctk:ColorPicker SelectedColor="{Binding KiitosBackColor}" Margin="145,258,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" RenderTransformOrigin="3.467,1.727" />
20-
<Label Content="キートス文字色" HorizontalAlignment="Left" Margin="45,285,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.109,-0.577"/>
21-
<xctk:ColorPicker SelectedColor="{Binding KiitosForeColor}" Margin="145,289,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" RenderTransformOrigin="0.4,2.591" />
22-
<CheckBox Content="アイテムを表示する" IsChecked="{Binding IsShowItem}" HorizontalAlignment="Left" Margin="46,155,0,0" VerticalAlignment="Top"/>
23-
24-
11+
<CheckBox Content="@のあとの文字列を自動的にコテハンとして登録する" IsChecked="{Binding IsAutoSetNickname}" HorizontalAlignment="Left" Margin="45,50,0,0" VerticalAlignment="Top"/>
12+
<Label Content="アイテム背景色" HorizontalAlignment="Left" Margin="45,103,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.457,0.731"/>
13+
<xctk:ColorPicker SelectedColor="{Binding ItemBackColor}" Margin="145,103,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" RenderTransformOrigin="3.467,1.727" />
14+
<Label Content="アイテム文字色" HorizontalAlignment="Left" Margin="45,134,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.109,-0.577"/>
15+
<xctk:ColorPicker SelectedColor="{Binding ItemForeColor}" Margin="145,134,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" RenderTransformOrigin="0.4,2.591" />
16+
<CheckBox Content="アイテムを表示する" IsChecked="{Binding IsShowItem}" HorizontalAlignment="Left" Margin="45,70,0,0" VerticalAlignment="Top"/>
2517
</Grid>
2618
</UserControl>

‎TwicasSitePlugin/TwicasSiteOptions.cs‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,15 @@
1111

1212
namespace TwicasSitePlugin
1313
{
14-
interface ITwicasSiteOptions:INotifyPropertyChanged
14+
interface ITwicasSiteOptions:INotifyPropertyChanged
1515
{
16-
int CommentRetrieveIntervalSec { get; set; }
17-
Color KiitosBackColor { get; set; }
18-
Color KiitosForeColor { get; set; }
1916
bool IsAutoSetNickname { get; set; }
2017
Color ItemBackColor { get; set; }
2118
Color ItemForeColor { get; set; }
2219
bool IsShowItem { get; set; }
2320
}
2421
internal class TwicasSiteOptions : DynamicOptionsBase, ITwicasSiteOptions
2522
{
26-
//コメント取得インターバル
27-
public int CommentRetrieveIntervalSec { get => GetValue(); set => SetValue(value); }
28-
//キートス
29-
public Color KiitosBackColor { get => GetValue(); set => SetValue(value); }
30-
public Color KiitosForeColor { get => GetValue(); set => SetValue(value); }
3123

3224
public Color ItemBackColor { get => GetValue(); set => SetValue(value); }
3325
public Color ItemForeColor { get => GetValue(); set => SetValue(value); }
@@ -36,9 +28,6 @@ internal class TwicasSiteOptions : DynamicOptionsBase, ITwicasSiteOptions
3628
public bool IsShowItem { get => GetValue(); set => SetValue(value); }
3729
protected override void Init()
3830
{
39-
Dict.Add(nameof(CommentRetrieveIntervalSec), new Item { DefaultValue = 1, Predicate = f => f > 0, Serializer = f => f.ToString(), Deserializer = s => int.Parse(s) });
40-
Dict.Add(nameof(KiitosBackColor), new Item { DefaultValue = ColorFromArgb("#FFFF0000"), Predicate = c => true, Serializer = c => ColorToArgb(c), Deserializer = s => ColorFromArgb(s) });
41-
Dict.Add(nameof(KiitosForeColor), new Item { DefaultValue = ColorFromArgb("#FFFFFFFF"), Predicate = c => true, Serializer = c => ColorToArgb(c), Deserializer = s => ColorFromArgb(s) });
4231
Dict.Add(nameof(ItemBackColor), new Item { DefaultValue = ColorFromArgb("#FFFF0000"), Predicate = c => true, Serializer = c => ColorToArgb(c), Deserializer = s => ColorFromArgb(s) });
4332
Dict.Add(nameof(ItemForeColor), new Item { DefaultValue = ColorFromArgb("#FFFFFFFF"), Predicate = c => true, Serializer = c => ColorToArgb(c), Deserializer = s => ColorFromArgb(s) });
4433
Dict.Add(nameof(IsAutoSetNickname), new Item { DefaultValue = false, Predicate = b => true, Serializer = b => b.ToString(), Deserializer = s => bool.Parse(s) });

‎TwicasSitePlugin/TwicasSiteOptionsViewModel.cs‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,6 @@ namespace TwicasSitePlugin
66
{
77
class TwicasSiteOptionsViewModel : INotifyPropertyChanged
88
{
9-
public int CommentRetrieveIntervalSec
10-
{
11-
get { return ChangedOptions.CommentRetrieveIntervalSec; }
12-
set { ChangedOptions.CommentRetrieveIntervalSec = value; }
13-
}
14-
public Color KiitosBackColor
15-
{
16-
get { return ChangedOptions.KiitosBackColor; }
17-
set { ChangedOptions.KiitosBackColor = value; }
18-
}
19-
public Color KiitosForeColor
20-
{
21-
get { return ChangedOptions.KiitosForeColor; }
22-
set { ChangedOptions.KiitosForeColor = value; }
23-
}
249
public Color ItemBackColor
2510
{
2611
get { return ChangedOptions.ItemBackColor; }

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /