Skip to content

Commit

Permalink
Merge remote-tracking branch 'Grabacr07/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuubari committed Apr 15, 2017
2 parents 1b8fa41 + fc304b5 commit 16d8726
Show file tree
Hide file tree
Showing 19 changed files with 367 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,129 @@
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="Type"
Value="JetPowerededBomber1">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:SlotItemIcon}">
<Viewbox>
<Grid>
<Path Data="M7,6C5.628,5.355,5.289,3.855,3.55,3.791c-0.26-.01-0.907.667-1.133,0.678C0.91,4.542.07,4.288,0.088,5.154-1.049,6.854,4.048,8.8,4,10c-0.06,1.5-2.406-1.031-3,1s1.921,1.787,1.529,2.271C1.538,14.493-.136,16.3.537,17.613c1.076,2.1,4.816-4.208,7.268-4.113,1.372,0.053.491-1.358,1.788-2.816A34.566,34.566,0,0,1,15,12a16.239,16.239,0,0,0,3,0c2.281-.125,1.219-2.875,2-3s0.406-1.937-1-2-1.083,2.008-3,2c-0.982,0-4.186-.994-4.124-1.556S13.67,6.836,12,6c-1.18-.556,1.461-1.553,1.233-4.238-0.244-2.875-1.05-1.51-3.033.881C7.688,4.752,7.932,2.01,7,3,6.16,3.96,8.19,4.712,7,6Z"
Fill="#FF48B38F"
HorizontalAlignment="Left"
Width="207"
Height="129"
Stretch="Uniform"
VerticalAlignment="Top" />
<ed:RegularPolygon PointCount="6"
InnerRadius="1"
Stretch="Fill"
Stroke="Black"
StrokeThickness="2"
Fill="#FFFDC313"
Width="126"
Height="146"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="61.033,60.606,0,0" />
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="Type"
Value="JetPowerededBomber2">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:SlotItemIcon}">
<Viewbox>
<Grid>
<Path Data="M21,14a24.414,24.414,0,0,1-5-1c0.032,0.047-3.741-2.217-4.645-1.674s-0.858,1.34-1.766,2.595C9.4,14.177,10.8,15.23,9.86,16s-1.379.1-2.678,0.125C5.96,17.321,4.026,19.3,3.238,19.162c-0.557-.095.793-2.653,1.372-4.648C3.053,13.429,1.2,11,2,11H3a7.764,7.764,0,0,1,3.236.381c0.2-.322.392-0.639,0.594-0.932C3.435,9.348.553,6.894,1,6,1.583,4.833,6.333,7.167,8,7c0.3-.03-0.75-1,2-1a3.549,3.549,0,0,1,.4.052c0.1-.139.205-0.28,0.308-0.42C9.457,4.809,8.211,3,9,3h1a10.314,10.314,0,0,1,2.5.217C13.556,1.852,14.472.859,15,1c0.251,0.067,1.289-.3,1,0a11.407,11.407,0,0,0-1.6,3.427c1.147,1.292.466,1.448-.525,1.461a1.688,1.688,0,0,0-.553,1.457C14.486,8.143,15.608,9,17,9c1.917,0,1.432.166,3-1,2.093-1.556,1.8.864,1.755,3.346C21.728,12.7,21.61,13.962,21,14Z"
Fill="#FF48B38F"
HorizontalAlignment="Left"
Width="207"
Height="129"
Stretch="Uniform"
VerticalAlignment="Top" />
<ed:RegularPolygon PointCount="6"
InnerRadius="1"
Stretch="Fill"
Stroke="Black"
StrokeThickness="2"
Fill="#FFFDC313"
Width="126"
Height="146"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="61.033,60.606,0,0" />
<!-- Margin="91.033,50.606,0,0" /> -->
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="Type"
Value="TransportEquipment">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:SlotItemIcon}">
<Viewbox>
<Grid>
<Path Data="M15,22v3l-4.437,2.719L12.153,28.3,15,27h1l2.773,1.7,1.057-.64L16,25V22H15Zm5-2.016a2.487,2.487,0,0,1,2.5,2.557v1.31A2.639,2.639,0,0,1,20,26.532a2.487,2.487,0,0,1-2.5-2.557V22.665A2.639,2.639,0,0,1,20,19.984ZM6.843,14.757L5.8,19.3l2.219,1.213L12,21l1.75-.219L15,20l1,1h1l1.3-1.725,3.457,0.009,1.969,2.648,0.541,1.187L29,23l1-1-1-2H28l-2.767-2.185-10.092.114L14,19l-3.25-.333L9,17l-0.583-.833L8,15ZM7,13l2.583-1.167L12,12l2,1,2,2-5.417.25L9,14H8Zm4.583-2.917L14,12l1.712,0.463L17,14l1.083,1.167L28,15V13l-2-1H25l-3-1-1.833-.167L20,12l-1,1-1.74-1.218L15.845,9.593Z"
Fill="#FF428358"
HorizontalAlignment="Left"
Width="241"
Height="190"
Stretch="Uniform"
VerticalAlignment="Top" />
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="Type"
Value="SubmarineEquipment">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:SlotItemIcon}">
<Viewbox>
<Grid>
<Path Data="M45,31V42l13.77,2.374a22.977,22.977,0,0,1-42.731,2.06L27,48V31l1-3H26c-1.437,0-1.375,2.188-2,1s2.469-2.969,3-3-0.375.875,0,1a2.483,2.483,0,0,0,1,0s0.156-5.375,0-6a1.589,1.589,0,0,0-1-1,2.452,2.452,0,0,0-2,0c-0.687.313-.437,1.5-1,1s0.75-2.875,2-3a0.8,0.8,0,0,1,1,1,2.08,2.08,0,0,0,1.136.674A1.254,1.254,0,0,0,29,19s3.313-.094,4,0c0.344,2.344-3,2-3,2l-1,6h1l1,1V24h1l3-1h1l1,1V18s1.906-.187,2,1-1,14-1,14h2s0.125-12.25,0-14a1.2,1.2,0,0,1,2,1c-0.031,1.375-1,13-1,13l2,1s0.375-13.969,1-14a1.155,1.155,0,0,1,1,1c0.063,0.313-.83,7.963-0.722,8.5A6.573,6.573,0,0,0,45,31ZM30,48h2l-0.5-3.614L32,41V40l-2-1v9Zm0-10,2-1V35l-1-1-1,1v3Zm0-9v3l2,1V31l1-2H32V28Zm3-3V25l-1,1v1h2Zm4,0H36l-2,2v2l1,3h2V26Zm0,9-1-1-0.988.468L35,38h2V35Zm0,12-0.5-3.386L37,40H35v8l2,1V47Zm3-12H39v3l1,1V35Zm0,5H39l-1,1,2,1V40Zm3-5H42v4h1V35Zm0,6-1-1v2h1V41Z"
Fill="#FF9FBCE3"
HorizontalAlignment="Left"
Width="428"
Height="420"
Stretch="Uniform"
VerticalAlignment="Top" />
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="Type"
Value="SeaplaneFighter">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:SlotItemIcon}">
<Viewbox>
<Grid>
<Path Data="M2,3L3,5,6,6V7L5,10,4,11,2,12v1l3,1,3-1V12L6,11,7,7,8,8v2l2,4V11l3,1V11h2l-2,5L1,17,0,18l5,3,6,1,8-1,6-2,5-2V16H18l-2,1V15l4-4,9,2h3v2l-1,4-3,1v1l2,1h3l2-2H33l-1-1,1-2V14h4l4,1h2l-2-2H39L29,11l4-2h6l3,1L41,8H38L36,7l1-7H36L33,4,32,6H28L22,4,20,3H18L16,5,11,4,10,5H8L7,2H6V4L3,3H2Z"
Fill="#FF8BC595"
HorizontalAlignment="Left"
Width="215"
Height="110"
Stretch="Uniform"
VerticalAlignment="Top" />
</Grid>
</Viewbox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>

