Skip to content

Commit

Permalink
Release v2.5.2-m2
Browse files Browse the repository at this point in the history
主题:可通过 Settings\ColorScheme.json 自定义配色
   配色文件格式请参考 ColorScheme.example.json
   旧版本自带配色文件为 ColorScheme.Solarized.json

司令部:增加直接显示战果的选项 ( 需手动编辑配置文件将
    ShowGrowthInsteadOfNextInHQ 设为 true 以开启 )
舰队:优化索敌值 Tooltip 排版 ( 33 式索敌值用 [] 标出 )
舰队编成:筛选条件新增 "远征中"
     修正错译 "显示滚动条" => "显示状态栏"
舰队一览:优化泊地修理 Tooltip 排版,修理耗时进位到整分钟
     泊地修理 Tooltip 增加每 HP 耗时显示 ( 最大显示 5,
     可通过配置文件中 MaxAkashiPerHP 调整,设 0 关闭 )

其他各种用语微调 ( "时间" => "耗时" 等 )
注:配置文件中新增的隐藏设置项需运行一次新版后才会写入
  • Loading branch information
RadarNyan committed Jan 25, 2017
2 parents 20ff2e1 + ae8dccf commit 204d2e2
Show file tree
Hide file tree
Showing 18 changed files with 815 additions and 469 deletions.
2 changes: 1 addition & 1 deletion DockPanelSuite
Submodule DockPanelSuite updated 206 files
19 changes: 5 additions & 14 deletions ElectronicObserver.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElectronicObserver", "ElectronicObserver\ElectronicObserver.csproj", "{A9ABEC50-1BFC-4C69-87AE-C68DB6004F68}"
ProjectSection(ProjectDependencies) = postProject
{87A2B596-57D0-48BB-B522-895782D7A6FC} = {87A2B596-57D0-48BB-B522-895782D7A6FC}
{A965D7BB-5CDA-4531-AB67-58D4FA10AA6D} = {A965D7BB-5CDA-4531-AB67-58D4FA10AA6D}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Browser", "Browser\Browser.csproj", "{87A2B596-57D0-48BB-B522-895782D7A6FC}"
Expand All @@ -12,11 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrowserLib", "BrowserLib\Br
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "DockPanelSuite\WinFormsUI\WinFormsUI.csproj", "{C75532C4-765B-418E-B09B-46D36B2ABDB1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThemeVS2012Light", "DockPanelSuite\WinFormsUI\ThemeVS2012Light.csproj", "{4ED4FDB5-9FD0-49E6-876D-1635F727C755}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThemeSolarizedDark", "DockPanelSuite\WinFormsUI\ThemeSolarizedDark.csproj", "{A965D7BB-5CDA-4531-AB67-58D4FA10AA6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThemeSolarizedLight", "DockPanelSuite\WinFormsUI\ThemeSolarizedLight.csproj", "{50D6EDE2-B00E-4487-8426-9EF4D8D1D416}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThemeVS2012", "DockPanelSuite\WinFormsUI\ThemeVS2012.csproj", "{A965D7BB-5CDA-4531-AB67-58D4FA10AA6D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -40,18 +39,10 @@ Global
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C75532C4-765B-418E-B09B-46D36B2ABDB1}.Release|Any CPU.Build.0 = Release|Any CPU
{4ED4FDB5-9FD0-49E6-876D-1635F727C755}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4ED4FDB5-9FD0-49E6-876D-1635F727C755}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4ED4FDB5-9FD0-49E6-876D-1635F727C755}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4ED4FDB5-9FD0-49E6-876D-1635F727C755}.Release|Any CPU.Build.0 = Release|Any CPU
{A965D7BB-5CDA-4531-AB67-58D4FA10AA6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A965D7BB-5CDA-4531-AB67-58D4FA10AA6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A965D7BB-5CDA-4531-AB67-58D4FA10AA6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A965D7BB-5CDA-4531-AB67-58D4FA10AA6D}.Release|Any CPU.Build.0 = Release|Any CPU
{50D6EDE2-B00E-4487-8426-9EF4D8D1D416}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50D6EDE2-B00E-4487-8426-9EF4D8D1D416}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50D6EDE2-B00E-4487-8426-9EF4D8D1D416}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50D6EDE2-B00E-4487-8426-9EF4D8D1D416}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
42 changes: 34 additions & 8 deletions ElectronicObserver/Data/FleetData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -656,26 +656,52 @@ public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, T
label.ImageIndex = (int)ResourceManager.IconContent.FleetAnchorageRepairing;

