| | |
| | | JOptionPane.showMessageDialog(this, "写入障碍物配置失败,请重试", "错误", JOptionPane.ERROR_MESSAGE); |
| | | return; |
| | | } |
| | | |
| | | if (!Dikuai.updateField(landNumber, "obstacleCoordinates", coords)) { |
| | | JOptionPane.showMessageDialog(this, "无法更新障碍物坐标", "错误", JOptionPane.ERROR_MESSAGE); |
| | | return; |
| | | } |
| | | if (originalCoords != null) { |
| | | if (!Dikuai.updateField(landNumber, "obstacleOriginalCoordinates", originalCoords)) { |
| | | JOptionPane.showMessageDialog(this, "无法更新障碍物原始坐标", "错误", JOptionPane.ERROR_MESSAGE); |
| | | return; |
| | | } |
| | | } else if (!Dikuai.updateField(landNumber, "obstacleOriginalCoordinates", "-1")) { |
| | | JOptionPane.showMessageDialog(this, "无法重置障碍物原始坐标", "错误", JOptionPane.ERROR_MESSAGE); |
| | | return; |
| | | } |
| | | Dikuai.updateField(landNumber, "updateTime", currentTime()); |
| | | Dikuai.saveToProperties(); |
| | | Dikuaiguanli.notifyExternalCreation(landNumber); |