Expand Down
1 change: 1 addition & 0 deletions source/Grabacr07.KanColleViewer/KanColleViewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
<Compile Include="Models\Volume.cs" />
<Compile Include="Models\Migration\_KanColleClientSettings.cs" />
<Compile Include="ViewModels\Composition\LoadFailedPluginViewModel.cs" />
<Compile Include="ViewModels\Contents\ShipSpeedExtensions.cs" />
<Compile Include="ViewModels\InformationWindowViewModel.cs" />
<Compile Include="ViewModels\KanColleWindowViewModel.cs" />
<Compile Include="ViewModels\Catalogs\ShipCatalogFilter.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
Expand All @@ -25,7 +25,7 @@ public class KanColleSettings : IKanColleClientSettings
/// 索敵計算に使用するロジックを識別する文字列の設定値を取得します。
/// </summary>
public static SerializableProperty<string> ViewRangeCalcType { get; }
= new SerializableProperty<string>(GetKey(), Providers.Roaming, new ViewRangeType1().Id);
= new SerializableProperty<string>(GetKey(), Providers.Roaming, new ViewRangeType4().Id);

/// <summary>
/// 索敵計算に第1艦隊を含めるかどうかの設定値を取得します。
Expand Down
4 changes: 2 additions & 2 deletions source/Grabacr07.KanColleViewer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Reflection;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows;

