├── .github └── workflows │ ├── dotnet-build-and-test.yml │ └── dotnet-publish.yml ├── .gitignore ├── AutoUpdater ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── AutoUpdater.csproj ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── MainWindowModel.cs ├── P2PQuakeCommunicator.cs ├── Program.cs ├── Properties │ └── PublishProfiles │ │ └── FolderProfile.pubxml └── Resources │ ├── icon.ico │ └── icon.png ├── CLI ├── CLI.csproj ├── Command │ ├── EEWSubCommand.cs │ ├── LoggerCommand.cs │ ├── MapCommand.cs │ ├── PublisherCommand.cs │ ├── QuakeSubCommand.cs │ ├── ServerSubCommand.cs │ ├── TsunamiSubCommand.cs │ └── UserquakeSubCommand.cs ├── Grpc │ ├── Server.cs │ └── Services │ │ ├── ObserverService.cs │ │ └── OperatorService.cs ├── Observers │ ├── DummyObserver.cs │ ├── GrpcObserver.cs │ ├── IObserver.cs │ ├── ObserverFactory.cs │ └── PrintObserver.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Protos │ ├── observer.proto │ └── operator.proto └── appsettings.json ├── Client.sln ├── Client ├── App │ ├── IMediatorContext.cs │ ├── IOperatable.cs │ ├── IPeerConfig.cs │ ├── IPeerState.cs │ ├── MaintainTimer.cs │ ├── MediatorContext.cs │ ├── State │ │ ├── AbstractState.cs │ │ ├── ConnectedState.cs │ │ ├── ConnectingState.cs │ │ ├── DisconnectedState.cs │ │ ├── DisconnectingState.cs │ │ └── MaintenanceState.cs │ └── Userquake │ │ ├── Aggregator.cs │ │ ├── AreaPositions.cs │ │ └── UserquakeEvaluateEventArgs.cs ├── Application.Designer.cs ├── Application.settings ├── AssemblyInfo.cs ├── Client.csproj ├── Client │ ├── ClientContext.cs │ ├── General │ │ ├── ClientConst.cs │ │ ├── KeyData.cs │ │ └── ServerPoint.cs │ ├── IClientContext.cs │ ├── IClientContextForState.cs │ └── State │ │ ├── AbstractState.cs │ │ ├── ConnectedState.cs │ │ ├── EndConnectionState.cs │ │ ├── FinishedState.cs │ │ ├── IFinishedState.cs │ │ ├── NotifyProtocolVersionState.cs │ │ ├── PeerEchoState.cs │ │ ├── RequireAllocateKeyState.cs │ │ ├── RequireAreaPeersState.cs │ │ ├── RequirePartState.cs │ │ ├── RequirePeerDataState.cs │ │ ├── RequirePeerIdState.cs │ │ ├── RequirePortScanState.cs │ │ ├── RequireProtocolTimeState.cs │ │ ├── RequireReallocateKeyState.cs │ │ └── RequireTemporaryPeerIdState.cs ├── Common │ ├── General │ │ ├── Const.cs │ │ ├── Logger.cs │ │ └── PeerData.cs │ └── Net │ │ ├── AsyncListener.cs │ │ ├── CRLFSocket.cs │ │ ├── ISocket.cs │ │ ├── Packet.cs │ │ ├── SocketAdapter.cs │ │ └── UPnP │ │ └── UPnPUtil.cs └── Peer │ ├── Context.cs │ ├── General │ ├── Code.cs │ └── PeerConst.cs │ ├── IPeerConnector.cs │ ├── IPeerContext.cs │ ├── Manager │ ├── DuplicateRemover.cs │ ├── NetworkInquiryManager.cs │ ├── Peer.cs │ ├── PeerManager.cs │ └── UserquakeDuplicateRemover.cs │ └── State │ ├── AbstractState.cs │ └── GeneralState.cs ├── ClientTest ├── App │ ├── MaintainTimerTest.cs │ ├── MediatorContextCalcProtocolTimeTest.cs │ ├── MediatorContextUserquakeTest.cs │ └── Userquake │ │ ├── AggregatorMultithreadTest.cs │ │ ├── AggregatorTest.cs │ │ └── UserquakeEvaluateEventArgsTest.cs ├── ClientTest.csproj ├── Common │ └── Net │ │ ├── CRLFSocketParseTest.cs │ │ ├── CRLFSocketTest.cs │ │ └── UPnP │ │ └── UPnPUtilTest.cs ├── Peer │ └── Manager │ │ ├── NetworkInquiryManagerTest.cs │ │ ├── PeerManagerRaiseDataEventTest.cs │ │ ├── PeerManagerTest.cs │ │ └── PeerReadLineTest.cs ├── SampleTest.cs └── TestData │ └── Peer │ └── Manager │ └── PeerManagerRaiseDataEventTest_Smoke.txt ├── DummyPeer ├── DummyPeer.csproj ├── Peer │ ├── Context.cs │ └── RandomSender.cs ├── Program.cs ├── README.md └── ServerCrypto │ ├── DataSigner.cs │ ├── KeyDefine.cs │ ├── KeyGenerator.cs │ ├── PacketSigner.cs │ └── PeerKey.cs ├── IPC ├── IPC.cs └── IPC.csproj ├── JsonApi ├── BasicData.cs ├── Client.cs ├── EEW.cs ├── EEWDetection.cs ├── JMAQuake.cs ├── JMATsunami.cs ├── JsonApi.csproj ├── JsonApiConverterWithTypeDiscriminator.cs ├── UnknownData.cs └── UserquakeEvaluation.cs ├── LICENSE ├── LambdaMetricsCollector ├── Function.cs ├── LambdaMetricsCollector.csproj └── Properties │ ├── PublishProfiles │ └── FolderProfile.pubxml │ └── launchSettings.json ├── LegacyPluginSupporter ├── LegacyPluginSupporter.csproj ├── Manager.cs ├── Net │ ├── CRLFSocket.cs │ └── Packet.cs ├── Plugin.cs └── Program.cs ├── LegacyPluginSupporterTest ├── LegacyPluginSupporterTest.csproj ├── ManagerTest.cs └── Usings.cs ├── Map ├── Controller │ └── MapDrawer.cs ├── FontResource.Designer.cs ├── FontResource.resx ├── ImageResource.Designer.cs ├── ImageResource.resx ├── Map.csproj ├── Model │ ├── AbstractDrawer.cs │ ├── AreapeersDrawer.cs │ ├── EEWAreas.cs │ ├── EEWConverter.cs │ ├── EEWDrawer.cs │ ├── GeoJson.cs │ ├── HypocenterDrawer.cs │ ├── MapLoader.cs │ ├── ObservationAreas.cs │ ├── ObservationAreasDrawer.cs │ ├── ObservationPointsDrawer.cs │ ├── StationNameShorter.cs │ ├── Stations.cs │ ├── Transformation.cs │ ├── TsunamiAreas.cs │ ├── TsunamiAreasDrawer.cs │ ├── UserquakeAreas.cs │ └── UserquakeDrawer.cs ├── PointResource.Designer.cs ├── PointResource.resx ├── Program.cs └── Resources │ ├── Fonts │ ├── LICENSE_RobotoMono.txt │ ├── RobotoMono-Bold.ttf │ └── RobotoMono-Regular.ttf │ ├── Images │ ├── confidence.xcf │ ├── confidence_A.png │ ├── confidence_B.png │ ├── confidence_C.png │ ├── confidence_D.png │ ├── confidence_E.png │ ├── confidence_F.png │ ├── description.png │ ├── quake_note.png │ ├── scale.xcf │ ├── scaleMap.xcf │ ├── scale_10.png │ ├── scale_20.png │ ├── scale_30.png │ ├── scale_40.png │ ├── scale_45.png │ ├── scale_46.png │ ├── scale_50.png │ ├── scale_55.png │ ├── scale_60.png │ ├── scale_70.png │ ├── tsunamiCategoryMap.svg │ ├── tsunami_note_advisory.png │ ├── tsunami_note_majorwarning.png │ ├── tsunami_note_warning.png │ └── userquake_note.png │ ├── Maps │ ├── COPYING.LESSERv3 │ ├── COPYINGv3 │ ├── LICENSE.TXT │ ├── README.md │ ├── japan-gsi_1024-8bit.png │ ├── japan-gsi_2048-8bit.png │ ├── japan-gsi_4096-8bit.png │ ├── japan-gsi_8192-8bit.png │ ├── japan-large-gsimaps.xcfbz2 │ ├── japan-small-gsimaps.xcfbz2 │ ├── japan.png │ ├── japan_gmt.eps │ ├── japan_gmt_3200dpi.xcfbz2 │ ├── world_1024.png │ ├── world_242.png │ ├── world_512.png │ └── world_640.png │ └── Points │ ├── Areas.csv │ ├── EEWPrefs2EarthquakeAreaCodes.csv │ ├── EarthquakeAreaCodes.csv │ ├── README.md │ ├── Stations.csv │ ├── TsunamiAreaCodes.csv │ ├── UserquakeAreas.csv │ ├── UserquakeAreas2EarthquakeAreaCodes.csv │ ├── earthquake.json │ ├── earthquake_0.json │ ├── earthquake_1.json │ ├── earthquake_2.json │ ├── earthquake_3.json │ ├── earthquake_4.json │ ├── earthquake_5.json │ ├── earthquake_6.json │ ├── earthquake_7.json │ ├── earthquake_8.json │ ├── earthquake_9.json │ ├── tsunami.json │ └── userquake.json ├── MapTest ├── EarthquakeDrawTest.cs ├── Internationalization.cs ├── MapTest.csproj ├── StationsShorteningTest.cs ├── TestData │ └── ShorteningTest.csv ├── TsunamiDrawTest.cs └── UserquakeDrawTest.cs ├── PKCSPeerCrypto ├── PKCSPeerCrypto.csproj ├── Properties │ └── launchSettings.json ├── Signer.cs └── Verifier.cs ├── PKCSPeerCryptoTest ├── PKCSPeerCryptoTest.csproj ├── Properties │ └── launchSettings.json ├── SampleTest.cs ├── SignerTest.cs └── VerifierTest.cs ├── Updater ├── UpdateClient.cs ├── UpdateEntry.cs └── Updater.csproj └── WpfClient ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── Configuration.cs ├── EEWVoice.Designer.cs ├── EEWVoice.resx ├── EPSPDataView ├── DetailItemView.cs ├── EPSPEEWTestView.cs ├── EPSPEEWView.cs ├── EPSPQuakeView.cs ├── EPSPTsunamiView.cs ├── EPSPUserquakeView.cs └── Factory.cs ├── InformationViewModel.cs ├── License.Designer.cs ├── License.resx ├── LicenseViewModel.cs ├── LicenseWindow.xaml ├── LicenseWindow.xaml.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Notifications ├── Activator.cs ├── Notifier.cs ├── SoundPlayer.cs └── SoundPlayerEEW.cs ├── Pages ├── Information.xaml ├── Information.xaml.cs ├── InformationTemplateSelector.cs ├── Informations │ ├── DetailDescriptionTemplateSelector.cs │ ├── EEW.xaml │ ├── EEW.xaml.cs │ ├── EEWCancelled.xaml │ ├── EEWCancelled.xaml.cs │ ├── EEWTest.xaml │ ├── EEWTest.xaml.cs │ ├── Earthquake.xaml │ ├── Earthquake.xaml.cs │ ├── Tsunami.xaml │ ├── Tsunami.xaml.cs │ ├── TsunamiCategoryText.xaml │ ├── TsunamiCategoryText.xaml.cs │ ├── Unknown.xaml │ ├── Unknown.xaml.cs │ ├── Userquake.xaml │ └── Userquake.xaml.cs ├── Setting.xaml ├── Setting.xaml.cs ├── Status.xaml └── Status.xaml.cs ├── Program.cs ├── Properties └── PublishProfiles │ └── FolderProfile.pubxml ├── Resource.Designer.cs ├── Resource.resx ├── Resources ├── Examples │ └── japan_1024.png ├── Icons │ ├── eruption.svg │ ├── eruption_black.png │ ├── eruption_white.png │ ├── icon.svg │ ├── p2pquake.ico │ ├── tsunami.svg │ ├── tsunami_black.png │ ├── tsunami_gray.png │ ├── tsunami_red.png │ ├── tsunami_white.png │ ├── tsunami_yellow.png │ ├── userquake.svg │ ├── userquake_black.png │ ├── userquake_gray.png │ ├── userquake_red.png │ ├── userquake_white.png │ └── userquake_yellow.png ├── MapOverlays │ ├── description.png │ ├── loading.png │ ├── loading.xcf │ ├── quake_note.png │ ├── tsunami_note_advisory.png │ ├── tsunami_note_majorwarning.png │ ├── tsunami_note_warning.png │ └── userquake_note.png ├── Scales │ ├── scale_10.png │ ├── scale_20.png │ ├── scale_30.png │ ├── scale_40.png │ ├── scale_45.png │ ├── scale_46.png │ ├── scale_50.png │ ├── scale_55.png │ ├── scale_60.png │ └── scale_70.png ├── Sounds │ ├── EEW │ │ ├── 160.mp3 │ │ ├── 161.mp3 │ │ ├── 162.mp3 │ │ ├── 163.mp3 │ │ ├── 164.mp3 │ │ ├── 165.mp3 │ │ ├── 166.mp3 │ │ ├── 167.mp3 │ │ ├── 168.mp3 │ │ ├── 169.mp3 │ │ ├── 170.mp3 │ │ ├── 171.mp3 │ │ ├── 172.mp3 │ │ ├── 173.mp3 │ │ ├── 174.mp3 │ │ ├── 175.mp3 │ │ ├── 176.mp3 │ │ ├── 177.mp3 │ │ ├── 178.mp3 │ │ ├── 179.mp3 │ │ ├── 180.mp3 │ │ ├── 181.mp3 │ │ ├── 182.mp3 │ │ ├── 183.mp3 │ │ ├── 184.mp3 │ │ ├── 185.mp3 │ │ ├── 186.mp3 │ │ ├── 187.mp3 │ │ ├── 188.mp3 │ │ ├── 189.mp3 │ │ ├── 190.mp3 │ │ ├── 191.mp3 │ │ ├── 192.mp3 │ │ ├── 193.mp3 │ │ ├── 194.mp3 │ │ ├── 195.mp3 │ │ ├── 196.mp3 │ │ ├── 197.mp3 │ │ ├── 198.mp3 │ │ ├── 199.mp3 │ │ ├── 360.mp3 │ │ ├── 361.mp3 │ │ ├── 362.mp3 │ │ ├── 363.mp3 │ │ ├── 364.mp3 │ │ ├── 365.mp3 │ │ ├── 366.mp3 │ │ ├── 367.mp3 │ │ ├── 368.mp3 │ │ ├── 369.mp3 │ │ ├── 370.mp3 │ │ ├── 371.mp3 │ │ ├── 372.mp3 │ │ ├── 373.mp3 │ │ ├── 374.mp3 │ │ ├── 375.mp3 │ │ ├── EEW_VOICEVOXproject.vvproj │ │ ├── announce_areas.mp3 │ │ ├── eew.mp3 │ │ ├── eew_cancelled.mp3 │ │ ├── eew_followup.mp3 │ │ └── guidance.mp3 │ ├── EEW_Beta.mp3 │ ├── P2PQ_Snd0.mp3 │ ├── P2PQ_Snd1.mp3 │ ├── P2PQ_Snd2.mp3 │ ├── P2PQ_Snd3.mp3 │ ├── P2PQ_Snd4.mp3 │ ├── P2PQ_Snd9.mp3 │ └── P2PQ_Sndt.mp3 └── Specifications │ └── epsp-area.csv ├── RootViewModel.cs ├── SettingViewModel.cs ├── StatusViewModel.cs ├── Updater.cs ├── Utils ├── ScaleConverter.cs └── TsunamiCategoryConverter.cs └── WpfClient.csproj /.github/workflows/dotnet-build-and-test.yml: -------------------------------------------------------------------------------- 1 | name: dotnet build and test 2 | 3 | on: 4 | - push 5 | - pull_request 6 | 7 | # See: https://docs.microsoft.com/ja-jp/dotnet/devops/dotnet-test-github-action 8 | # https://docs.microsoft.com/ja-jp/aspnet/core/host-and-deploy/visual-studio-publish-profiles?view=aspnetcore-5.0#folder-publish-example 9 | # https://github.com/actions/cache/blob/main/examples.md#c---nuget 10 | 11 | env: 12 | NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages 13 | 14 | jobs: 15 | on-windows: 16 | runs-on: windows-latest 17 | steps: 18 | - uses: actions/checkout@v4 19 | - uses: actions/cache@v4 20 | with: 21 | path: ${{ github.workspace }}/.nuget/packages 22 | key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} 23 | restore-keys: | 24 | ${{ runner.os }}-nuget- 25 | - name: Setup .NET 6.0 26 | uses: actions/setup-dotnet@v4 27 | with: 28 | dotnet-version: | 29 | 6.0.x 30 | - name: Build 31 | run: dotnet build 32 | - name: Test 33 | run: dotnet test 34 | on-ubuntu: 35 | runs-on: ubuntu-latest 36 | steps: 37 | - uses: actions/checkout@v4 38 | - uses: actions/cache@v4 39 | with: 40 | path: ${{ github.workspace }}/.nuget/packages 41 | key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} 42 | restore-keys: | 43 | ${{ runner.os }}-nuget- 44 | - name: Setup .NET 6.0 45 | uses: actions/setup-dotnet@v4 46 | with: 47 | dotnet-version: | 48 | 6.0.x 49 | - name: Build 50 | run: dotnet build --configuration DebugExcludeWPF 51 | - name: Test 52 | run: dotnet test --configuration DebugExcludeWPF 53 | 54 | -------------------------------------------------------------------------------- /.github/workflows/dotnet-publish.yml: -------------------------------------------------------------------------------- 1 | name: dotnet publish 2 | 3 | on: 4 | push: 5 | tags: 6 | - v* 7 | 8 | # See: https://docs.microsoft.com/ja-jp/dotnet/devops/dotnet-test-github-action 9 | # https://docs.microsoft.com/ja-jp/aspnet/core/host-and-deploy/visual-studio-publish-profiles?view=aspnetcore-6.0#folder-publish-example 10 | jobs: 11 | build: 12 | runs-on: windows-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Setup .NET 6.0 16 | uses: actions/setup-dotnet@v4 17 | with: 18 | dotnet-version: | 19 | 6.0.x 20 | - name: Publish AutoUpdater 21 | run: dotnet publish .\AutoUpdater\AutoUpdater.csproj /p:Configuration=Release /p:PublishProfile=FolderProfile 22 | - name: Publish WpfClient 23 | run: dotnet publish .\WpfClient\WpfClient.csproj /p:Configuration=Release /p:PublishProfile=FolderProfile 24 | - name: Collect package files 25 | run: | 26 | powershell Copy-Item -Path .\AutoUpdater\bin\Release\net6.0-windows\publish\P2PQuakeAutoUpdater.exe -Destination .\WpfClient\bin\Release\net6.0-windows10.0.18362.0\publish\ 27 | - name: Package 28 | run: | 29 | powershell Move-Item .\WpfClient\bin\Release\net6.0-windows10.0.18362.0\publish .\P2PQuake_${{ github.ref_name }}; Compress-Archive -Path .\P2PQuake_${{ github.ref_name }} -DestinationPath .\P2PQuake_${{ github.ref_name }}.zip 30 | - name: Release 31 | uses: softprops/action-gh-release@v2 32 | with: 33 | files: P2PQuake_${{ github.ref_name }}.zip 34 | -------------------------------------------------------------------------------- /AutoUpdater/App.xaml: -------------------------------------------------------------------------------- 1 |  5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AutoUpdater/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace AutoUpdater 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | protected override void OnStartup(StartupEventArgs e) 17 | { 18 | base.OnStartup(e); 19 | 20 | MainWindow = new MainWindow(); 21 | MainWindow.Show(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AutoUpdater/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /AutoUpdater/AutoUpdater.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net6.0-windows 6 | true 7 | Resources\icon.ico 8 | P2PQuakeAutoUpdater 9 | 3.5.3 10 | P2PQuake development team 11 | P2PQuake development team 12 | P2P地震情報 アップデーター 13 | https://www.p2pquake.net/ 14 | https://github.com/p2pquake/epsp-peer-cs 15 | ja-JP 16 | 3.5.0.3 17 | 3.5.0.3 18 | AutoUpdater.Program 19 | 20 | 21 | 22 | embedded 23 | true 24 | 25 | 26 | 27 | DEBUG;TRACE 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | MSBuild:Compile 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /AutoUpdater/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |