From b4fbc2e5ff5d436eabb568ce6c0af6af89158eea Mon Sep 17 00:00:00 2001 From: XyLe-GBP Date: Tue, 4 Jul 2023 21:42:29 +0900 Subject: [PATCH] Changes in 1.35 --- src/Common.cs | 46 + src/Forms/FormImageConvertTarget.Designer.cs | 101 ++ src/Forms/FormImageConvertTarget.cs | 65 ++ src/Forms/FormImageConvertTarget.en.resx | 120 +++ src/Forms/FormImageConvertTarget.ja.resx | 73 ++ src/Forms/FormImageConvertTarget.resx | 210 +++++ src/Forms/FormImageConvertTarget.zh.resx | 120 +++ src/Forms/FormMain.Designer.cs | 90 +- src/Forms/FormMain.cs | 136 ++- src/Forms/FormMain.ja.resx | 45 +- src/Forms/FormMain.resx | 915 ++++++++----------- src/Forms/FormMain.zh.resx | 42 +- src/Forms/FormSystemInfo.Designer.cs | 320 +++++++ src/Forms/FormSystemInfo.cs | 578 ++++++++++++ src/Forms/FormSystemInfo.en.resx | 120 +++ src/Forms/FormSystemInfo.ja.resx | 163 ++++ src/Forms/FormSystemInfo.resx | 868 ++++++++++++++++++ src/Forms/FormSystemInfo.zh.resx | 120 +++ 18 files changed, 3408 insertions(+), 724 deletions(-) create mode 100644 src/Forms/FormImageConvertTarget.Designer.cs create mode 100644 src/Forms/FormImageConvertTarget.cs create mode 100644 src/Forms/FormImageConvertTarget.en.resx create mode 100644 src/Forms/FormImageConvertTarget.ja.resx create mode 100644 src/Forms/FormImageConvertTarget.resx create mode 100644 src/Forms/FormImageConvertTarget.zh.resx create mode 100644 src/Forms/FormSystemInfo.Designer.cs create mode 100644 src/Forms/FormSystemInfo.cs create mode 100644 src/Forms/FormSystemInfo.en.resx create mode 100644 src/Forms/FormSystemInfo.ja.resx create mode 100644 src/Forms/FormSystemInfo.resx create mode 100644 src/Forms/FormSystemInfo.zh.resx diff --git a/src/Common.cs b/src/Common.cs index e4f425d..fb32155 100644 --- a/src/Common.cs +++ b/src/Common.cs @@ -81,6 +81,8 @@ class Common public static string ManualImageFormat; public static string ManualImageFormatFilter; + public static string ImageConversionExtension; + public static string DLlog, DLInfo; public static string DeletePath, DeletePathFrames, DeletePathFrames2x, DeletePathAudio; public static string FFmpegPath; @@ -1234,6 +1236,50 @@ public static void GetVideoControllerInformation(string[] buffers) } } + public static void GetBaseBoardInformation(string[] buffers) + { + if (buffers.Length != 3) + { + return; + } + else + { + var mc = new ManagementClass("Win32_BaseBoard"); + ManagementObjectCollection moc = mc.GetInstances(); + foreach (ManagementObject mo in moc) + { + buffers[0] = string.Format("{0}", mo["Manufacturer"]); + buffers[1] = string.Format("{0}", mo["Model"]); + buffers[2] = string.Format("{0}", mo["Product"]); + } + } + } + + /// + /// 0:SMBIOSBIOSVersion,1:Manufacturer,2:Name,3:SerialNumber,4:Version + /// + /// + public static void GetBIOSInformation(string[] buffers) + { + if (buffers.Length != 5) + { + return; + } + else + { + var mc = new ManagementClass("Win32_BIOS"); + ManagementObjectCollection moc = mc.GetInstances(); + foreach (ManagementObject mo in moc) + { + buffers[0] = string.Format("{0}", mo["SMBIOSBIOSVersion"]); + buffers[1] = string.Format("{0}", mo["Manufacturer"]); + buffers[2] = string.Format("{0}", mo["Name"]); + buffers[3] = string.Format("{0}", mo["SerialNumber"]); + buffers[4] = string.Format("{0}", mo["Version"]); + } + } + } + public static List GetGraphicsCardNamesInformation() { var clist = new List(); diff --git a/src/Forms/FormImageConvertTarget.Designer.cs b/src/Forms/FormImageConvertTarget.Designer.cs new file mode 100644 index 0000000..2d05882 --- /dev/null +++ b/src/Forms/FormImageConvertTarget.Designer.cs @@ -0,0 +1,101 @@ +namespace NVGE.src.Forms +{ + partial class FormImageConvertTarget + { + /// + /// 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormImageConvertTarget)); + this.label1 = new System.Windows.Forms.Label(); + this.comboBox_Extension = new System.Windows.Forms.ComboBox(); + this.button_OK = new System.Windows.Forms.Button(); + this.button_Cancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // comboBox_Extension + // + resources.ApplyResources(this.comboBox_Extension, "comboBox_Extension"); + this.comboBox_Extension.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox_Extension.FormattingEnabled = true; + this.comboBox_Extension.Items.AddRange(new object[] { + resources.GetString("comboBox_Extension.Items"), + resources.GetString("comboBox_Extension.Items1"), + resources.GetString("comboBox_Extension.Items2"), + resources.GetString("comboBox_Extension.Items3"), + resources.GetString("comboBox_Extension.Items4"), + resources.GetString("comboBox_Extension.Items5"), + resources.GetString("comboBox_Extension.Items6"), + resources.GetString("comboBox_Extension.Items7"), + resources.GetString("comboBox_Extension.Items8"), + resources.GetString("comboBox_Extension.Items9")}); + this.comboBox_Extension.Name = "comboBox_Extension"; + // + // button_OK + // + resources.ApplyResources(this.button_OK, "button_OK"); + this.button_OK.Name = "button_OK"; + this.button_OK.UseVisualStyleBackColor = true; + this.button_OK.Click += new System.EventHandler(this.Button_OK_Click); + // + // button_Cancel + // + resources.ApplyResources(this.button_Cancel, "button_Cancel"); + this.button_Cancel.Name = "button_Cancel"; + this.button_Cancel.UseVisualStyleBackColor = true; + this.button_Cancel.Click += new System.EventHandler(this.Button_Cancel_Click); + // + // FormImageConvertTarget + // + this.AcceptButton = this.button_OK; + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.button_Cancel; + this.ControlBox = false; + this.Controls.Add(this.button_Cancel); + this.Controls.Add(this.button_OK); + this.Controls.Add(this.comboBox_Extension); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "FormImageConvertTarget"; + this.Load += new System.EventHandler(this.FormImageConvertTarget_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox comboBox_Extension; + private System.Windows.Forms.Button button_OK; + private System.Windows.Forms.Button button_Cancel; + } +} \ No newline at end of file diff --git a/src/Forms/FormImageConvertTarget.cs b/src/Forms/FormImageConvertTarget.cs new file mode 100644 index 0000000..e9c5611 --- /dev/null +++ b/src/Forms/FormImageConvertTarget.cs @@ -0,0 +1,65 @@ +using System; +using System.Windows.Forms; + +namespace NVGE.src.Forms +{ + public partial class FormImageConvertTarget : Form + { + public FormImageConvertTarget() + { + InitializeComponent(); + } + + private void FormImageConvertTarget_Load(object sender, EventArgs e) + { + + } + + private void Button_OK_Click(object sender, EventArgs e) + { + switch (comboBox_Extension.SelectedIndex) + { + case 0: + Common.ImageConversionExtension = ".bmp"; + break; + case 1: + Common.ImageConversionExtension = ".eps"; + break; + case 2: + Common.ImageConversionExtension = ".webp"; + break; + case 3: + Common.ImageConversionExtension = ".gif"; + break; + case 4: + Common.ImageConversionExtension = ".ico"; + break; + case 5: + Common.ImageConversionExtension = ".jpeg"; + break; + case 6: + Common.ImageConversionExtension = ".png"; + break; + case 7: + Common.ImageConversionExtension = ".pict"; + break; + case 8: + Common.ImageConversionExtension = ".svg"; + break; + case 9: + Common.ImageConversionExtension = ".tif"; + break; + default: + Common.ImageConversionExtension = ""; + break; + } + Close(); + } + + private void Button_Cancel_Click(object sender, EventArgs e) + { + Common.ImageConversionExtension = ""; + Close(); + } + } +} diff --git a/src/Forms/FormImageConvertTarget.en.resx b/src/Forms/FormImageConvertTarget.en.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/src/Forms/FormImageConvertTarget.en.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/src/Forms/FormImageConvertTarget.ja.resx b/src/Forms/FormImageConvertTarget.ja.resx new file mode 100644 index 0000000..9746122 --- /dev/null +++ b/src/Forms/FormImageConvertTarget.ja.resx @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + 172, 15 + + + 指定した形式を次の形式に変換: + + + キャンセル + + + 変換先の形式を指定 + + \ No newline at end of file diff --git a/src/Forms/FormImageConvertTarget.resx b/src/Forms/FormImageConvertTarget.resx new file mode 100644 index 0000000..e1d4d9d --- /dev/null +++ b/src/Forms/FormImageConvertTarget.resx @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Encapsulated PostScript File/Format (*.eps) + + + System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + + 170, 15 + + + button_OK + + + 450, 23 + + + Select the format to convert to: + + + 476, 41 + + + + 1 + + + $this + + + 75, 23 + + + 644, 71 + + + button_Cancel + + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + + + $this + + + 6, 15 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Joint Photographic Experts Group (*.jpeg) + + + Google webp (*.webp) + + + Cancel + + + Graphics Interchange Format (*.gif) + + + Scalable Vector Graphics (*.svg) + + + 0 + + + 75, 23 + + + 2 + + + 0 + + + comboBox_Extension + + + 3 + + + 557, 41 + + + $this + + + True + + + 7, 15 + + + 3 + + + label1 + + + Specify destination format + + + Bitmap Image (*.bmp) + + + 182, 12 + + + OK + + + Tagged Image File Format (*.tif) + + + Portable Network Graphics (*.png) + + + QuickDraw Picture (*.pict) + + + FormImageConvertTarget + + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + CenterScreen + + + Icon (*.ico) + + + 2 + + + True + + \ No newline at end of file diff --git a/src/Forms/FormImageConvertTarget.zh.resx b/src/Forms/FormImageConvertTarget.zh.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/src/Forms/FormImageConvertTarget.zh.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/src/Forms/FormMain.Designer.cs b/src/Forms/FormMain.Designer.cs index c0d30e5..23dceea 100644 --- a/src/Forms/FormMain.Designer.cs +++ b/src/Forms/FormMain.Designer.cs @@ -50,17 +50,12 @@ private void InitializeComponent() this.changeVideoResolutionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.changeVideoFormatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.changeImageFormatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator(); + this.getSystemInformationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutWaifu2xncnnvulkanGUIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator(); this.checkForUpdatesUToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.label_OS = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label_Graphic = new System.Windows.Forms.Label(); - this.label_Processor = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.button_Merge = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); @@ -70,9 +65,7 @@ private void InitializeComponent() this.label_File = new System.Windows.Forms.Label(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel_Status = new System.Windows.Forms.ToolStripStatusLabel(); - this.comboBox_GPU = new System.Windows.Forms.ComboBox(); this.menuStrip1.SuspendLayout(); - this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_DD)).BeginInit(); this.statusStrip1.SuspendLayout(); @@ -194,7 +187,9 @@ private void InitializeComponent() this.toolsTToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.changeVideoResolutionToolStripMenuItem, this.changeVideoFormatToolStripMenuItem, - this.changeImageFormatToolStripMenuItem}); + this.changeImageFormatToolStripMenuItem, + this.toolStripMenuItem5, + this.getSystemInformationToolStripMenuItem}); this.toolsTToolStripMenuItem.Name = "toolsTToolStripMenuItem"; // // changeVideoResolutionToolStripMenuItem @@ -215,6 +210,17 @@ private void InitializeComponent() this.changeImageFormatToolStripMenuItem.Name = "changeImageFormatToolStripMenuItem"; this.changeImageFormatToolStripMenuItem.Click += new System.EventHandler(this.ChangeImageFormatToolStripMenuItem_Click); // + // toolStripMenuItem5 + // + resources.ApplyResources(this.toolStripMenuItem5, "toolStripMenuItem5"); + this.toolStripMenuItem5.Name = "toolStripMenuItem5"; + // + // getSystemInformationToolStripMenuItem + // + resources.ApplyResources(this.getSystemInformationToolStripMenuItem, "getSystemInformationToolStripMenuItem"); + this.getSystemInformationToolStripMenuItem.Name = "getSystemInformationToolStripMenuItem"; + this.getSystemInformationToolStripMenuItem.Click += new System.EventHandler(this.GetSystemInformationToolStripMenuItem_Click); + // // aboutAToolStripMenuItem // resources.ApplyResources(this.aboutAToolStripMenuItem, "aboutAToolStripMenuItem"); @@ -242,48 +248,6 @@ private void InitializeComponent() this.checkForUpdatesUToolStripMenuItem.Name = "checkForUpdatesUToolStripMenuItem"; this.checkForUpdatesUToolStripMenuItem.Click += new System.EventHandler(this.CheckForUpdatesUToolStripMenuItem_Click); // - // label2 - // - resources.ApplyResources(this.label2, "label2"); - this.label2.Name = "label2"; - // - // label3 - // - resources.ApplyResources(this.label3, "label3"); - this.label3.Name = "label3"; - // - // groupBox1 - // - resources.ApplyResources(this.groupBox1, "groupBox1"); - this.groupBox1.Controls.Add(this.label_OS); - this.groupBox1.Controls.Add(this.label4); - this.groupBox1.Controls.Add(this.label_Graphic); - this.groupBox1.Controls.Add(this.label_Processor); - this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.TabStop = false; - // - // label_OS - // - resources.ApplyResources(this.label_OS, "label_OS"); - this.label_OS.Name = "label_OS"; - // - // label4 - // - resources.ApplyResources(this.label4, "label4"); - this.label4.Name = "label4"; - // - // label_Graphic - // - resources.ApplyResources(this.label_Graphic, "label_Graphic"); - this.label_Graphic.Name = "label_Graphic"; - // - // label_Processor - // - resources.ApplyResources(this.label_Processor, "label_Processor"); - this.label_Processor.Name = "label_Processor"; - // // groupBox2 // resources.ApplyResources(this.groupBox2, "groupBox2"); @@ -346,26 +310,16 @@ private void InitializeComponent() resources.ApplyResources(this.toolStripStatusLabel_Status, "toolStripStatusLabel_Status"); this.toolStripStatusLabel_Status.Name = "toolStripStatusLabel_Status"; // - // comboBox_GPU - // - resources.ApplyResources(this.comboBox_GPU, "comboBox_GPU"); - this.comboBox_GPU.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox_GPU.FormattingEnabled = true; - this.comboBox_GPU.Name = "comboBox_GPU"; - this.comboBox_GPU.SelectedIndexChanged += new System.EventHandler(this.ComboBox_GPU_SelectedIndexChanged); - // // FormMain // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.comboBox_GPU); this.Controls.Add(this.label_default); this.Controls.Add(this.label_File); this.Controls.Add(this.label_Size); this.Controls.Add(this.label1); this.Controls.Add(this.statusStrip1); this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); this.Controls.Add(this.menuStrip1); this.Controls.Add(this.pictureBox_DD); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -377,8 +331,6 @@ private void InitializeComponent() this.Load += new System.EventHandler(this.FormMain_Load); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); this.groupBox2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pictureBox_DD)).EndInit(); this.statusStrip1.ResumeLayout(false); @@ -402,11 +354,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem settingsCToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem upscalingSettingsUToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem videoUpscalingSettingsVToolStripMenuItem; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Label label_Graphic; - private System.Windows.Forms.Label label_Processor; private System.Windows.Forms.ToolStripMenuItem toolsTToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem changeVideoResolutionToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem aboutAToolStripMenuItem; @@ -419,17 +366,16 @@ private void InitializeComponent() private System.Windows.Forms.Button button_Merge; private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel_Status; - private System.Windows.Forms.Label label_OS; - private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label1; private System.Windows.Forms.PictureBox pictureBox_DD; private System.Windows.Forms.Label label_default; private System.Windows.Forms.ToolStripMenuItem changeVideoFormatToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem changeImageFormatToolStripMenuItem; - private System.Windows.Forms.ComboBox comboBox_GPU; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem4; private System.Windows.Forms.ToolStripMenuItem preferencesSToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openFromClipboardToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem getSystemInformationToolStripMenuItem; } } diff --git a/src/Forms/FormMain.cs b/src/Forms/FormMain.cs index 1304e7d..ba5ecc2 100644 --- a/src/Forms/FormMain.cs +++ b/src/Forms/FormMain.cs @@ -1,4 +1,5 @@ using NVGE.Localization; +using NVGE.src.Forms; using OpenCvSharp; using System; using System.Collections.Generic; @@ -8,6 +9,7 @@ using System.IO.Compression; using System.Net.Http; using System.Net.NetworkInformation; +using System.Reflection; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; @@ -129,7 +131,7 @@ private void FormMain_Load(object sender, EventArgs e) Directory.CreateDirectory(Directory.GetCurrentDirectory() + @"\_temp-project\images"); Thread.Sleep(200); - if (fs != null) + /*if (fs != null) { fs.Dispatcher.Invoke(d, Strings.SplashFormSystemCaption); } @@ -207,7 +209,7 @@ private void FormMain_Load(object sender, EventArgs e) comboBox_GPU.Enabled = true; } - label_Graphic.Text = Common.GPUList[0] + " [ " + Common.GPURAMList[0] + " MiB RAM ]"; + label_Graphic.Text = Common.GPUList[0] + " [ " + Common.GPURAMList[0] + " MiB RAM ]";*/ /*if (GPUList.Count == 1) { @@ -237,6 +239,9 @@ private void FormMain_Load(object sender, EventArgs e) label_Graphic.Text = GPUList[0]; }*/ + ResetLabels(); + toolStripStatusLabel_Status.ForeColor = Color.FromArgb(0, 255, 0, 0); + if (fs != null) { fs.Dispatcher.Invoke(d, Strings.SplashFormUpdateCaption); @@ -4379,51 +4384,108 @@ private void ChangeImageFormatToolStripMenuItem_Click(object sender, EventArgs e Filter = Strings.FilterImage, FilterIndex = 11, Title = Strings.OpenFormatChangeDialogCaption, - RestoreDirectory = true + RestoreDirectory = true, + Multiselect = true, }; if (ofd.ShowDialog() == DialogResult.OK) { - string open = ofd.FileName; - SaveFileDialog sfd = new() - { - FileName = Common.SFDRandomNumber(), - InitialDirectory = "", - Filter = Strings.FilterImage, - FilterIndex = 1, - Title = Strings.SaveFormatChangeDialogCaption, - OverwritePrompt = true, - RestoreDirectory = true - }; - if (sfd.ShowDialog() == DialogResult.OK) - { - string save = sfd.FileName; - fi = new FileInfo(open); - fi2 = new FileInfo(save); + string[] opens = ofd.FileNames; - if (fi.Extension.ToUpper() == fi2.Extension.ToUpper()) + if (opens.Length == 1) + { + SaveFileDialog sfd = new() { - MessageBox.Show(Strings.VideoFormatChange_FmtErrorCaption, Strings.MSGError, MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } + FileName = Common.SFDRandomNumber(), + InitialDirectory = "", + Filter = Strings.FilterImage, + FilterIndex = 1, + Title = Strings.SaveFormatChangeDialogCaption, + OverwritePrompt = true, + RestoreDirectory = true + }; + if (sfd.ShowDialog() == DialogResult.OK) + { + string save = sfd.FileName; + fi = new FileInfo(opens[0]); + fi2 = new FileInfo(save); - ImageConvert.IMAGEtoAnyIMAGE(open, save); + if (fi.Extension.ToUpper() == fi2.Extension.ToUpper()) + { + MessageBox.Show(Strings.VideoFormatChange_FmtErrorCaption, Strings.MSGError, MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } - if (File.Exists(save)) - { - MessageBox.Show(Strings.VideoFormatChange_SuccessCaption, Strings.MSGInfo, MessageBoxButtons.OK, MessageBoxIcon.Information); - Process.Start("EXPLORER.EXE", @"/select,""" + save + @""""); - return; + if (File.Exists(save)) + { + File.Delete(save); + } + ImageConvert.IMAGEtoAnyIMAGE(opens[0], save); + + if (File.Exists(save)) + { + MessageBox.Show(Strings.VideoFormatChange_SuccessCaption, Strings.MSGInfo, MessageBoxButtons.OK, MessageBoxIcon.Information); + Process.Start("EXPLORER.EXE", @"/select,""" + save + @""""); + return; + } + else + { + MessageBox.Show(Strings.VideoFormatChange_ErrorCaption, Strings.MSGError, MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } } else { - MessageBox.Show(Strings.VideoFormatChange_ErrorCaption, Strings.MSGError, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } } - else + else // multiple { - return; + FolderBrowserDialog fbd = new() + { + InitialDirectory = "", + ShowNewFolderButton = true, + }; + if (fbd.ShowDialog() == DialogResult.OK) + { + int count = 0; + + using FormImageConvertTarget Form = new(); + Form.ShowDialog(); + + if (string.IsNullOrEmpty(Common.ImageConversionExtension)) + { + return; + } + string destext = Common.ImageConversionExtension; + + foreach (var item in opens) + { + fi = new FileInfo(item); + string fname = fi.Name, savepath = fbd.SelectedPath + @"\" + fname + destext; + + if (File.Exists(savepath)) + { + File.Delete(savepath); + } + ImageConvert.IMAGEtoAnyIMAGE(item, savepath); + + if (File.Exists(savepath)) + { + count++; + } + else + { + MessageBox.Show(string.Format(Strings.ImageMultipleConversionWarning, fname, destext.Replace(".", "")), Strings.MSGWarning, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + } + + MessageBox.Show(string.Format(Strings.ImageMultipleConversionSuccess, count, destext.Replace(".", "")), Strings.MSGInfo, MessageBoxButtons.OK, MessageBoxIcon.Information); + Process.Start("EXPLORER.EXE", @"/select,""" + fbd.SelectedPath + @""""); + return; + } } + + } else { @@ -4977,19 +5039,25 @@ private static void ShowMessage(string message) } #endregion - private void ComboBox_GPU_SelectedIndexChanged(object sender, EventArgs e) + /*private void ComboBox_GPU_SelectedIndexChanged(object sender, EventArgs e) { if (Common.GPUList.Count == 0) { MessageBox.Show(Strings.GPUInfomationFailedCaption, Strings.MSGError, MessageBoxButtons.OK, MessageBoxIcon.Error); } label_Graphic.Text = Common.GPUList[comboBox_GPU.SelectedIndex] + " [ " + Common.GPURAMList[comboBox_GPU.SelectedIndex] + " MiB RAM]"; - } + }*/ private void PreferencesSToolStripMenuItem_Click(object sender, EventArgs e) { using FormPreferencesSettings Form = new(); Form.ShowDialog(); } + + private void GetSystemInformationToolStripMenuItem_Click(object sender, EventArgs e) + { + using FormSystemInfo Form = new(); + Form.ShowDialog(); + } } } diff --git a/src/Forms/FormMain.ja.resx b/src/Forms/FormMain.ja.resx index 4c8383b..b9abc63 100644 --- a/src/Forms/FormMain.ja.resx +++ b/src/Forms/FormMain.ja.resx @@ -137,23 +137,32 @@ ツール (&T) - 168, 22 + 169, 22 動画解像度の変更 - 168, 22 + 169, 22 動画形式の変更 - 168, 22 + 169, 22 画像形式の変更 + + 166, 6 + + + 169, 22 + + + システム情報の取得 + 68, 20 @@ -175,36 +184,6 @@ アップデートの確認 (&U) - - 73, 15 - - - プロセッサー: - - - 94, 15 - - - グラフィックボード: - - - システム情報 - - - 132, 30 - - - 132, 15 - - - オペレーティング・システム: - - - 94, 71 - - - 73, 51 - 操作 diff --git a/src/Forms/FormMain.resx b/src/Forms/FormMain.resx index d99f73e..8988dd2 100644 --- a/src/Forms/FormMain.resx +++ b/src/Forms/FormMain.resx @@ -57,536 +57,362 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + 2 + + + groupBox2 + + $this - - - Zoom + + toolStripMenuItem1 - - Image Upscaling (&U) + + + 7, 15 - - changeVideoFormatToolStripMenuItem + + 372, 15 - - 9 + + 904, 22 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Yu Gothic UI, 11.25pt - - - 7 + + exitXToolStripMenuItem - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + $this preferencesSToolStripMenuItem - - False - - - menuStrip1 + + changeImageFormatToolStripMenuItem - - - 180, 22 + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 4 + + changeVideoFormatToolStripMenuItem - - Change image format + + File (&F) - - 9 + + groupBox2 - - Preferences (&S) + + waifu2x-nvge Reloaded - - OS Information + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + + 5 - - 87, 15 + + False Not ready - please open the file. - - 5 + + False - - Yu Gothic UI, 11.25pt + + 247, 22 - - 5 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Exit (&X) 7 - - 1 - - - 219, 22 - - - 202, 22 - - - 10 + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - toolStripMenuItem1 + + Close File (&C) - - groupBox1 + + Change image format - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 4 + + 219, 22 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + aboutWaifu2xncnnvulkanGUIToolStripMenuItem - - Upscaling Video + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + MiddleCenter - - 180, 22 + + 7 - - groupBox2 + + 520, 332 - - 6, 51 + + 1 - - MiddleCenter + + Size Info - - $this + + 219, 22 - - 216, 6 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 5 + + 487, 90 - - 64, 20 + + 6, 225 - - 89, 71 + + Config (&C) - - 54, 20 + + $this - - label_Graphic + + 202, 22 - - aboutAToolStripMenuItem + + 520, 33 - - 12, 345 + + System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + Video Upscaling (&V) System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - settingsCToolStripMenuItem + + 64, 20 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Size Info + + System.Windows.Forms.PictureBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label1 + + button_Video - - 372, 15 + + statusStrip1 - - Tools (&T) + + 4 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Preferences (&S) - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 247, 22 - - comboBox_GPU + + openImegeIToolStripMenuItem - - openFromClipboardToolStripMenuItem + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System Information + + aboutAToolStripMenuItem - - True + + + Zoom - - 2 + + 6 - - File Info + + 216, 6 - - GPU Information + + 180, 22 - - label_Size + + 372, 296 - - changeImageFormatToolStripMenuItem + + Image Upscaling (&U) - - System.Windows.Forms.StatusStrip, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 85, 15 + + CenterScreen - + + label5 + + 2 - - True + + File Info 0 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 5 - - - MiddleCenter + + 219, 22 372, 296 - - 7 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - CenterScreen - - - 6, 25 - - - groupBox1 - - - 2 - - - 64, 51 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 500, 105 - - - 6, 71 - - - Help (&H) - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Upscaling Image - - 3 + + 904, 396 changeVideoResolutionToolStripMenuItem - - videoUpscalingSettingsVToolStripMenuItem - - - Merge with FFmpeg + + 904, 24 - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Drag and drop an image or video file here, or open the file... - - button_Video + + 202, 22 - - 372, 296 + + 3 - - $this + + 372, 38 toolStripMenuItem3 - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 103, 15 - - - CPU Information - - - 8 - - - 6, 30 + + videoUpscalingSettingsVToolStripMenuItem - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 180, 22 - - 487, 50 + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - openImegeIToolStripMenuItem + + About waifu2x-ncnn-vulkan-GUI - - Upscaling Image + + 5 - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 177, 6 - - - 520, 33 - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 202, 22 - - - fileFToolStripMenuItem + + 199, 6 - + 4 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 71, 20 - - - 107, 30 - - - True - - - 6 - - - $this - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 12, 235 - - - 247, 22 - - + 520, 33 - - 202, 22 - - - $this - - - 63, 20 - - - System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - MiddleCenter - - - Prosessor: - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - label2 - - - True - - - False - - - groupBox1 - - - toolStripMenuItem4 - - - statusStrip1 - - - Open Video (&V) - - - 219, 22 - - - Video Upscaling (&V) + + button_Merge - - About waifu2x-ncnn-vulkan-GUI + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 Process - - Config (&C) + + 54, 20 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 244, 6 groupBox2 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + toolStripMenuItem5 toolStripStatusLabel_Status - - 9 - - - groupBox2 - - - 4 - - - 0, 374 - - - 247, 22 - - - 180, 22 - - - button_Image + + 520, 349 - - $this + + 5 - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + fileFToolStripMenuItem - - 487, 50 + + 2 - - Change video format + + label_File - - 904, 24 + + 202, 22 - + 216, 6 - - groupBox2 - - - upscalingSettingsUToolStripMenuItem - - - openVideoVToolStripMenuItem + + label_default - - Graphic Board: + + 0 - - 94, 15 + + 6, 125 - - 8 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - menuStrip1 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2 + + 3 - + 219, 22 - - Exit (&X) - - - Check for Updates (&U) - - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - label_OS + + 0, 0 @@ -6825,256 +6651,241 @@ AAAAAAAA - - toolsTToolStripMenuItem + + Open Imege (&I) - - 0, 0 + + 3 - - groupBox1 + + checkForUpdatesUToolStripMenuItem - - False + + 202, 22 - - toolStripMenuItem2 + + 0, 374 - - System.Windows.Forms.PictureBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + openVideoVToolStripMenuItem + + + 219, 22 + + + MiddleCenter System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + menuStrip1 + 520, 330 - - aboutWaifu2xncnnvulkanGUIToolStripMenuItem - - - 520, 349 - - - 1 - - - True - - - statusStrip1 - - - 12, 33 - - - 7, 15 + + $this - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Help (&H) - - 174, 17 + + 180, 22 - - 7, 135 + + FormMain - + $this - - Drag and drop an image or video file here, or open the file... - - - 904, 22 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 6 + + Change video format - - 6 + + Get System Information - - exitXToolStripMenuItem + + pictureBox_DD - - label5 + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label3 + + closeFileCToolStripMenuItem - - button_Merge + + 500, 331 - - 219, 22 + + 1 - - Open Image from clipboard + + statusStrip1 - - MiddleCenter + + 63, 20 - - label_Processor + + Tools (&T) - - File (&F) + + 487, 90 - - 6, 80 + + toolStripMenuItem4 - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBox1 - - - 372, 38 + + 174, 17 - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label_Size - - 500, 196 + + 177, 6 - - Close File (&C) + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 95, 15 + + MiddleCenter - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.StatusStrip, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - FormMain + + $this - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + False - - 4 + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + menuStrip1 - - 487, 50 + + openFromClipboardToolStripMenuItem - - 3 + + toolStripMenuItem2 - - 3 + + groupBox2 - - label_default + + $this - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + label1 - - waifu2x-nvge Reloaded + + Check for Updates (&U) - - 520, 332 + + getSystemInformationToolStripMenuItem - - 904, 396 + + upscalingSettingsUToolStripMenuItem - + 1 - - Open Imege (&I) + + settingsCToolStripMenuItem - - 500, 23 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label4 + + Change video resolution - + + System.Windows.Forms.GroupBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - False + + button_Image - - 6 + + 372, 15 - - checkForUpdatesUToolStripMenuItem + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + Open Video (&V) - - 5 + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Operating System: + + 9 - - 0 + + Upscaling Video - - closeFileCToolStripMenuItem + + 6 - - $this + + 71, 20 - - 372, 15 + + 6, 25 - - 244, 6 + + 487, 90 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + MiddleCenter - + False - - label_File + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Change video resolution + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + Open Image from clipboard - - 60, 15 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 4 - - System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 12, 33 - - 219, 22 + + toolsTToolStripMenuItem - - pictureBox_DD + + Merge with FFmpeg + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 132, 17 + True 17, 17 - - 132, 17 - \ No newline at end of file diff --git a/src/Forms/FormMain.zh.resx b/src/Forms/FormMain.zh.resx index 1d499f7..83ae58a 100644 --- a/src/Forms/FormMain.zh.resx +++ b/src/Forms/FormMain.zh.resx @@ -140,23 +140,29 @@ 工具 (&T) - 158, 22 + 197, 22 改变视频分辨率 - 158, 22 + 197, 22 改变视频格式 - 158, 22 + 197, 22 改变图像格式 + + 194, 6 + + + 197, 22 + 63, 20 @@ -166,36 +172,6 @@ 更新确认 (&U) - - 55, 15 - - - 处理器: - - - 55, 15 - - - 图形板: - - - 系统信息 - - - 67, 30 - - - 67, 15 - - - 操作系统: - - - 55, 71 - - - 55, 51 - 运作 diff --git a/src/Forms/FormSystemInfo.Designer.cs b/src/Forms/FormSystemInfo.Designer.cs new file mode 100644 index 0000000..b60c8ef --- /dev/null +++ b/src/Forms/FormSystemInfo.Designer.cs @@ -0,0 +1,320 @@ +namespace NVGE +{ + partial class FormSystemInfo + { + /// + /// 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormSystemInfo)); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label_MBModel = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label_MBMaker = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label_OSName = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label_CPUName = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label_CPUCores = new System.Windows.Forms.Label(); + this.label_CPUThreads = new System.Windows.Forms.Label(); + this.pictureBox_CPU = new System.Windows.Forms.PictureBox(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.comboBox_GPU = new System.Windows.Forms.ComboBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label_GPUDriver = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label_GPUMemory = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.label_GPUMaker = new System.Windows.Forms.Label(); + this.label_GPUName = new System.Windows.Forms.Label(); + this.pictureBox_GPU = new System.Windows.Forms.PictureBox(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.button_OK = new System.Windows.Forms.Button(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox_CPU)).BeginInit(); + this.tabPage2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox_GPU)).BeginInit(); + this.SuspendLayout(); + // + // tabControl1 + // + resources.ApplyResources(this.tabControl1, "tabControl1"); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + // + // tabPage1 + // + resources.ApplyResources(this.tabPage1, "tabPage1"); + this.tabPage1.Controls.Add(this.groupBox2); + this.tabPage1.Controls.Add(this.groupBox1); + this.tabPage1.Controls.Add(this.pictureBox_CPU); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // groupBox2 + // + resources.ApplyResources(this.groupBox2, "groupBox2"); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.label_MBModel); + this.groupBox2.Controls.Add(this.label11); + this.groupBox2.Controls.Add(this.label_MBMaker); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Controls.Add(this.label_OSName); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.TabStop = false; + // + // label9 + // + resources.ApplyResources(this.label9, "label9"); + this.label9.Name = "label9"; + // + // label_MBModel + // + resources.ApplyResources(this.label_MBModel, "label_MBModel"); + this.label_MBModel.Name = "label_MBModel"; + // + // label11 + // + resources.ApplyResources(this.label11, "label11"); + this.label11.Name = "label11"; + // + // label_MBMaker + // + resources.ApplyResources(this.label_MBMaker, "label_MBMaker"); + this.label_MBMaker.Name = "label_MBMaker"; + // + // label7 + // + resources.ApplyResources(this.label7, "label7"); + this.label7.Name = "label7"; + // + // label_OSName + // + resources.ApplyResources(this.label_OSName, "label_OSName"); + this.label_OSName.Name = "label_OSName"; + // + // groupBox1 + // + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.label_CPUName); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label_CPUCores); + this.groupBox1.Controls.Add(this.label_CPUThreads); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // label1 + // + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; + // + // label_CPUName + // + resources.ApplyResources(this.label_CPUName, "label_CPUName"); + this.label_CPUName.Name = "label_CPUName"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // + // label2 + // + resources.ApplyResources(this.label2, "label2"); + this.label2.Name = "label2"; + // + // label_CPUCores + // + resources.ApplyResources(this.label_CPUCores, "label_CPUCores"); + this.label_CPUCores.Name = "label_CPUCores"; + // + // label_CPUThreads + // + resources.ApplyResources(this.label_CPUThreads, "label_CPUThreads"); + this.label_CPUThreads.Name = "label_CPUThreads"; + // + // pictureBox_CPU + // + resources.ApplyResources(this.pictureBox_CPU, "pictureBox_CPU"); + this.pictureBox_CPU.Name = "pictureBox_CPU"; + this.pictureBox_CPU.TabStop = false; + // + // tabPage2 + // + resources.ApplyResources(this.tabPage2, "tabPage2"); + this.tabPage2.Controls.Add(this.comboBox_GPU); + this.tabPage2.Controls.Add(this.groupBox3); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // comboBox_GPU + // + resources.ApplyResources(this.comboBox_GPU, "comboBox_GPU"); + this.comboBox_GPU.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox_GPU.FormattingEnabled = true; + this.comboBox_GPU.Name = "comboBox_GPU"; + // + // groupBox3 + // + resources.ApplyResources(this.groupBox3, "groupBox3"); + this.groupBox3.Controls.Add(this.label_GPUDriver); + this.groupBox3.Controls.Add(this.label19); + this.groupBox3.Controls.Add(this.label_GPUMemory); + this.groupBox3.Controls.Add(this.label17); + this.groupBox3.Controls.Add(this.label_GPUMaker); + this.groupBox3.Controls.Add(this.label_GPUName); + this.groupBox3.Controls.Add(this.pictureBox_GPU); + this.groupBox3.Controls.Add(this.label14); + this.groupBox3.Controls.Add(this.label13); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.TabStop = false; + // + // label_GPUDriver + // + resources.ApplyResources(this.label_GPUDriver, "label_GPUDriver"); + this.label_GPUDriver.Name = "label_GPUDriver"; + // + // label19 + // + resources.ApplyResources(this.label19, "label19"); + this.label19.Name = "label19"; + // + // label_GPUMemory + // + resources.ApplyResources(this.label_GPUMemory, "label_GPUMemory"); + this.label_GPUMemory.Name = "label_GPUMemory"; + // + // label17 + // + resources.ApplyResources(this.label17, "label17"); + this.label17.Name = "label17"; + // + // label_GPUMaker + // + resources.ApplyResources(this.label_GPUMaker, "label_GPUMaker"); + this.label_GPUMaker.Name = "label_GPUMaker"; + // + // label_GPUName + // + resources.ApplyResources(this.label_GPUName, "label_GPUName"); + this.label_GPUName.Name = "label_GPUName"; + // + // pictureBox_GPU + // + resources.ApplyResources(this.pictureBox_GPU, "pictureBox_GPU"); + this.pictureBox_GPU.Name = "pictureBox_GPU"; + this.pictureBox_GPU.TabStop = false; + // + // label14 + // + resources.ApplyResources(this.label14, "label14"); + this.label14.Name = "label14"; + // + // label13 + // + resources.ApplyResources(this.label13, "label13"); + this.label13.Name = "label13"; + // + // button_OK + // + resources.ApplyResources(this.button_OK, "button_OK"); + this.button_OK.Name = "button_OK"; + this.button_OK.UseVisualStyleBackColor = true; + this.button_OK.Click += new System.EventHandler(this.Button_OK_Click); + // + // FormSystemInfo + // + this.AcceptButton = this.button_OK; + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ControlBox = false; + this.Controls.Add(this.button_OK); + this.Controls.Add(this.tabControl1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "FormSystemInfo"; + this.Load += new System.EventHandler(this.FormSystemInfo_Load); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox_CPU)).EndInit(); + this.tabPage2.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox_GPU)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label_MBModel; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label_MBMaker; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label_OSName; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label_CPUName; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label_CPUCores; + private System.Windows.Forms.Label label_CPUThreads; + private System.Windows.Forms.PictureBox pictureBox_CPU; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.ComboBox comboBox_GPU; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label_GPUDriver; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label_GPUMemory; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label_GPUMaker; + private System.Windows.Forms.Label label_GPUName; + private System.Windows.Forms.PictureBox pictureBox_GPU; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Button button_OK; + } +} \ No newline at end of file diff --git a/src/Forms/FormSystemInfo.cs b/src/Forms/FormSystemInfo.cs new file mode 100644 index 0000000..c97a2fe --- /dev/null +++ b/src/Forms/FormSystemInfo.cs @@ -0,0 +1,578 @@ +using NVGE.Properties; +using System; +using System.Diagnostics; +using System.Text.RegularExpressions; +using System.Windows.Forms; +using Vortice.DXGI; + +namespace NVGE +{ + public partial class FormSystemInfo : Form + { + public FormSystemInfo() + { + InitializeComponent(); + } + + private void FormSystemInfo_Load(object sender, EventArgs e) + { + int adaptercount = 0; + string[] OSInfo = new string[17]; + string[] CPUInfo = new string[3]; + string[] GPUInfo = new string[3]; + string[] BIOSInfo = new string[5]; + string[] BaseInfo= new string[3]; + SystemInfo.GetSystemInformation(OSInfo); + SystemInfo.GetProcessorsInformation(CPUInfo); + SystemInfo.GetVideoControllerInformation(GPUInfo); + SystemInfo.GetBIOSInformation(BIOSInfo); + SystemInfo.GetBaseBoardInformation(BaseInfo); + + if (DXGI.CreateDXGIFactory1(out IDXGIFactory1 factory).Failure) + { + return; + } + + using (factory) + { + for (int iAdapter = 0; ; iAdapter++) + { + if (factory.EnumAdapters(iAdapter, out IDXGIAdapter adapter).Failure) + { + break; + } + + using (adapter) + { + if (adapter.Description.DedicatedVideoMemory == 0) + { + continue; + } + adaptercount++; + + Debug.WriteLine($"[adapter {iAdapter}]"); + Debug.WriteLine($"Description:{adapter.Description.Description}"); + comboBox_GPU.Items.Add(adapter.Description.Description); + Debug.WriteLine($"DedicatedVideoMemory:{adapter.Description.DedicatedVideoMemory / 1024 / 1024} MB"); + label_GPUMemory.Text = adapter.Description.DedicatedVideoMemory / 1024 / 1024 + "MB"; + } + } + } + + if (adaptercount > 1) + { + comboBox_GPU.Enabled = true; + } + else + { + comboBox_GPU.Enabled = false; + } + + /*List GPUList = new(); + List GPURAMList = new(); + string[] vn = null; + long[] vr = null; + + VRAM v = new(); + VRAMInfo vram = new(vn, vr); + vram = v.GetdGPUInfo(); + GPUList = new(vram.Name);//SystemInfo.GetGraphicsCardsInformation(); + GPURAMList = new(vram.VRAM);//SystemInfo.GetGraphicsCardNamesInformation(); + if (GPUList.Count == 0) + { + MessageBox.Show(Strings.GPUInfomationFailedCaption, Strings.MSGError, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + if (GPURAMList.Count == 0) + { + MessageBox.Show(Strings.GPUInfomationFailedCaption, Strings.MSGError, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + foreach (var gpu in GPUList) + { + comboBox_GPU.Items.Add(gpu); + } + + comboBox_GPU.SelectedIndex = 0; + if (Common.GPUList.Count == 1) + { + comboBox_GPU.Enabled = false; + } + else + { + comboBox_GPU.Enabled = true; + }*/ + + CPUVendor(CPUInfo[0]); + label_CPUName.Text = CPUInfo[0];//CPUInfo[0]; + label_CPUCores.Text = CPUInfo[1]; + label_CPUThreads.Text = CPUInfo[2]; + label_OSName.Text = OSInfo[1] + " - " + OSInfo[3];// + " [ build: " + OSInfo[4] + " ]"; + label_MBMaker.Text = BaseInfo[0]; + label_MBModel.Text = BaseInfo[2]; + label_GPUName.Text = GPUInfo[0]; + label_GPUMaker.Text = GPUVendor(GPUInfo[0]); + label_GPUDriver.Text = GPUInfo[1]; + comboBox_GPU.SelectedIndex = 0; + } + + private void CPUVendor(string Name) + { + if (Name.Contains("Intel")) + { + if (Name.Contains("Cerelon")) + { + if (Regex.IsMatch(Name, "G[6]...")) // 12 [Alder Lake] + { + pictureBox_CPU.Image = Resources.celeron_12th_logo; + } + else if (Regex.IsMatch(Name, "G[5]...")) // 10 [Comet Lake] + { + pictureBox_CPU.Image = Resources.celeron_6_10th_logo; + } + else if (Regex.IsMatch(Name, "G[4]...")) // 9 [Coffee Lake] + { + pictureBox_CPU.Image = Resources.celeron_6_10th_logo; + } + else if (Regex.IsMatch(Name, "G[3]...")) // 6 [Skylake] + { + pictureBox_CPU.Image = Resources.celeron_6_10th_logo; + } + else if (Regex.IsMatch(Name, "G18..")) // 4 [Haswell] + { + pictureBox_CPU.Image = Resources.celeron_4_5th_logo; + } + else if (Regex.IsMatch(Name, "G16..")) // 3 [Ivy Bridge] + { + pictureBox_CPU.Image = Resources.celeron_2_3_logo; + } + else if (Regex.IsMatch(Name, "G5..")) // 2 [Sandy Bridge] + { + pictureBox_CPU.Image = Resources.celeron_2_3_logo; + } + else if (Regex.IsMatch(Name, "G4..")) // 2 [Sandy Bridge] + { + pictureBox_CPU.Image = Resources.celeron_2_3_logo; + } + else if (Regex.IsMatch(Name, "G11..")) // 1 [Nehalem] + { + pictureBox_CPU.Image = Resources.celeron_1st_logo; + } + } + else if(Name.Contains("Pentium")) + { + if (Regex.IsMatch(Name, "G[6]...")) // 1 [Clarkdale] + { + pictureBox_CPU.Image = Resources.pentium_2_3_logo; + } + else if (Regex.IsMatch(Name, "G[5]...")) // 9 [Coffee Lake] + { + pictureBox_CPU.Image = Resources.pentium_6_10th_logo; + } + else if (Regex.IsMatch(Name, "G[4]...")) // 6,7 + { + pictureBox_CPU.Image = Resources.pentium_6_10th_logo; + } + else if (Regex.IsMatch(Name, "G[3]...")) // 4 [Haswell] + { + pictureBox_CPU.Image = Resources.pentium_4_5th_logo; + } + else if (Regex.IsMatch(Name, "G[2]...")) // 3 [Ivy Bridge] + { + pictureBox_CPU.Image = Resources.pentium_2_3_logo; + } + else if (Regex.IsMatch(Name, "G[1]...")) // 3 [Ivy Bridge] + { + pictureBox_CPU.Image = Resources.pentium_2_3_logo; + } + else if (Regex.IsMatch(Name, "G8..")) // 2 + { + pictureBox_CPU.Image = Resources.pentium_2_3_logo; + } + else if (Regex.IsMatch(Name, "G6..")) // 2 + { + pictureBox_CPU.Image = Resources.pentium_2_3_logo; + } + } + else if (Name.Contains("Atom")) // Atom + { + if (Name.Contains("x3")) + { + pictureBox_CPU.Image = Resources.atom_x3_6_10th_logo; + } + else if (Name.Contains("x5")) + { + pictureBox_CPU.Image = Resources.atom_x5_6_10th_logo; + } + else if (Name.Contains("x7")) + { + pictureBox_CPU.Image = Resources.atom_x7_6_10th_logo; + } + } + else if (Name.Contains("Core 2")) + { + if (Name.Contains("Duo")) + { + pictureBox_CPU.Image = Resources._2duo_1st_logo; + } + else if (Name.Contains("Quad")) + { + pictureBox_CPU.Image = Resources._2quad_1st_logo; + } + else if (Name.Contains("Extreme")) + { + pictureBox_CPU.Image = Resources._2extreme_1_logo; + } + } + else if (Name.Contains("Core m")) // Corem + { + if (Name.Contains("3")) + { + pictureBox_CPU.Image = Resources.m3_8th_logo; + } + else if (Name.Contains("5")) + { + pictureBox_CPU.Image = Resources.m5_logo; + } + else if (Name.Contains("7")) + { + pictureBox_CPU.Image = Resources.m7_logo; + } + } + else if (Name.Contains("i3")) // Core i3 + { + if (Regex.IsMatch(Name, "-5..")) // 1 + { + pictureBox_CPU.Image = Resources.i3_1st; + } + else if(Regex.IsMatch(Name, "-2...")) // 2 + { + pictureBox_CPU.Image = Resources.i3_2nd_3rd_logo; + } + else if (Regex.IsMatch(Name, "-3...")) // 3 + { + pictureBox_CPU.Image = Resources.i3_2nd_3rd_logo; + } + else if (Regex.IsMatch(Name, "-4...")) // 4 + { + pictureBox_CPU.Image = Resources.i3_4th_5th_logo; + } + else if (Regex.IsMatch(Name, "-5...")) // 5 + { + pictureBox_CPU.Image = Resources.i3_4th_5th_logo; + } + else if (Regex.IsMatch(Name, "-6...")) // 6 + { + pictureBox_CPU.Image = Resources.i3_6th_logo; + } + else if (Regex.IsMatch(Name, "-7...")) // 7 + { + pictureBox_CPU.Image = Resources.i3_7th_logo; + } + else if (Regex.IsMatch(Name, "-8...")) // 8 + { + pictureBox_CPU.Image = Resources.i3_8th_logo; + } + else if (Regex.IsMatch(Name, "-9...")) // 9 + { + pictureBox_CPU.Image = Resources.i3_9th_logo; + } + else if (Regex.IsMatch(Name, "-10[1-3]..")) // 10 + { + pictureBox_CPU.Image = Resources.i3_10th_logo; + } + else if (Regex.IsMatch(Name, "-121..")) // 12 + { + pictureBox_CPU.Image = Resources.i3_11_13th_logo; + } + } + else if (Name.Contains("i5")) + { + if (Name.Contains("XE") || Name.Contains('X')) + { + pictureBox_CPU.Image = Resources.i5_x_logo; + } + if (Regex.IsMatch(Name, "-[6-7]..")) // 1 + { + pictureBox_CPU.Image = Resources.i5_1st_logo; + } + else if (Regex.IsMatch(Name, "-2...")) // 2 + { + pictureBox_CPU.Image = Resources.i5_2_3th_logo; + } + else if (Regex.IsMatch(Name, "-3...")) // 3 + { + pictureBox_CPU.Image = Resources.i5_2_3th_logo; + } + else if (Regex.IsMatch(Name, "-4...")) // 4 + { + pictureBox_CPU.Image = Resources.i5_4_5th_logo; + } + else if (Regex.IsMatch(Name, "-5...")) // 5 + { + pictureBox_CPU.Image = Resources.i5_4_5th_logo; + } + else if (Regex.IsMatch(Name, "-6...")) // 6 + { + pictureBox_CPU.Image = Resources.i5_6th_logo; + } + else if (Regex.IsMatch(Name, "-7...")) // 7 + { + pictureBox_CPU.Image = Resources.i5_7th_logo; + } + else if (Regex.IsMatch(Name, "-8...")) // 8 + { + pictureBox_CPU.Image = Resources.i5_8th_logo; + } + else if (Regex.IsMatch(Name, "-9...")) // 9 + { + pictureBox_CPU.Image = Resources.i5_9th_logo; + } + else if (Regex.IsMatch(Name, "-10[4-6]..")) // 10 + { + pictureBox_CPU.Image = Resources.i5_10th_logo; + } + else if (Regex.IsMatch(Name, "-11[4-6]..")) // 11 + { + pictureBox_CPU.Image = Resources.i5_11_13th_logo; + } + else if (Regex.IsMatch(Name, "-12[4-6]..")) // 12 + { + pictureBox_CPU.Image = Resources.i5_11_13th_logo; + } + else if (Regex.IsMatch(Name, "-13[4-6]..")) // 13 + { + pictureBox_CPU.Image = Resources.i5_11_13th_logo; + } + } + else if (Name.Contains("i7")) + { + if (Name.Contains("XE") || Name.Contains('X')) + { + pictureBox_CPU.Image = Resources.i7_x_logo; + } + else if (Regex.IsMatch(Name, "-8..")) // 1 + { + pictureBox_CPU.Image = Resources.i7_1st_logo; + } + else if (Regex.IsMatch(Name, "-2...")) // 2 + { + pictureBox_CPU.Image = Resources.i7_2_3_logo; + } + else if (Regex.IsMatch(Name, "-3...")) // 3 + { + pictureBox_CPU.Image = Resources.i7_2_3_logo; + } + else if (Regex.IsMatch(Name, "-4...")) // 4 + { + pictureBox_CPU.Image = Resources.i7_4_5th_logo; + } + else if (Regex.IsMatch(Name, "-5...")) // 5 + { + pictureBox_CPU.Image = Resources.i7_4_5th_logo; + } + else if (Regex.IsMatch(Name, "-6...")) // 6 + { + pictureBox_CPU.Image = Resources.i7_6th_logo; + } + else if (Regex.IsMatch(Name, "-7...")) // 7 + { + pictureBox_CPU.Image = Resources.i7_7th_logo; + } + else if (Regex.IsMatch(Name, "-8...")) // 8 + { + pictureBox_CPU.Image = Resources.i7_8th_logo; + } + else if (Regex.IsMatch(Name, "-9...")) // 9 + { + pictureBox_CPU.Image = Resources.i7_9th_logo; + } + else if (Regex.IsMatch(Name, "-107..")) // 10 + { + pictureBox_CPU.Image = Resources.i7_10th_logo; + } + else if (Regex.IsMatch(Name, "-117..")) // 11 + { + pictureBox_CPU.Image = Resources.i7_11_13th_logo; + } + else if (Regex.IsMatch(Name, "-127..")) // 12 + { + pictureBox_CPU.Image = Resources.i7_11_13th_logo; + } + else if (Regex.IsMatch(Name, "-137..")) // 13 + { + pictureBox_CPU.Image = Resources.i7_11_13th_logo; + } + else + { + + } + } + else if (Name.Contains("i9")) + { + if (Name.Contains("XE")) + { + pictureBox_CPU.Image = Resources.i9_9th_extreme_logo; + } + else if (Name.Contains('X')) + { + pictureBox_CPU.Image = Resources.i9_x_logo; + } + else if (Regex.IsMatch(Name, "-9...")) // 9 + { + pictureBox_CPU.Image = Resources.i9_9th_logo; + } + else if (Regex.IsMatch(Name, "-109..")) // 10 + { + pictureBox_CPU.Image = Resources.i9_10th_logo; + } + else if (Regex.IsMatch(Name, "-119..")) // 11 + { + pictureBox_CPU.Image = Resources.i9_11_13th_logo; + } + else if (Regex.IsMatch(Name, "-129..")) // 12 + { + pictureBox_CPU.Image = Resources.i9_11_13th_logo; + } + else if (Regex.IsMatch(Name, "-139..")) // 13 + { + pictureBox_CPU.Image = Resources.i9_11_13th_logo; + } + } + else if (Name.Contains("Xeon")) + { + pictureBox_CPU.Image = Resources.xeon_6_10th_logo; + } + else + { + pictureBox_CPU.Image = Resources.intel_inside; + } + } + else if (Name.Contains("AMD")) + { + if (Name.Contains("Ryzen")) + { + if (Name.Contains("Ryzen 3")) + { + if (Name.Contains("Pro")) + { + pictureBox_CPU.Image = Resources.amd_ryzen_3_pro_logo; + } + else + { + pictureBox_CPU.Image = Resources.amd_ryzen_3_logo; + } + } + else if (Name.Contains("Ryzen 5")) + { + if (Name.Contains("Pro")) + { + pictureBox_CPU.Image = Resources.amd_ryzen_5_pro_logo; + } + else + { + pictureBox_CPU.Image = Resources.amd_ryzen_5_logo; + } + } + else if (Name.Contains("Ryzen 7")) + { + if (Name.Contains("Pro")) + { + pictureBox_CPU.Image = Resources.amd_ryzen_7_pro_logo; + } + else + { + pictureBox_CPU.Image = Resources.amd_ryzen_7_logo; + } + } + else if (Name.Contains("Ryzen 9")) + { + pictureBox_CPU.Image = Resources.amd_ryzen_9_logo; + } + else if (Name.Contains("Ryzen Threadripper")) + { + if (Name.Contains("Pro")) + { + pictureBox_CPU.Image = Resources.amd_ryzen_threadripper_pro; + } + else + { + pictureBox_CPU.Image = Resources.ryzen_threadripper_logo; + } + } + } + else if (Name.Contains("Athlon")) + { + pictureBox_CPU.Image = Resources.amd_athlon_logo; + } + else + { + pictureBox_CPU.Image = Resources.amd_inside; + } + } + else + { + + } + } + + private string GPUVendor(string Name) + { + if (Name.Contains("NVIDIA")) + { + if (Name.Contains("GTX")) + { + pictureBox_GPU.Image = Resources.nvidia_gtx_logo; + } + else if (Name.Contains("RTX")) + { + pictureBox_GPU.Image = Resources.nvidia_rtx_logo; + } + + return "NVIDIA Corporation"; + } + else if (Name.Contains("Radeon") || Name.Contains("AMD")) + { + if (Name.Contains("Vega")) + { + pictureBox_GPU.Image = Resources.radeon_vega_logo; + } + else if (Name.Contains("RX")) + { + pictureBox_GPU.Image = Resources.radeon_rx_logo; + } + else + { + pictureBox_GPU.Image = Resources.radeon_logo; + } + + return "Advanced Micro Devices Corporation"; + } + else if (Name.Contains("Intel")) + { + if (Name.Contains("HD")) + { + pictureBox_GPU.Image = Resources.intel_hd_logo; + } + else if (Name.Contains("Iris")) + { + pictureBox_GPU.Image = Resources.intel_iris_logo; + } + else if(Name.Contains("Arc")) + { + pictureBox_GPU.Image = Resources.intel_arc_logo; + } + + return "Intel Corporation"; + } + else + { + return "Unknown"; + } + } + + private void Button_OK_Click(object sender, EventArgs e) + { + Close(); + } + } +} diff --git a/src/Forms/FormSystemInfo.en.resx b/src/Forms/FormSystemInfo.en.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/src/Forms/FormSystemInfo.en.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/src/Forms/FormSystemInfo.ja.resx b/src/Forms/FormSystemInfo.ja.resx new file mode 100644 index 0000000..d696ba4 --- /dev/null +++ b/src/Forms/FormSystemInfo.ja.resx @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 一般 + + + グラフィックス + + + システム + + + + 96, 15 + + + M/B メーカー: + + + モデル: + + + 94, 37 + + + 304, 15 + + + 134, 15 + + + オペレーティング・システム: + + + 136, 19 + + + 262, 15 + + + プロセッサー + + + 43, 15 + + + 名称: + + + 65, 15 + + + スレッド数: + + + 48, 15 + + + コア数: + + + 148, 37 + + + グラフィックボード + + + 240, 68 + + + 88, 15 + + + 139, 68 + + + 106, 15 + + + ドライバーバージョン: + + + 60, 68 + + + 56, 15 + + + 総メモリ: + + + 53, 15 + + + ブランド: + + + 43, 15 + + + 名称: + + + システム情報 + + \ No newline at end of file diff --git a/src/Forms/FormSystemInfo.resx b/src/Forms/FormSystemInfo.resx new file mode 100644 index 0000000..db96d7b --- /dev/null +++ b/src/Forms/FormSystemInfo.resx @@ -0,0 +1,868 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + 54, 15 + + + groupBox2 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 53, 19 + + + 7, 15 + + + MiddleCenter + + + 0 + + + 1 + + + 1 + + + 0 + + + groupBox2 + + + 148, 68 + + + 5 + + + tabControl1 + + + Processor + + + 13, 15 + + + groupBox1 + + + + 10 + + + 6, 37 + + + System Information + + + tabPage1 + + + 84, 37 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + + + 334, 19 + + + 12 + + + 4 + + + 3 + + + groupBox1 + + + label_CPUCores + + + Maker String + + + tabControl1 + + + Cores: + + + True + + + 3 + + + 2 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Operating System: + + + groupBox3 + + + 3 + + + M/B Manufacturer: + + + 281, 15 + + + 75, 23 + + + M/B Maker String + + + 41, 15 + + + groupBox3 + + + Graphics + + + 275, 15 + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + label17 + + + True + + + 117, 15 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 6, 19 + + + System.Windows.Forms.Form, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl1 + + + label13 + + + 228, 68 + + + 281, 15 + + + 2 + + + 1 + + + groupBox3 + + + 4 + + + groupBox2 + + + General + + + System.Windows.Forms.TabPage, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + + + tabPage1 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Memory: + + + True + + + MiddleCenter + + + 424, 200 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + label_GPUMemory + + + + Zoom + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + CenterScreen + + + 8 + + + groupBox1 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 82, 15 + + + 350, 207 + + + pictureBox_CPU + + + Zoom + + + 7 + + + MiddleCenter + + + groupBox3 + + + 6, 76 + + + tabPage2 + + + Threads: + + + 8, 37 + + + 53, 19 + + + 0 + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 434, 236 + + + 2 + + + 25, 15 + + + groupBox1 + + + MiddleCenter + + + Name: + + + Name: + + + + 3, 3, 3, 3 + + + comboBox_GPU + + + 0 + + + 141, 37 + + + False + + + label2 + + + label_CPUThreads + + + M/B Model String + + + 41, 15 + + + 4, 24 + + + label_MBModel + + + System + + + 6, 55 + + + label_CPUName + + + CPU String + + + MiddleCenter + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 8, 19 + + + 76, 15 + + + label11 + + + MiddleCenter + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 100, 15 + + + 3 + + + 0 + + + 1 + + + groupBox2 + + + Brand: + + + OS String + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + + + 7 + + + 53, 37 + + + $this + + + MiddleCenter + + + 1 + + + groupBox1 + + + 0 + + + True + + + 117, 15 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + RAM String + + + 6, 6 + + + 0 + + + 4 + + + 4 + + + label7 + + + 115, 15 + + + 6, 68 + + + label3 + + + 117, 19 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 + + + 66, 68 + + + 5, 5 + + + 0 + + + 6, 19 + + + 5 + + + GPU + + + 0 + + + 117, 55 + + + True + + + 6 + + + 64, 64 + + + True + + + True + + + 0 + + + label_GPUMaker + + + 3, 3, 3, 3 + + + 11 + + + True + + + groupBox3 + + + groupBox1 + + + pictureBox_GPU + + + tabPage1 + + + label_GPUDriver + + + 1 + + + 404, 135 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + FormSystemInfo + + + System.Windows.Forms.TabControl, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + MiddleCenter + + + 0 + + + 2 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + label_GPUName + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 404, 85 + + + System.Windows.Forms.Button, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + label19 + + + groupBox2 + + + 5 + + + 0 + + + Done + + + 6, 43 + + + 39, 15 + + + label9 + + + 41, 15 + + + 337, 64 + + + 4, 24 + + + 53, 43 + + + groupBox1 + + + 12 + + + tabPage2 + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 416, 172 + + + groupBox2 + + + button_OK + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MiddleCenter + + + 2 + + + label_MBMaker + + + 1 + + + groupBox3 + + + 347, 6 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + label14 + + + 117, 37 + + + 281, 15 + + + 8 + + + 268, 15 + + + 5 + + + groupBox3 + + + 6 + + + $this + + + groupBox3 + + + 13 + + + tabPage2 + + + label1 + + + 0 + + + 11 + + + DriverVersion String + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + + + 275, 15 + + + 51, 15 + + + label_OSName + + + 1 + + + 416, 172 + + + 6, 6 + + + tabPage1 + + + Model: + + + 6, 143 + + + 5 + + + 6 + + + 8 + + + Driver Version: + + + groupBox3 + + + 64, 64 + + + 1 + + + 7 + + + 1 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox3 + + + GPU String + + + MiddleCenter + + + 404, 23 + + + System.Windows.Forms.Label, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MiddleCenter + + + System.Windows.Forms.TabPage, System.Windows.Forms, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MiddleCenter + + + True + + \ No newline at end of file diff --git a/src/Forms/FormSystemInfo.zh.resx b/src/Forms/FormSystemInfo.zh.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/src/Forms/FormSystemInfo.zh.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