Expand All @@ -15,4 +15,4 @@
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly)]

[assembly: AssemblyVersion("4.2.9.0")]
[assembly: AssemblyVersion("4.2.10.0")]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -184,18 +184,38 @@ public override bool Predicate(Ship ship)

public class ShipSpeedFilter : ShipCatalogFilter
{
#region Both 変更通知プロパティ
#region Fastest 変更通知プロパティ

private bool _Both;
private bool _Fastest;

public bool Both
public bool Fastest
{
get { return this._Both; }
get { return this._Fastest; }
set
{
if (this._Both != value)
if (this._Fastest != value)
{
this._Both = value;
this._Fastest = value;
this.RaisePropertyChanged();
this.Update();
}
}
}

#endregion

#region Faster 変更通知プロパティ

private bool _Faster;

public bool Faster
{
get { return this._Faster; }
set
{
if (this._Faster != value)
{
this._Faster = value;
this.RaisePropertyChanged();
this.Update();
}
Expand Down Expand Up @@ -224,37 +244,41 @@ public bool Fast

#endregion

#region Low 変更通知プロパティ
#region Slow 変更通知プロパティ

private bool _Low;
private bool _Slow;

public bool Low
public bool Slow
{
get { return this._Low; }
get { return this._Slow; }
set
{
if (this._Low != value)
if (this._Slow != value)
{
this._Low = value;
this._Slow = value;
this.RaisePropertyChanged();
this.Update();
}
}
}

#endregion


public ShipSpeedFilter(Action updateAction)
: base(updateAction)
{
this._Both = true;
this._Fastest = true;
this._Faster = true;
this._Fast = true;
this._Slow = true;
}

public override bool Predicate(Ship ship)
{
if (this.Both) return true;
if (this.Fast && ship.Info.Speed == ShipSpeed.Fast) return true;
if (this.Low && ship.Info.Speed == ShipSpeed.Low) return true;
if (this.Fastest && ship.Speed == ShipSpeed.Fastest) return true;
if (this.Faster && ship.Speed == ShipSpeed.Faster) return true;
if (this.Fast && ship.Speed == ShipSpeed.Fast) return true;
if (this.Slow && ship.Speed == ShipSpeed.Slow) return true;

return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Grabacr07.KanColleViewer.Models;
using Grabacr07.KanColleViewer.ViewModels.Contents;
using Grabacr07.KanColleWrapper.Models;
using Livet;

Expand All @@ -16,6 +17,8 @@ public class ShipViewModel : ViewModel

public SallyArea SallyArea { get; }

public string Speed => this.Ship.Speed.ToDisplayString();

public string TimeToRepair => this.Ship.TimeToRepair != TimeSpan.Zero
? $"{(int)this.Ship.TimeToRepair.TotalHours:D2}:{this.Ship.TimeToRepair.ToString(@"mm\:ss")}"
: "";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Grabacr07.KanColleViewer.Properties;
using Grabacr07.KanColleWrapper.Models;
using Livet;
using Livet.EventListeners;
Expand All @@ -23,21 +21,9 @@ public class FleetStateViewModel : ViewModel

public string ViewRange => (Math.Floor(this.Source.ViewRange * 100) / 100).ToString("##0.##");

public string Speed
{
get
{
switch (this.Source.Speed)
{
case FleetSpeed.Fast:
return Resources.Fleets_Speed_Fast;
case FleetSpeed.Low:
return Resources.Fleets_Speed_Slow;
default:
return "速度混成艦隊";
}
}
}
public string Speed => this.Source.Speed.IsMixed
? $"速度混成艦隊 ({this.Source.Speed.Min.ToDisplayString()}{this.Source.Speed.Max.ToDisplayString()})"
: $"{this.Source.Speed.Min.ToDisplayString()}艦隊";

public HomeportViewModel Homeport { get; }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Linq;
using Grabacr07.KanColleWrapper.Models;

namespace Grabacr07.KanColleViewer.ViewModels.Contents
{
public static class ShipSpeedExtensions
{
public static string ToDisplayString(this ShipSpeed? speed) => ToDisplayString(speed ?? ShipSpeed.Immovable);

public static string ToDisplayString(this ShipSpeed speed)
{
switch (speed)
{
case ShipSpeed.Fastest:
return "最速";
case ShipSpeed.Faster:
return "高速+";
case ShipSpeed.Fast:
return "高速";
case ShipSpeed.Slow:
return "低速";
default:
return "";
}
}
}
}
Loading

0 comments on commit 16d8726

Please sign in to comment.