Skip to content

Commit

Permalink
add translate setting
Browse files Browse the repository at this point in the history
  • Loading branch information
FreyYa committed May 8, 2016
1 parent 01d9819 commit 9d9e9fe
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class _KanColleClientSettings : IKanColleClientSettings
public string ViewRangeCalcType { get; set; }
public bool SqrtDoubleToInt { get; set; }
public bool EnableAircraftFilter { get; set; }
public bool AutoTranslateEnable { get; set; }
public bool CheckFlagshipIsRepairShip { get; set; }

event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public static void Load()
KanColleSettings.ReSortieCondition.Value = Current.KanColleClientSettings.ReSortieCondition;
KanColleSettings.SqrtDoubleToInt.Value = Current.KanColleClientSettings.SqrtDoubleToInt;
KanColleSettings.EnableAircraftFilter.Value = Current.KanColleClientSettings.EnableAircraftFilter;
}
KanColleSettings.AutoTranslateEnable.Value = Current.KanColleClientSettings.AutoTranslateEnable;
}

if (Current.ProxySettings != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static class GeneralSettings
/// <summary>
/// 새로고침 설정 저장
/// </summary>
///
public static SerializableProperty<ExitConfirmationType> RefreshConfirmationType { get; }
= new SerializableProperty<ExitConfirmationType>(GetKey(), Providers.Roaming, Models.ExitConfirmationType.InSortieOnly) { AutoSave = true };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public class KanColleSettings : IKanColleClientSettings
public static SerializableProperty<bool> EnableAircraftFilter { get; }
= new SerializableProperty<bool>(GetKey(), Providers.Roaming, true);

public static SerializableProperty<bool> AutoTranslateEnable { get; }
= new SerializableProperty<bool>(GetKey(), Providers.Roaming, true);

/// <summary>
/// 업데이트 알림을 활성화합니다
/// </summary>
Expand Down Expand Up @@ -168,6 +171,8 @@ protected void RaisePropertyChanged([CallerMemberName] string propertyName = nul

bool IKanColleClientSettings.EnableAircraftFilter => EnableAircraftFilter.Value;

bool IKanColleClientSettings.AutoTranslateEnable => AutoTranslateEnable.Value;

bool IKanColleClientSettings.CheckFlagshipIsRepairShip => CheckFlagshipIsNotRepairShip.Value;

#endregion
Expand Down
4 changes: 4 additions & 0 deletions source/Grabacr07.KanColleViewer/Views/Settings/Others.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
<CheckBox Content="번역되지않은 데이터를 Translations 폴더에 저장합니다"
IsChecked="{Binding Source={x:Static ms:KanColleSettings.EnableAddUntranslated}, Path=Value}"
Height="17" Margin="15,0,0,10"/>
<CheckBox Content="번역기를 이용한 자동번역 활성화"
IsChecked="{Binding Source={x:Static ms:KanColleSettings.AutoTranslateEnable}, Path=Value}"
Height="17"
Margin="15,0,0,10"/>
<Rectangle Style="{DynamicResource SeparatorStyleKey}" />

<TextBlock Text="업데이트 설정" Style="{DynamicResource SettingsHeaderTextStyleKey}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public interface IKanColleClientSettings : INotifyPropertyChanged
bool SqrtDoubleToInt { get; }

bool EnableAircraftFilter { get; }
bool AutoTranslateEnable { get; }
/// <summary>
/// 艦隊ステータスにおいて、旗艦が工作艦かどうかを確認するかどうかを示す値を取得します。
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions source/Grabacr07.KanColleWrapper/Models/WebTranslator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public WebTranslator()
static int count;
public string RawTranslate(string orign, TranslateKind kind = TranslateKind.Naver)
{

if (count > 25) return orign;

switch (kind)
Expand Down

0 comments on commit 9d9e9fe

Please sign in to comment.