적정인원보고서 수정
This commit is contained in:
4
Project/Dialog/fDashboard.Designer.cs
generated
4
Project/Dialog/fDashboard.Designer.cs
generated
@@ -38,7 +38,7 @@
|
||||
this.label1.ForeColor = System.Drawing.Color.DimGray;
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(800, 450);
|
||||
this.label1.Size = new System.Drawing.Size(1063, 567);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "요약 화면 구성 중 입니다.\r\n\r\n업무일지는 \"관리->업무일지->목록\" 을 사용하세요";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@@ -48,7 +48,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.ClientSize = new System.Drawing.Size(1063, 567);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "fDashboard";
|
||||
this.Text = "요약";
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
using FCOMMON;
|
||||
using FCM0000.Mail;
|
||||
using FCOMMON;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using Microsoft.Web.WebView2.WinForms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -13,11 +17,65 @@ namespace Project.Dialog
|
||||
{
|
||||
public partial class fDashboard : fBase
|
||||
{
|
||||
private WebView2 webView21;
|
||||
public fDashboard()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitializeWebView2();
|
||||
}
|
||||
private void InitializeWebView2()
|
||||
{
|
||||
// 수동으로 WebView2 컨트롤 생성
|
||||
this.webView21 = new WebView2();
|
||||
|
||||
// 기본 속성 설정
|
||||
this.webView21.CreationProperties = null;
|
||||
this.webView21.DefaultBackgroundColor = Color.White;
|
||||
this.webView21.Dock = DockStyle.Fill;
|
||||
this.webView21.Location = new Point(0, 0);
|
||||
this.webView21.Name = "webView21";
|
||||
this.webView21.Size = new Size(800, 600);
|
||||
this.webView21.TabIndex = 0;
|
||||
this.webView21.ZoomFactor = 1D;
|
||||
|
||||
// 폼에 추가
|
||||
this.Controls.Add(this.webView21);
|
||||
|
||||
// 비동기 초기화
|
||||
InitializeAsync();
|
||||
}
|
||||
private async void InitializeAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
// Fixed Version 경로 설정
|
||||
string runtimePath = Path.Combine(Application.StartupPath, "WebView2Runtime");
|
||||
|
||||
if (Directory.Exists(runtimePath))
|
||||
{
|
||||
var env = await CoreWebView2Environment.CreateAsync(runtimePath);
|
||||
await this.webView21.EnsureCoreWebView2Async(env);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 시스템에 설치된 WebView2 사용
|
||||
await this.webView21.EnsureCoreWebView2Async();
|
||||
}
|
||||
var fn = "intro.html";
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
fn = "dashboard.html";
|
||||
var fi = new System.IO.FileInfo($"view\\{fn}");
|
||||
if(fi.Exists)
|
||||
{
|
||||
webView21.Source = new Uri(fi.FullName);
|
||||
label1.Visible = false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show($"WebView2 초기화 실패: {ex.Message}");
|
||||
}
|
||||
}
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
Reference in New Issue
Block a user