[Phase L5-4] 앱 세션 스냅 (session) 구현
AppSettings.Models.cs (수정):
- AppSession 클래스 신규: Name/Description/Apps/CreatedAt
- SessionApp 클래스 신규: Path/Arguments/Label/SnapPosition/DelayMs
- 스냅 위치 14종: full/left/right/tl~br/center/third-l/c/r/two3-l/r/none
AppSettings.cs (수정):
- [JsonPropertyName("appSessions")] AppSessions 리스트 추가
SessionHandler.cs (신규, ~160줄):
- prefix="session", GetItemsAsync: 목록+필터, new/edit/del 서브커맨드
- ExecuteAsync: 편집기 열기 또는 LaunchSessionAsync 실행
- LaunchSessionAsync: Process.Start → 창 핸들 대기(최대 6초 폴링) → ApplySnapToWindow
- ApplySnapToWindow: P/Invoke(SetWindowPos, ShowWindow, MonitorFromWindow, GetMonitorInfo) + 14종 스냅 좌표 계산
SessionEditorWindow.xaml (신규, ~200줄):
- 타이틀바 + 세션명·설명 TextBox + 앱 목록 영역 + 하단 버튼 바
- SnapPickerPopup: PlacementTarget 코드에서 동적 지정, ContentControl에 StackPanel 14개 옵션
SessionEditorWindow.xaml.cs (신규, ~240줄):
- AppRowUi 내부 모델: Path/Label/SnapPosition/Args/DelayMs + SnapLabelRef 갱신
- BuildRowGrid(): 경로TextBox + 라벨TextBox + 스냅Border(팝업) + 삭제Border
- BtnAddApp: OpenFileDialog → 자동 라벨(파일명)
- BtnSave: 유효 행 필터 → AppSession 구성 → 기존 교체 또는 신규 추가 → Save()
App.xaml.cs (수정):
- Phase L5-4 섹션에 SessionHandler 등록
docs/LAUNCHER_ROADMAP.md (수정):
- L5-4 항목 ✅ 완료 표시 + 구현 상세 기록
빌드: 경고 0, 오류 0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -262,6 +262,54 @@ public class HotkeyAssignment
|
||||
public string Type { get; set; } = "app";
|
||||
}
|
||||
|
||||
// ─── 앱 세션 스냅 ────────────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// 앱 세션: 여러 앱을 지정 레이아웃으로 한번에 실행하는 세트.
|
||||
/// session 핸들러로 저장/로드/실행합니다.
|
||||
/// </summary>
|
||||
public class AppSession
|
||||
{
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("apps")]
|
||||
public List<SessionApp> Apps { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("createdAt")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 세션 내 개별 앱 항목. 실행 경로·인자·스냅 위치를 지정합니다.
|
||||
/// </summary>
|
||||
public class SessionApp
|
||||
{
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("args")]
|
||||
public string Arguments { get; set; } = "";
|
||||
|
||||
/// <summary>표시 이름. 비어 있으면 파일명을 사용합니다.</summary>
|
||||
[JsonPropertyName("label")]
|
||||
public string Label { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 스냅 위치. left / right / tl / tr / bl / br / full / center /
|
||||
/// third-l / third-c / third-r / two3-l / two3-r / none
|
||||
/// </summary>
|
||||
[JsonPropertyName("snap")]
|
||||
public string SnapPosition { get; set; } = "full";
|
||||
|
||||
/// <summary>이 앱을 실행하기 전 대기 시간(ms). 기본값 0.</summary>
|
||||
[JsonPropertyName("delayMs")]
|
||||
public int DelayMs { get; set; } = 0;
|
||||
}
|
||||
|
||||
// ─── 잠금 해제 알림 설정 ───────────────────────────────────────────────────────
|
||||
|
||||
public class ReminderSettings
|
||||
|
||||
Reference in New Issue
Block a user