public Point Location { get; set; }\r
public Size Size { get; set; }\r
public bool ShipType { get; set; }\r
+ public bool ShowHpInPercent { get; set; }\r
public ListForm.SortOrder SortOrder { get; set; } = ListForm.SortOrder.ExpToNext;\r
public List<List<int>> ShipGroup { get; set; }\r
\r
public bool ExitSilently { get; set; }\r
public int Zoom { get; set; } = 100;\r
public bool SaveLocationPerMachine { get; set; }\r
- public List<LocationPerMachine> LocationList { get; set; }= new List<LocationPerMachine>();\r
+ public List<LocationPerMachine> LocationList { get; set; } = new List<LocationPerMachine>();\r
+ public bool ShowHpInPercent { get; set; }\r
public bool FlashWindow { get; set; } = true;\r
public bool ShowBaloonTip { get; set; }\r
public bool PlaySound { get; set; } = true;\r
MaximumSize = new Size(Width, int.MaxValue);\r
var config = _config.ShipList;\r
checkBoxShipType.Checked = config.ShipType;\r
+ if (config.ShowHpInPercent)\r
+ shipListPanel.ToggleHpPercent();\r
ActiveControl = shipListPanel;\r
for (var i = 0; i < ShipListPanel.GroupCount; i++)\r
{\r
if (!Visible)\r
return;\r
var config = _config.ShipList;\r
+ config.ShowHpInPercent = shipListPanel.ShowHpInPercent;\r
var all = _sniffer.ShipList.Select(s => s.Id).ToArray();\r
config.ShipGroup.Clear();\r
for (var i = 0; i < ShipListPanel.GroupCount; i++)\r
RestoreLocation();\r
if (_config.HideOnMinimized && WindowState == FormWindowState.Minimized)\r
ShowInTaskbar = false;\r
+ if (_config.ShowHpInPercent)\r
+ _shipLabels.ToggleHpPercent();\r
ApplyConfig();\r
ApplyDebugLogSetting();\r
ApplyLogSetting();\r
e.Cancel = false;\r
_sniffer.FlashLog();\r
_config.Location = (WindowState == FormWindowState.Normal ? Bounds : RestoreBounds).Location;\r
+ _config.ShowHpInPercent = _shipLabels.ShowHpInPercent;\r
_config.Save();\r
_proxyManager.Shutdown();\r
_kancolleDb.Stop();\r
private readonly ShipLabel[][] _ndockLabels = new ShipLabel[DockInfo.DockCount][];\r
public static Color[] ColumnColors = {SystemColors.Control, Color.FromArgb(255, 250, 250, 250)};\r
private readonly List<ShipLabel> _hpLables = new List<ShipLabel>();\r
+ public bool ShowHpInPercent { get; private set; }\r
\r
public void CreateShipLabels(Control parent, EventHandler onClick)\r
{\r
}\r
_hpLables.AddRange(shipLabels.Select(labels => labels[0]));\r
headings[0].Cursor = Cursors.Hand;\r
- headings[0].Click += (sender, ev) =>\r
- {\r
- foreach (var label in _hpLables)\r
- label.ToggleHpPercent();\r
- };\r
+ headings[0].Click += (sender, ev) => ToggleHpPercent();\r
parent.ResumeLayout();\r
}\r
\r
+ public void ToggleHpPercent()\r
+ {\r
+ ShowHpInPercent = !ShowHpInPercent;\r
+ foreach (var label in _hpLables)\r
+ label.ToggleHpPercent();\r
+ }\r
+\r
public void SetShipLabels(ShipStatus[] statuses)\r
{\r
SetShipLabels(statuses, statuses.Length == 7 ? _shipLabels7 : _shiplabels);\r
private readonly List<Panel> _repairPanelList = new List<Panel>();\r
private readonly List<ShipLabel> _hpLabels = new List<ShipLabel>();\r
private string _mode;\r
+ public bool ShowHpInPercent { get; private set; }\r
\r
public const int GroupCount = 4;\r
public HashSet<int>[] GroupSettings { get; } = new HashSet<int>[GroupCount];\r
\r
public void ToggleHpPercent()\r
{\r
+ ShowHpInPercent = !ShowHpInPercent;\r
foreach (var label in _hpLabels)\r
label.ToggleHpPercent();\r
}\r