โปรแกรม Desktop สำหรับนำเข้าข้อมูลรังวัดสำรวจ คำนวณพิกัด และส่งออกไฟล์ SCR/TXT สำหรับงานสำรวจหมุดหลักเขต
- นำเข้าไฟล์ข้อมูลรังวัด — อ่านไฟล์ TXT ภาษาไทย แยก สถานี, ธงหลัง, มุม และระยะทาง
- คำนวณพิกัด — แปลงพิกัดเชิงขั้ว (มุม + ระยะ) เป็น Cartesian พร้อม simulate ค่าความคลาดเคลื่อน
- ส่งออกไฟล์ SCR — สร้างไฟล์ survey instrument ตั้งชื่ออัตโนมัติ
S{DDMMYY}{counter} - ส่งออกไฟล์ TXT — บันทึกข้อมูลจุดสำรวจรูปแบบ pipe-delimited
- แก้ไขชื่อจุด — ดับเบิลคลิกที่รายการเพื่อแก้ไขชื่อจุดสำรวจ
| รายการ | รายละเอียด |
|---|---|
| Language | C# (Nullable, File-scoped types) |
| Framework | .NET 10.0 (Windows) |
| UI | WPF + XAML |
| Pattern | MVVM + Dependency Injection |
| Dependencies | ไม่มี NuGet ภายนอก |
newTotalpoint/
├── Models/
│ └── SurveyPoint.cs # ข้อมูลจุดสำรวจ (Name, Angle, Distance)
├── Services/
│ ├── ISurveyCalculationService.cs
│ ├── SurveyCalculationService.cs # ตรรกะคำนวณหลัก
│ ├── IFileService.cs
│ └── FileService.cs # OpenFileDialog / SaveFileDialog
├── ViewModels/
│ ├── MainViewModel.cs # MVVM logic และ Commands
│ └── RelayCommand.cs
├── Views/
│ ├── MainWindow.xaml # UI หลัก
│ ├── MainWindow.xaml.cs # Syntax highlighting (STA/BS/SS)
│ ├── EditPointDialog.xaml
│ └── EditPointDialog.xaml.cs
├── Styles/
│ └── AppStyles.xaml # Theme สี Navy/Blue
└── Assets/
└── 12time.ico
- Station — ชื่อสถานีตั้งกล้อง (เช่น
X2311995,9701,/1000001) - Backshot — ชื่อธงหลัง (รูปแบบเดียวกับ Station)
- Distance — ระยะทางธงหลัง (ตัวเลข > 0)
กด Import เลือกไฟล์ TXT ที่มีข้อมูลรังวัด
กด Calculate เพื่อสร้างผลลัพธ์ SCR ใน Output
- Create SCR — บันทึกไฟล์
.scr - Export TXT — บันทึกไฟล์
.txt
Build:
dotnet build
dotnet build --configuration ReleaseRun:
dotnet runPublish (standalone .exe):
dotnet publish --configuration Release --runtime win-x64ไฟล์ที่ได้จะอยู่ใน publish/
ไฟล์นำเข้าต้องมีบรรทัด keyword ภาษาไทย เช่น:
ตั้งกล้อง X2311995
ธงหลัง 9701
ระยะ 123.456
...
ผลลัพธ์จะแสดงสีตามประเภท:
| Keyword | สี | ความหมาย |
|---|---|---|
STA |
แดง | Station (สถานีตั้งกล้อง) |
BS |
น้ำเงิน | Backsight (ธงหลัง) |
SS |
ทอง | Sideshot (จุดสำรวจ) |
- Windows 10 หรือสูงกว่า
- .NET 10.0 Runtime (หรือใช้ standalone publish ไม่ต้องติดตั้ง runtime เพิ่ม)
[Mennz]