Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
myangelkamikaze committed Dec 27, 2018
1 parent 0c5a061 commit 0d7a573
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
22 changes: 16 additions & 6 deletions ElectronicObserver/Window/FormFleet.Designer.cs

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

31 changes: 30 additions & 1 deletion ElectronicObserver/Window/FormFleet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,36 @@ private void ContextMenuFleet_CopyKanmusuList_Click(object sender, EventArgs e)
}


private void ContextMenuFleet_AntiAirDetails_Click(object sender, EventArgs e)
/// <summary>
///
/// <see cref="https://kancolle-fleetanalysis.firebaseapp.com"/>
/// </summary>
private void ContextMenuFleet_CopyFleetAnalysis_Click(object sender, EventArgs e)
{

StringBuilder sb = new StringBuilder();
KCDatabase db = KCDatabase.Instance;

// 手書き json の悲しみ
// pain and suffering

sb.Append("[");

foreach (var ship in db.Ships.Values.Where(s => s.IsLocked))
{
if (ship == null) break;

sb.Append($"{{\"api_ship_id\":{ship.ShipID},\"api_lv\":{ship.Level},\"api_kyouka\":[{ship.FirepowerModernized},{ship.TorpedoModernized},{ship.AAModernized},{ship.ArmorModernized},{ship.LuckModernized},{ship.HPMaxModernized},{ship.ASWModernized}]}},");
}

sb.Remove(sb.Length - 1, 1); // remove ","
sb.Append("]");

Clipboard.SetData(DataFormats.StringFormat, sb.ToString());
}


private void ContextMenuFleet_AntiAirDetails_Click(object sender, EventArgs e)
{

var dialog = new DialogAntiAirDefense();
Expand Down

0 comments on commit 0d7a573

Please sign in to comment.