diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..359cd76 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.preferCSharpExtension": true +} \ No newline at end of file diff --git a/DLL/arControl.Net4.dll b/DLL/arControl.Net4.dll index a470d2a..e378884 100644 Binary files a/DLL/arControl.Net4.dll and b/DLL/arControl.Net4.dll differ diff --git a/DLL/arControl.Net4.pdb b/DLL/arControl.Net4.pdb index 1064679..a930199 100644 Binary files a/DLL/arControl.Net4.pdb and b/DLL/arControl.Net4.pdb differ diff --git a/Project/Dialog/fUnZip.Designer.cs b/Project/Dialog/fUnZip.Designer.cs new file mode 100644 index 0000000..0702c2e --- /dev/null +++ b/Project/Dialog/fUnZip.Designer.cs @@ -0,0 +1,88 @@ +namespace Project.Dialog +{ + partial class fUnZip + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // progressBar1 + // + this.progressBar1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.progressBar1.Location = new System.Drawing.Point(10, 60); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(485, 23); + this.progressBar1.TabIndex = 0; + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Location = new System.Drawing.Point(10, 10); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(485, 25); + this.label1.TabIndex = 1; + this.label1.Text = "label1"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label2 + // + this.label2.Dock = System.Windows.Forms.DockStyle.Top; + this.label2.Location = new System.Drawing.Point(10, 35); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(485, 25); + this.label2.TabIndex = 2; + this.label2.Text = "label2"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // fUnZip + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(505, 93); + this.ControlBox = false; + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.progressBar1); + this.MaximizeBox = false; + this.Name = "fUnZip"; + this.Padding = new System.Windows.Forms.Padding(10); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Groupware Library Patch"; + this.ResumeLayout(false); + + } + + #endregion + + public System.Windows.Forms.ProgressBar progressBar1; + public System.Windows.Forms.Label label1; + public System.Windows.Forms.Label label2; + } +} \ No newline at end of file diff --git a/Project/Dialog/fUnZip.cs b/Project/Dialog/fUnZip.cs new file mode 100644 index 0000000..535d45f --- /dev/null +++ b/Project/Dialog/fUnZip.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Project.Dialog +{ + public partial class fUnZip : Form + { + public fUnZip() + { + InitializeComponent(); + } + } +} diff --git a/Project/Dialog/fUnZip.resx b/Project/Dialog/fUnZip.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Project/Dialog/fUnZip.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Project/Dialog/fWebView2Test.Designer.cs b/Project/Dialog/fWebView2Test.Designer.cs new file mode 100644 index 0000000..e8a3c60 --- /dev/null +++ b/Project/Dialog/fWebView2Test.Designer.cs @@ -0,0 +1,39 @@ +namespace Project.Dialog +{ + partial class fWebView2Test + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "fWebView2Test"; + } + + #endregion + } +} \ No newline at end of file diff --git a/Project/Dialog/fWebView2Test.cs b/Project/Dialog/fWebView2Test.cs new file mode 100644 index 0000000..457689f --- /dev/null +++ b/Project/Dialog/fWebView2Test.cs @@ -0,0 +1,74 @@ +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; +using System.Windows.Forms; +using Microsoft.Web.WebView2.WinForms; +using Microsoft.Web.WebView2.Core; + +namespace Project.Dialog +{ + public partial class fWebView2Test : Form + { + private WebView2 webView21; + + public fWebView2Test() + { + 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(); + } + + this.webView21.CoreWebView2.Navigate("https://www.google.com"); + } + catch (Exception ex) + { + MessageBox.Show($"WebView2 초기화 실패: {ex.Message}"); + } + } + } +} diff --git a/Project/EETGW.csproj b/Project/EETGW.csproj index f14fe35..5c45d96 100644 --- a/Project/EETGW.csproj +++ b/Project/EETGW.csproj @@ -188,6 +188,15 @@ ..\packages\Microsoft.SqlServer.Types.14.0.314.76\lib\net40\Microsoft.SqlServer.Types.dll + + ..\packages\Microsoft.Web.WebView2.1.0.2210.55\lib\net45\Microsoft.Web.WebView2.Core.dll + + + ..\packages\Microsoft.Web.WebView2.1.0.2210.55\lib\net45\Microsoft.Web.WebView2.WinForms.dll + + + ..\packages\Microsoft.Web.WebView2.1.0.2210.55\lib\net45\Microsoft.Web.WebView2.Wpf.dll + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll @@ -205,6 +214,8 @@ + + ..\packages\System.Memory.4.5.5\lib\netstandard1.1\System.Memory.dll @@ -321,6 +332,18 @@ fTouchKeyFull.cs + + Form + + + fUnZip.cs + + + Form + + + fWebView2Test.cs + True True @@ -457,6 +480,9 @@ fTouchKeyFull.cs + + fUnZip.cs + fLog.cs @@ -680,4 +706,11 @@ + + + + 이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다. + + + \ No newline at end of file diff --git a/Project/Program.cs b/Project/Program.cs index 3812916..a46c090 100644 --- a/Project/Program.cs +++ b/Project/Program.cs @@ -2,6 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Windows.Forms; +using System.IO.Compression; +using System.IO; +using System.DirectoryServices; +using System.ServiceModel.Configuration; namespace Project { @@ -15,13 +19,90 @@ namespace Project { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory); // Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); // AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + var fi = new System.IO.FileInfo("WebView2Runtime.zip"); + if (fi.Exists) + { + var existlen = 0; + var webruntimepath = new System.IO.DirectoryInfo("WebView2Runtime"); + if (webruntimepath.Exists) + { + var filen = new System.IO.FileInfo("WebView2Runtime\\version.txt"); + if(filen.Exists) + { + var verstr = System.IO.File.ReadAllText(filen.FullName); + int.TryParse(verstr, out existlen); + } + } + if(existlen != fi.Length) + { + //fi 파일의 압축을 해제한다. + var fprogress = new Dialog.fUnZip(); + fprogress.TopMost = true; + fprogress.Show(); + Application.DoEvents(); + try + { + if (webruntimepath.Exists) + { + fprogress.label1.Text = "기존폴더삭제"; + Application.DoEvents(); + webruntimepath.Delete(true); - + + } + var diruntime = new System.IO.DirectoryInfo("runtimes"); + if (diruntime.Exists) diruntime.Delete(true); + webruntimepath.Create(); + diruntime.Create(); + + using (var archive = ZipFile.OpenRead(fi.FullName)) + { + int totalFiles = archive.Entries.Count; + int currentFile = 0; + long totalSize = archive.Entries.Sum(e => e.Length); + long extractedSize = 0; + + foreach (var entry in archive.Entries) + { + currentFile++; + extractedSize += entry.Length; + int progress = (int)((extractedSize * 100) / totalSize); + + fprogress.label1.Text = $"압축 해제 중... ({currentFile}/{totalFiles})"; + fprogress.label2.Text = $"{entry.FullName} ({progress}%)"; + fprogress.progressBar1.Value = progress; + Application.DoEvents(); + + string destinationPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, entry.FullName); + string destinationDir = Path.GetDirectoryName(destinationPath); + + if (!Directory.Exists(destinationDir)) + Directory.CreateDirectory(destinationDir); + + if (entry.Length > 0) + entry.ExtractToFile(destinationPath, true); + } + } + + System.IO.File.WriteAllText("WebView2Runtime\\version.txt", fi.Length.ToString()); + } + catch (Exception ex) + { + fprogress.Hide(); + MessageBox.Show($"WebView2 Runtime 압축 해제 중 오류가 발생했습니다: {ex.Message}", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + finally { + fprogress.Dispose(); + } + } + } + + + SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory); Application.Run(new fMain()); } diff --git a/Project/app.config b/Project/app.config index 8cbec29..7f92479 100644 --- a/Project/app.config +++ b/Project/app.config @@ -3,26 +3,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/Project/fMain.Designer.cs b/Project/fMain.Designer.cs index b0dda22..a88143d 100644 --- a/Project/fMain.Designer.cs +++ b/Project/fMain.Designer.cs @@ -63,6 +63,7 @@ this.toolStripMenuItem14 = new System.Windows.Forms.ToolStripSeparator(); this.전자실구매승인ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.품목입고ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.월별NRCR기준금액입력ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mn_project = new System.Windows.Forms.ToolStripMenuItem(); this.목록ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.담당자별현황ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -148,7 +149,8 @@ this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.toolStripButton3 = new System.Windows.Forms.ToolStripButton(); - this.월별NRCR기준금액입력ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripSeparator(); + this.webview2TestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.cmTab.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); @@ -429,6 +431,13 @@ this.품목입고ToolStripMenuItem.Text = "품목 입고"; this.품목입고ToolStripMenuItem.Click += new System.EventHandler(this.품목입고ToolStripMenuItem_Click); // + // 월별NRCR기준금액입력ToolStripMenuItem + // + this.월별NRCR기준금액입력ToolStripMenuItem.Name = "월별NRCR기준금액입력ToolStripMenuItem"; + this.월별NRCR기준금액입력ToolStripMenuItem.Size = new System.Drawing.Size(246, 24); + this.월별NRCR기준금액입력ToolStripMenuItem.Text = "월별 NR,CR 기준금액 입력"; + this.월별NRCR기준금액입력ToolStripMenuItem.Click += new System.EventHandler(this.월별NRCR기준금액입력ToolStripMenuItem_Click); + // // mn_project // this.mn_project.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -830,7 +839,9 @@ // this.기타ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.품목검색ToolStripMenuItem, - this.대쉬보드ToolStripMenuItem}); + this.대쉬보드ToolStripMenuItem, + this.toolStripMenuItem17, + this.webview2TestToolStripMenuItem}); this.기타ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("기타ToolStripMenuItem.Image"))); this.기타ToolStripMenuItem.Name = "기타ToolStripMenuItem"; this.기타ToolStripMenuItem.Size = new System.Drawing.Size(65, 23); @@ -839,14 +850,14 @@ // 품목검색ToolStripMenuItem // this.품목검색ToolStripMenuItem.Name = "품목검색ToolStripMenuItem"; - this.품목검색ToolStripMenuItem.Size = new System.Drawing.Size(139, 24); + this.품목검색ToolStripMenuItem.Size = new System.Drawing.Size(180, 24); this.품목검색ToolStripMenuItem.Text = "품목 검색"; this.품목검색ToolStripMenuItem.Click += new System.EventHandler(this.품목검색ToolStripMenuItem_Click); // // 대쉬보드ToolStripMenuItem // this.대쉬보드ToolStripMenuItem.Name = "대쉬보드ToolStripMenuItem"; - this.대쉬보드ToolStripMenuItem.Size = new System.Drawing.Size(139, 24); + this.대쉬보드ToolStripMenuItem.Size = new System.Drawing.Size(180, 24); this.대쉬보드ToolStripMenuItem.Text = "대쉬보드"; this.대쉬보드ToolStripMenuItem.Click += new System.EventHandler(this.대쉬보드ToolStripMenuItem_Click); // @@ -1150,12 +1161,17 @@ this.toolStripButton3.ToolTipText = "휴가신청"; this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click); // - // 월별NRCR기준금액입력ToolStripMenuItem + // toolStripMenuItem17 // - this.월별NRCR기준금액입력ToolStripMenuItem.Name = "월별NRCR기준금액입력ToolStripMenuItem"; - this.월별NRCR기준금액입력ToolStripMenuItem.Size = new System.Drawing.Size(246, 24); - this.월별NRCR기준금액입력ToolStripMenuItem.Text = "월별 NR,CR 기준금액 입력"; - this.월별NRCR기준금액입력ToolStripMenuItem.Click += new System.EventHandler(this.월별NRCR기준금액입력ToolStripMenuItem_Click); + this.toolStripMenuItem17.Name = "toolStripMenuItem17"; + this.toolStripMenuItem17.Size = new System.Drawing.Size(177, 6); + // + // webview2TestToolStripMenuItem + // + this.webview2TestToolStripMenuItem.Name = "webview2TestToolStripMenuItem"; + this.webview2TestToolStripMenuItem.Size = new System.Drawing.Size(180, 24); + this.webview2TestToolStripMenuItem.Text = "Webview2 Test"; + this.webview2TestToolStripMenuItem.Click += new System.EventHandler(this.webview2TestToolStripMenuItem_Click); // // fMain // @@ -1306,6 +1322,8 @@ private System.Windows.Forms.ToolStripMenuItem 업무분류및형태설정ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 대체시간이월ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 월별NRCR기준금액입력ToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripMenuItem17; + private System.Windows.Forms.ToolStripMenuItem webview2TestToolStripMenuItem; } } diff --git a/Project/fMain.cs b/Project/fMain.cs index ad3fad7..f8a2038 100644 --- a/Project/fMain.cs +++ b/Project/fMain.cs @@ -1513,5 +1513,11 @@ namespace Project var f = new FEQ0000.fMonthAmount();//.fJobProcessSelect("", true); f.Show(); } + + private void webview2TestToolStripMenuItem_Click(object sender, EventArgs e) + { + using (var f = new Dialog.fWebView2Test()) + f.ShowDialog(); + } } } diff --git a/Project/fMain.resx b/Project/fMain.resx index eb78462..7976280 100644 --- a/Project/fMain.resx +++ b/Project/fMain.resx @@ -123,9 +123,6 @@ 124, 17 - - 221, 17 - 289, 17 @@ -457,14 +454,14 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPY4CDmcasDEu1MxmW6ixgWKbTwrBYVx0svkqL h2GZViHDMu15QPFWhmXqUmBxDLBUZzVQwX84Xqzzg2GJpifDMs3rKOJLtZ4ADZWA6oKCpVo2IEmBtZb/ - /U7m/E+5XP8/92TF/3lzYj/U9Ob/S73c8D/yXNl/1W1eUEO0+6A6oWCZzgT+NebHkq/Ufyu+1fO/5GbP + /U7m/E+5XP8/92TF/3lzYj/U9OT/S73c8D/yXNl/1W1eUEO0+6A6oWCZzgT+NebHkq/Ufyu+1fO/5GbP /0Mzc/4/6kz7f3VS5k+QGAyb7A49wbBE5xpUJxQs1RUsvtVdB1PUcaj+//XSiP/7W+3/Xi/0+tyzrRBu QPGtrgsg9VCdCFB8s3suTFHlpY5l5wtDDl5Odvt2MUjt/7YKp73FFzs+guQKbva8g2pBBTAXFN3sKQHx X7RGiD8u8/x/JUPrz5NsG7XCm736QNs/F93qOQ/WgA6K7/QYF9/oOg7lMjwu9vR8VOrxH4xLvDxAYkBX lgItagErwAaK73SLQZkMTyq8smAGPKn0zgSJ1d+v58i9NZEPrIAQeFTh2fek3Os/CD8u9+qFChMPgP7f CPdCqccGqDBx4P/+eo4XXVGn3/TE/Qfhl52Rp0BiUGns4N+Bfs2/B3r7/h/oPXP/QO9vIP0fGUPFzoDV - 7O/RgGoDatw2kR0oOP/ipPp/6JpwYZDavwd65oH0Mvzd39uLTRExGKQX6PQ+W6Bpy4ECq0jBID3/DvTZ - AgBdX6p9Y4+DIQAAAABJRU5ErkJggg== + 7O/RgGoDatw2kR0oOP/CxPp/6JpwYZDavwd65oH0Mvzd39uLTRExGKQX6PQ+W6Bpy4ECq0jBID3/DvTZ + AgBXZap4/fGa+QAAAABJRU5ErkJggg== diff --git a/Project/packages.config b/Project/packages.config index 3530ff2..7cfff2d 100644 --- a/Project/packages.config +++ b/Project/packages.config @@ -20,6 +20,7 @@ +