StringBuilder sb = new StringBuilder();
sb.AppendFormat( "开始时间 : {0}\r\n修理时间 :\r\n",
sb.AppendFormat( "开始时间 :\r\n{0}\r\n",
DateTimeHelper.TimeToCSVString( KCDatabase.Instance.Fleet.AnchorageRepairingTimer ) );

sb.Append("修理耗时 :\r\n");
for ( int i = 0; i < fleet.Members.Count; i++ ) {
var ship = fleet.MembersInstance[i];
if ( ship != null && ship.HPRate < 1.0 ) {
var totaltime = DateTimeHelper.FromAPITimeSpan( ship.RepairTime );
var unittime = Calculator.CalculateDockingUnitTime( ship );
sb.AppendFormat( "#{0} : {1:00}:{2:00}:{3:00} @ {4:00}:{5:00}:{6:00} x -{7} HP\r\n",
var totaltime = Calculator.CalculateDockingTotalTime(ship);
sb.AppendFormat(
"#{0} : {1:00}:{2:00}:00 @ {3:00}'{4:00}\" x -{5} HP\r\n",
i + 1,
(int)totaltime.TotalHours,
totaltime.Minutes,
totaltime.Seconds,
(int)unittime.TotalHours,
unittime.Minutes,
unittime.Seconds,
ship.HPMax - ship.HPCurrent
);
} else {
sb.Append( "#" ).Append( i + 1 ).Append( " : ----\r\n" );
);
}
}

if (Configuration.Config.UI.MaxAkashiPerHP != 0) {
sb.Append("每 HP 耗时 : (hh:mm)\r\n");
for ( int i = 0; i < fleet.Members.Count; i++ ) {
var ship = fleet.MembersInstance[i];
if ( ship != null && ship.HPRate < 1.0 ) {
sb.AppendFormat("#{0} : ", i + 1);
int hpToFix = ship.HPMax - ship.HPCurrent;
for (int hp = 1; hp <= hpToFix; hp++) {
var perhp = Calculator.CalculateDockingUnitTime(ship, hp);
sb.AppendFormat(
"{0:00}:{1:00}",
(int)perhp.Hours,
// (int)perhp.Hours > 0 ? String.Format("{0:00}", (int)perhp.Hours) : "",
perhp.Minutes
);
if (hp == hpToFix) {
sb.Append("\r\n");
} else if (hp == Configuration.Config.UI.MaxAkashiPerHP) {
sb.Append(" ...\r\n");
break;
} else {
sb.Append(" | ");
}
}
}
}
}

Expand Down
17 changes: 17 additions & 0 deletions ElectronicObserver/Data/ShipData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,23 @@ public string FleetWithIndex {

}

// 远征中判定
public bool InExpedition {
get {
FleetManager fm = KCDatabase.Instance.Fleet;
foreach ( var f in fm.Fleets.Values ) {
if ( f.Members.Contains( MasterID ) ) {
if ( f.FleetID == 1 ) {
return false;
} else {
return (f.ExpeditionState != 0);
}
}
}
return false;
}
}


/// <summary>
/// ケッコン済みかどうか
Expand Down
1 change: 1 addition & 0 deletions ElectronicObserver/Data/ShipGroup/ExpressionData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public enum ExpressionOperator {
{ ".IsLockedByEquipment", "有带锁装备" },
{ ".SallyArea", "出击海域" },
{ ".FleetWithIndex", "所属舰队" },
{ ".InExpedition", "远征中" },
{ ".IsMarried", "结婚" },
{ ".AirBattlePower", "航空威力" },
{ ".ShellingPower", "炮击威力" },
Expand Down
30 changes: 13 additions & 17 deletions ElectronicObserver/ElectronicObserver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,7 @@
<DependentUpon>FormIntegrated.cs</DependentUpon>
</Compile>
<Compile Include="Window\Support\ControlHelper.cs" />
<Compile Include="Window\Support\CustomFloatWindowFactory.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Window\Support\CustomFloatWindowFactory.cs" />
<Compile Include="Window\Support\WindowPlacementManager.cs" />
<EmbeddedResource Include="Window\Control\ImageLabel.resx">
<DependentUpon>ImageLabel.cs</DependentUpon>
Expand Down Expand Up @@ -776,6 +774,12 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Settings\ColorScheme.example.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Settings\ColorScheme.Solarized.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand All @@ -789,7 +793,7 @@
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5 %28x86 x64%29</ProductName>
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
Expand All @@ -811,27 +815,19 @@
<Project>{8bb3e37d-09fb-40b9-958a-8cdcd18ef1f5}</Project>
<Name>BrowserLib</Name>
</ProjectReference>
<ProjectReference Include="..\DockPanelSuite\WinFormsUI\ThemeVS2012.csproj">
<Project>{a965d7bb-5cda-4531-ab67-58d4fa10aa6d}</Project>
<Name>ThemeVS2012</Name>
</ProjectReference>
<ProjectReference Include="..\DockPanelSuite\WinFormsUI\WinFormsUI.csproj">
<Project>{c75532c4-765b-418e-b09b-46d36b2abdb1}</Project>
<Name>WinFormsUI</Name>
</ProjectReference>
<ProjectReference Include="..\DockPanelSuite\WinFormsUI\ThemeVS2012Light.csproj">
<Project>{4ed4fdb5-9fd0-49e6-876d-1635f727c755}</Project>
<Name>ThemeVS2012Light</Name>
</ProjectReference>
<ProjectReference Include="..\DockPanelSuite\WinFormsUI\ThemeSolarizedDark.csproj">
<Project>{a965d7bb-5cda-4531-ab67-58d4fa10aa6d}</Project>
<Name>ThemeSolarizedDark</Name>
</ProjectReference>
<ProjectReference Include="..\DockPanelSuite\WinFormsUI\ThemeSolarizedLight.csproj">
<Project>{50d6ede2-b00e-4487-8426-9ef4d8d1d416}</Project>
<Name>ThemeSolarizedLight</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(TargetDir)*.*" "$(ProjectDir)..\output\"</PostBuildEvent>
<PostBuildEvent>xcopy "$(TargetDir)." "$(ProjectDir)..\output" /E</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
79 changes: 79 additions & 0 deletions ElectronicObserver/Settings/ColorScheme.Solarized.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Solarized Light & Solarized Dark
// Version 20170119
// Based on "Solarized" by Ethan Schoonover (http://ethanschoonover.com/solarized)

[{
"name": "Solarized Light",
"basicColors": { // SolarizedColors
"red": "#dc322f",
"orange": "#cb4b16",
"yellow": "#b58900",
"green": "#859900",
"cyan": "#2aa198",
"blue": "#268bd2",
"magenta": "#d33682",
"violet": "#6c71c4"
},
"barColors": [[
"#c71015",
"#c71015",
"#FF8800",
"#FF8800",
"#FFBF00",
"#FFBF00",
"#469046",
"#469046",
"#268BD2",
"#a3c8a3",
"#FFD2D2",
"#EEE8D5"
]],
"panelColors": {
"foreground": "#586e75", // SolarizedBase01
"background": "#fdf6e3", // SolarizedBase3
"foreground2": "#657b83", // SolarizedBase00
"background2": "#eee8d5", // SolarizedBase2
"quest": {
"processLT50": "#d68d00",
"processLT80": "#469046",
"processLT100": "#3c897f"
}
}
},{
"name": "Solarized Dark",
"basicColors": { // SolarizedColors
"red": "#dc322f",
"orange": "#cb4b16",
"yellow": "#b58900",
"green": "#859900",
"cyan": "#2aa198",
"blue": "#268bd2",
"magenta": "#d33682",
"violet": "#6c71c4"
},
"barColors": [[
"#c71015",
"#c71015",
"#c94800",
"#c94800",
"#d68d00",
"#d68d00",
"#469046",
"#469046",
"#268BD2",
"#a3c8a3",
"#63080a",
"#073642"
]],
"panelColors": {
"foreground": "#93a1a1", // SolarizedBase1
"background": "#002b36", // SolarizedBase03
"foreground2": "#839496", // SolarizedBase0
"background2": "#073642", // SolarizedBase02
"quest": {
"processLT50": "#d68d00",
"processLT80": "#469046",
"processLT100": "#3c897f"
}
}
}]
Loading

0 comments on commit 204d2e2

Please sign in to comment.