Skip to content

Commit

Permalink
Release v2.4.4.1-m2
Browse files Browse the repository at this point in the history
微调部分用语、格式
近代化改修结果加入改修后属性数值上限提示 ( 取自魔改版 )
优化主题支持,解决暗色主题部分背景色下文字看不清的问题
  • Loading branch information
RadarNyan committed Oct 26, 2016
2 parents 608b0db + 9101c8d commit 705ce6c
Show file tree
Hide file tree
Showing 22 changed files with 183 additions and 54 deletions.
5 changes: 1 addition & 4 deletions ElectronicObserver/Data/Battle/BattleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,7 @@ private void BattleFinished() {
// ロギング
if ( IsPractice ) {
Utility.Logger.Add(2, "", "同",
string.Format("「{0}」",
EnemyAdmiralName),
string.Format("{0}的",
EnemyAdmiralRank),
string.Format("「{0}」", EnemyAdmiralName), "提督的舰队",
string.Format("「{0}」",
Result.EnemyFleetName),
string.Format("进行了演习。( 结果 : {0}, 提督经验 +{1}, 舰娘经验 +{2} )",
Expand Down
6 changes: 3 additions & 3 deletions ElectronicObserver/Data/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public static string GetAACutinKind( int id ) {
case 7:
return "高角炮 / 高射装置 / 电探";
case 8:
return "高角炮+高射装置 / 电探";
return "高角炮高射装置 / 电探";
case 9:
return "高角炮 / 高射装置";
case 10:
Expand Down Expand Up @@ -705,7 +705,7 @@ public static string GetMaterialName( int materialID ) {
public static string GetAdmiralRank( int id ) {
switch ( id ) {
case 1:
return "元帅";
return "元帥";
case 2:
return "大将";
case 3:
Expand All @@ -721,7 +721,7 @@ public static string GetAdmiralRank( int id ) {
case 8:
return "少佐";
case 9:
return "中坚少佐";
return "中堅少佐";
case 10:
return "新米少佐";
default:
Expand Down
19 changes: 15 additions & 4 deletions ElectronicObserver/Data/FleetData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ public static FleetStates UpdateFleetState( FleetData fleet, ImageLabel label, T
//初期化
tooltip.SetToolTip( label, null );
label.BackColor = Color.Transparent;
label.ForeColor = Utility.Configuration.Config.UI.ForeColor;



Expand Down Expand Up @@ -763,22 +764,32 @@ public static void RefreshFleetState( ImageLabel label, FleetStates state, DateT
switch ( state ) {
case FleetStates.Damaged:
case FleetStates.SortieDamaged:
label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightCoral : Color.Transparent;
label.BackColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_BackColorLightCoral : Color.Transparent;
label.ForeColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_ForeColor : Utility.Configuration.Config.UI.ForeColor;
break;
case FleetStates.Docking:
label.Text = "入渠中 " + DateTimeHelper.ToTimeRemainString( timer );
if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( timer - DateTime.Now ).TotalMilliseconds <= Utility.Configuration.Config.NotifierRepair.AccelInterval )
label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent;
{
label.BackColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_BackColorLightGreen : Color.Transparent;
label.ForeColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_ForeColor : Utility.Configuration.Config.UI.ForeColor;
}
break;
case FleetStates.Expedition:
label.Text = "远征中 " + DateTimeHelper.ToTimeRemainString( timer );
if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( timer - DateTime.Now ).TotalMilliseconds <= Utility.Configuration.Config.NotifierExpedition.AccelInterval )
label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent;
{
label.BackColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_BackColorLightGreen : Color.Transparent;
label.ForeColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_ForeColor : Utility.Configuration.Config.UI.ForeColor;
}
break;
case FleetStates.Tired:
label.Text = "疲劳 " + DateTimeHelper.ToTimeRemainString( timer );
if ( Utility.Configuration.Config.FormFleet.BlinkAtCompletion && ( timer - DateTime.Now ).TotalMilliseconds <= 0 )
label.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent;
{
label.BackColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_BackColorLightGreen : Color.Transparent;
label.ForeColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_ForeColor : Utility.Configuration.Config.UI.ForeColor;
}
break;
case FleetStates.AnchorageRepairing:
label.Text = "修理中 " + DateTimeHelper.ToTimeElapsedString( KCDatabase.Instance.Fleet.AnchorageRepairingTimer );
Expand Down
4 changes: 2 additions & 2 deletions ElectronicObserver/Observer/kcsapi/api_req_hokyu/charge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public override void OnResponseReceived( dynamic data ) {
material[3] -= db.Material.Bauxite;

{
var sb = new StringBuilder( "补给完成。消耗 : " );
var sb = new StringBuilder( "补给完成 : " );

for ( int i = 0; i < 4; i++ ) {
if ( material[i] > 0 ) {
sb.Append( Constants.GetMaterialName( i + 1 ) ).Append( " x " ).Append( material[i] ).Append( ", " );
sb.Append( Constants.GetMaterialName( i + 1 ) ).Append( " -" ).Append( material[i] ).Append( ", " );
}
}

Expand Down
29 changes: 22 additions & 7 deletions ElectronicObserver/Observer/kcsapi/api_req_kaisou/powerup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,37 @@ public override void OnResponseReceived( dynamic data ) {

int firepower = updated_ship.FirepowerBase - ship.FirepowerBase;
if ( firepower > 0 )
contents.AddLast( "火力 +" + firepower );
contents.AddLast(string.Format("火力 +{0} ({1}/{2})",
firepower,
updated_ship.FirepowerBase,
updated_ship.MasterShip.FirepowerMax));
int torpedo = updated_ship.TorpedoBase - ship.TorpedoBase;
if ( torpedo > 0 )
contents.AddLast( "雷装 +" + torpedo );
contents.AddLast(string.Format("雷装 +{0} ({1}/{2})",
torpedo,
updated_ship.TorpedoBase,
updated_ship.MasterShip.TorpedoMax));
int aa = updated_ship.AABase - ship.AABase;
if ( aa > 0 )
contents.AddLast( "对空 +" + aa );
contents.AddLast(string.Format("对空 +{0} ({1}/{2})",
aa,
updated_ship.AABase,
updated_ship.MasterShip.AAMax));
int armor = updated_ship.ArmorBase - ship.ArmorBase;
if ( armor > 0 )
contents.AddLast( "装甲 +" + armor );
contents.AddLast(string.Format("装甲 +{0} ({1}/{2})",
armor,
updated_ship.ArmorBase,
updated_ship.MasterShip.ArmorMax));
int luck = updated_ship.LuckBase - ship.LuckBase;
if ( luck > 0 )
contents.AddLast( "运 +" + luck );
contents.AddLast(string.Format("运 +{0} ({1}/{2})",
luck,
updated_ship.LuckBase,
updated_ship.MasterShip.LuckMax));

sb.AppendFormat( string.Join( ", ", contents ) + " )" );
Utility.Logger.Add(2, "", "成功对 ", ship.NameWithLevel, "进行了近代化改修。 ( " + sb.ToString());
sb.AppendFormat(string.Join(", ", contents));
Utility.Logger.Add(2, "", "成功对 ", ship.NameWithLevel, " 进行了近代化改修 : " + sb.ToString());
}
}
ship.LoadFromResponse( APIName, data.api_ship );
Expand Down
12 changes: 6 additions & 6 deletions ElectronicObserver/Observer/kcsapi/api_req_mission/result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override void OnResponseReceived( dynamic data ) {
int[] materials = (int[])data.api_get_material;
for ( int i = 0; i < 4; i++ ) {
if ( materials[i] > 0 ) {
sb.AddLast( Constants.GetMaterialName( i + 1 ) + " x " + materials[i] );
sb.AddLast( Constants.GetMaterialName( i + 1 ) + " +" + materials[i] );
}
}

Expand All @@ -60,19 +60,19 @@ public override void OnResponseReceived( dynamic data ) {

switch ( kind ) {
case 1:
sb.AddLast( "高速修复材 x " + count );
sb.AddLast( "高速修复材 +" + count );
break;
case 2:
sb.AddLast( "高速建造材 x " + count );
sb.AddLast( "高速建造材 +" + count );
break;
case 3:
sb.AddLast( "开发资材 x " + count );
sb.AddLast( "开发资材 +" + count );
break;
case 4:
sbj.AddLast( KCDatabase.Instance.MasterUseItems[id].Name + " x " + count );
sbj.AddLast( KCDatabase.Instance.MasterUseItems[id].Name + " +" + count );
break;
case 5:
sb.AddLast( "家具币 x " + count );
sb.AddLast( "家具币 +" + count );
break;
}

Expand Down
36 changes: 36 additions & 0 deletions ElectronicObserver/Utility/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,36 @@ public Color Color_Red { get {
case 1: return SolarizedRed.ColorData;
default: return Color.Red;
}}}
public Color Color_Magenta { get {
switch (ThemeID) {
case 0: return SolarizedMagenta.ColorData;
case 1: return SolarizedMagenta.ColorData;
default: return Color.FromArgb( 0xFF, 0x00, 0xFF );
}}}
public Color Blink_ForeColor { get {
switch (ThemeID) {
case 0: return SolarizedBase3.ColorData;
case 1: return SolarizedBase03.ColorData;
default: return SystemColors.ControlText;
}}}
public Color Blink_SubForeColor { get {
switch (ThemeID) {
case 0: return SolarizedBase2.ColorData;
case 1: return SolarizedBase02.ColorData;
default: return SystemColors.ControlText;
}}}
public Color Blink_BackColorLightCoral { get {
switch (ThemeID) {
case 0: return SolarizedRed.ColorData;
case 1: return SolarizedRed.ColorData;
default: return Color.LightCoral;
}}}
public Color Blink_BackColorLightGreen { get {
switch (ThemeID) {
case 0: return SolarizedCyan.ColorData;
case 1: return SolarizedCyan.ColorData;
default: return Color.LightGreen;
}}}
// 视图 - 舰队:疲劳度
public Color Fleet_ColorConditionVeryTired { get {
switch (ThemeID) {
Expand Down Expand Up @@ -409,6 +439,12 @@ public Color Battle_ColorHPTextRepair { get {
case 1: return SolarizedBase01.ColorData;
default: return Color.FromArgb(0x00, 0x00, 0x88);
}}}
public bool RemoveBarShadow { get {
switch (ThemeID) {
case 0: return true;
case 1: return true;
default: return false;
}}}

#endregion

Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Utility/SoftwareInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static string VersionEnglish {
/// </summary>
public static DateTime UpdateTime {
get {
return DateTimeHelper.CSVStringToTime( "2016/10/23 19:21:52" );
return DateTimeHelper.CSVStringToTime( "2016/10/26 17:48:55" );
}
}

Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Window/Control/ShipStatusEquipment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public ShipStatusEquipment() {
base.Font = new Font( "Meiryo UI", 10, FontStyle.Regular, GraphicsUnit.Pixel );

_aircraftColorDisabled = Color.FromArgb( 0xAA, 0xAA, 0xAA );
_aircraftColorLost = Color.FromArgb( 0xFF, 0x00, 0xFF );
_aircraftColorLost = Utility.Configuration.Config.UI.Color_Magenta;
_aircraftColorDamaged = Utility.Configuration.Config.UI.Color_Red;
_aircraftColorFull = Utility.Configuration.Config.UI.ForeColor;

Expand Down
12 changes: 12 additions & 0 deletions ElectronicObserver/Window/Control/ShipStatusHP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ public ShipStatusHP() {
_HPBar.PrevValue = 88;
_HPBar.MaximumValue = 100;
_repairTime = null;
if (Utility.Configuration.Config.UI.RemoveBarShadow)
_HPBar.BarBackgroundOffset = 0;

_maximumDigit = 999;

Expand All @@ -273,6 +275,16 @@ public ShipStatusHP() {



public void RepaintHPtext () {
if (this.BackColor == Utility.Configuration.Config.UI.BackColor) {
_mainFontColor = Utility.Configuration.Config.UI.ForeColor;
_subFontColor = Utility.Configuration.Config.UI.SubForeColor;
} else {
_mainFontColor = Utility.Configuration.Config.UI.Blink_ForeColor;
_subFontColor = Utility.Configuration.Config.UI.Blink_SubForeColor;
}
this.Refresh();
}

private void ShipStatusHP_Paint( object sender, PaintEventArgs e ) {

Expand Down
4 changes: 3 additions & 1 deletion ElectronicObserver/Window/Control/ShipStatusResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public ShipStatusResource( ToolTip resourceTip ) {
BarAmmo = new StatusBarModule();

BarFuel.UsePrevValue = BarAmmo.UsePrevValue = false;
if (Utility.Configuration.Config.UI.RemoveBarShadow)
BarFuel.BarBackgroundOffset = BarAmmo.BarBackgroundOffset = 0;

ResourceTip = resourceTip;
}
Expand All @@ -70,7 +72,7 @@ private void PropertyChanged() {

//FIXME: サブウィンドウ状態のときToolTipが出現しない不具合を確認。

string tiptext = string.Format( " : {0}/{1} ({2}%)\r\n : {3}/{4} ({5}%)",
string tiptext = string.Format( " : {0}/{1} ({2}%)\r\n : {3}/{4} ({5}%)",
FuelCurrent, FuelMax, (int)Math.Ceiling( 100.0 * FuelCurrent / FuelMax ),
AmmoCurrent, AmmoMax, (int)Math.Ceiling( 100.0 * AmmoCurrent / AmmoMax ) );

Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Window/Control/StatusBarModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public Color BarColorIncrement {
}
}

private Color _barColorDecrement = FromArgb( 0xFF882222 );
private Color _barColorDecrement = Utility.Configuration.Config.UI.SubBackColor;
/// <summary>
/// バーの色(減少分)
/// </summary>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions ElectronicObserver/Window/FormArsenal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void Update( int arsenalID ) {
bool showShipName = Utility.Configuration.Config.FormArsenal.ShowShipName;

CompletionTime.BackColor = Color.Transparent;
CompletionTime.ForeColor = Utility.Configuration.Config.UI.ForeColor;
tooltip.SetToolTip( ShipName, null );
tooltip.SetToolTip( CompletionTime, null );

Expand Down Expand Up @@ -138,12 +139,14 @@ public void Refresh( int arsenalID ) {
CompletionTime.Text = DateTimeHelper.ToTimeRemainString( time );

if ( Utility.Configuration.Config.FormArsenal.BlinkAtCompletion && ( time - DateTime.Now ).TotalMilliseconds <= Utility.Configuration.Config.NotifierConstruction.AccelInterval ) {
CompletionTime.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent;
CompletionTime.BackColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_BackColorLightGreen : Color.Transparent;
CompletionTime.ForeColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_ForeColor : Utility.Configuration.Config.UI.ForeColor;
}

} else if ( Utility.Configuration.Config.FormArsenal.BlinkAtCompletion && !string.IsNullOrWhiteSpace( CompletionTime.Text ) ) {
//完成しているので
CompletionTime.BackColor = DateTime.Now.Second % 2 == 0 ? Color.LightGreen : Color.Transparent;
CompletionTime.BackColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_BackColorLightGreen : Color.Transparent;
CompletionTime.ForeColor = DateTime.Now.Second % 2 == 0 ? Utility.Configuration.Config.UI.Blink_ForeColor : Utility.Configuration.Config.UI.ForeColor;
}
}

Expand Down
Loading

0 comments on commit 705ce6c

Please sign in to comment.