Files
HECO2/DL_Air Planner 사양/AirPlanner/HomeView.xaml.cs
T
jeon 5a96a696b1 chore: HERV 통합 저장소 초기 커밋
- 펌웨어(program), C# 대시보드(TestProgram), 시뮬레이터(Simulator),
  프로토콜/문서(Protocol, doc) 전체를 단일 저장소로 통합
- program 폴더의 별도 git 저장소를 제거하고 통합 저장소에 흡수
- 빌드 산출물(program/build, bin/obj, *.o/.elf/.bin/.hex 등) .gitignore 처리
- 사내 Synology NAS Git 원격 연결 예정

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 21:44:23 +09:00

30 lines
883 B
C#

using System;
using System.Windows.Controls;
using System.Windows.Threading;
namespace AirPlanner
{
public partial class HomeView : UserControl
{
readonly DispatcherTimer _clock = new() { Interval = TimeSpan.FromSeconds(10) };
public HomeView()
{
InitializeComponent();
_clock.Tick += (_, _) => UpdateClock();
_clock.Start();
UpdateClock();
Unloaded += (_, _) => _clock.Stop();
}
void UpdateClock()
{
var n = DateTime.Now;
string[] dow = { "일", "월", "화", "수", "목", "금", "토" };
string ap = n.Hour < 12 ? "오전" : "오후";
int h12 = n.Hour % 12; if (h12 == 0) h12 = 12;
txtClock.Text = $"{n.Month}월 {n.Day}일 ({dow[(int)n.DayOfWeek]}) {ap} {h12}시 {n.Minute:00}분";
}
}
}