Skip to content

mgprona/newTotalpoint

Repository files navigation

newTotalpoint — โปรแกรมจัดการหมุดหลักเขต

โปรแกรม Desktop สำหรับนำเข้าข้อมูลรังวัดสำรวจ คำนวณพิกัด และส่งออกไฟล์ SCR/TXT สำหรับงานสำรวจหมุดหลักเขต


คุณสมบัติหลัก

  • นำเข้าไฟล์ข้อมูลรังวัด — อ่านไฟล์ TXT ภาษาไทย แยก สถานี, ธงหลัง, มุม และระยะทาง
  • คำนวณพิกัด — แปลงพิกัดเชิงขั้ว (มุม + ระยะ) เป็น Cartesian พร้อม simulate ค่าความคลาดเคลื่อน
  • ส่งออกไฟล์ SCR — สร้างไฟล์ survey instrument ตั้งชื่ออัตโนมัติ S{DDMMYY}{counter}
  • ส่งออกไฟล์ TXT — บันทึกข้อมูลจุดสำรวจรูปแบบ pipe-delimited
  • แก้ไขชื่อจุด — ดับเบิลคลิกที่รายการเพื่อแก้ไขชื่อจุดสำรวจ

Tech Stack

รายการ รายละเอียด
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

การใช้งาน

1. กรอกข้อมูลหัว

  • Station — ชื่อสถานีตั้งกล้อง (เช่น X2311995, 9701, /1000001)
  • Backshot — ชื่อธงหลัง (รูปแบบเดียวกับ Station)
  • Distance — ระยะทางธงหลัง (ตัวเลข > 0)

2. นำเข้าข้อมูล

กด Import เลือกไฟล์ TXT ที่มีข้อมูลรังวัด

3. คำนวณ

กด Calculate เพื่อสร้างผลลัพธ์ SCR ใน Output

4. ส่งออก

  • Create SCR — บันทึกไฟล์ .scr
  • Export TXT — บันทึกไฟล์ .txt

การ Build & Run

Build:

dotnet build
dotnet build --configuration Release

Run:

dotnet run

Publish (standalone .exe):

dotnet publish --configuration Release --runtime win-x64

ไฟล์ที่ได้จะอยู่ใน publish/


รูปแบบไฟล์ TXT ที่รองรับ

ไฟล์นำเข้าต้องมีบรรทัด keyword ภาษาไทย เช่น:

ตั้งกล้อง X2311995
ธงหลัง    9701
ระยะ      123.456
...

Output SCR

ผลลัพธ์จะแสดงสีตามประเภท:

Keyword สี ความหมาย
STA แดง Station (สถานีตั้งกล้อง)
BS น้ำเงิน Backsight (ธงหลัง)
SS ทอง Sideshot (จุดสำรวจ)

ความต้องการระบบ

  • Windows 10 หรือสูงกว่า
  • .NET 10.0 Runtime (หรือใช้ standalone publish ไม่ต้องติดตั้ง runtime เพิ่ม)

ผู้พัฒนา

[Mennz]

About

โปรแกรมจัดการหมุดหลักเขตสำหรับช่างโยงครบวงจรเวอร์ชั่นปรับปรุง

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages