@Override public void run() { if (this.main.getShell().isDisposed()) { return; } // タブを更新する CTabItem maintab = this.main.getTabFolder().getItem(0); maintab.setToolTipText( "装備:" + GlobalContext.getItemMap().size() + "/" + GlobalContext.maxSlotitem() + " 艦娘:" + GlobalContext.getShipMap().size() + "/" + GlobalContext.maxChara()); boolean combinedFleetBadlyDamaed = false; if (GlobalContext.isCombined()) { combinedFleetBadlyDamaed = GlobalContext.getDock("1").isBadlyDamaged() || GlobalContext.getDock("2").isBadlyDamaged(); } List<ShipDto> badlyDamaged = new ArrayList<>(); FleetWindow[] fleetWindows = this.main.getFleetWindows(); for (int i = 0; i < fleetWindows.length; i++) { fleetWindows[i].updateFleet(combinedFleetBadlyDamaed, badlyDamaged); } this.postFatal(badlyDamaged); }
@Override public void run() { if (this.main.getShell().isDisposed()) { return; } Button shipList = this.main.getShipList(); String setText = "所有艦娘(" + GlobalContext.getShipMap().size() + "/" + GlobalContext.maxChara() + ")"; if (setText.equals(shipList.getText())) { return; } shipList.setText(setText); shipList.getParent().layout(); if (AppConfig.get().isUseTaskbarNotify()) { TaskItem item = SwtUtils.getTaskBarItem(this.main.getShell()); if (item != null) { int max = GlobalContext.maxChara(); int size = GlobalContext.getShipMap().size(); int locked = 0; for (Entry<Integer, ShipDto> entry : GlobalContext.getShipMap().entrySet()) { if (entry.getValue().getLocked()) { locked++; } } int r = Math.round(((float) (size - locked) / (float) (max - locked)) * 100); item.setProgress(r); if (max <= (size + AppConfig.get().getNotifyFully())) { item.setProgressState(SWT.PAUSED); } else { item.setProgressState(SWT.NORMAL); } } } }