[
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore\n\n# User-specific files\n*.rsuser\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Mono auto generated files\nmono_crash.*\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\n[Aa][Rr][Mm]/\n[Aa][Rr][Mm]64/\nbld/\n[Bb]in/\n[Oo]bj/\n[Ll]og/\n[Ll]ogs/\n\n# Visual Studio 2015/2017 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# Visual Studio 2017 auto generated files\nGenerated\\ Files/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUnit\n*.VisualState.xml\nTestResult.xml\nnunit-*.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# Benchmark Results\nBenchmarkDotNet.Artifacts/\n\n# .NET Core\nproject.lock.json\nproject.fragment.lock.json\nartifacts/\n\n# StyleCop\nStyleCopReport.xml\n\n# Files built by Visual Studio\n*_i.c\n*_p.c\n*_h.h\n*.ilk\n*.meta\n*.obj\n*.iobj\n*.pch\n*.pdb\n*.ipdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*_wpftmp.csproj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n*.VC.db\n*.VC.VC.opendb\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# Visual Studio Trace Files\n*.e2e\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# AxoCover is a Code Coverage Tool\n.axoCover/*\n!.axoCover/settings.json\n\n# Visual Studio code coverage results\n*.coverage\n*.coveragexml\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# Note: Comment the next line if you want to checkin your web deploy settings,\n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n\n# Microsoft Azure Web App publish settings. Comment the next line if you want to\n# checkin your Azure Web App publish settings, but sensitive information contained\n# in these scripts will be unencrypted\nPublishScripts/\n\n# NuGet Packages\n*.nupkg\n# NuGet Symbol Packages\n*.snupkg\n# The packages folder can be ignored because of Package Restore\n**/[Pp]ackages/*\n# except build/, which is used as an MSBuild target.\n!**/[Pp]ackages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/[Pp]ackages/repositories.config\n# NuGet v3's project.json files produces more ignorable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Windows Store app package directories and files\nAppPackages/\nBundleArtifacts/\nPackage.StoreAssociation.xml\n_pkginfo.txt\n*.appx\n*.appxbundle\n*.appxupload\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!?*.[Cc]ache/\n\n# Others\nClientBin/\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.jfm\n*.pfx\n*.publishsettings\norleans.codegen.cs\n\n# Including strong name files can present a security risk\n# (https://github.com/github/gitignore/pull/2483#issue-259490424)\n#*.snk\n\n# Since there are multiple workflows, uncomment next line to ignore bower_components\n# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)\n#bower_components/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\nServiceFabricBackup/\n*.rptproj.bak\n\n# SQL Server files\n*.mdf\n*.ldf\n*.ndf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n*.rptproj.rsuser\n*- [Bb]ackup.rdl\n*- [Bb]ackup ([0-9]).rdl\n*- [Bb]ackup ([0-9][0-9]).rdl\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\nnode_modules/\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)\n*.vbw\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# Paket dependency manager\n.paket/paket.exe\npaket-files/\n\n# FAKE - F# Make\n.fake/\n\n# CodeRush personal settings\n.cr/personal\n\n# Python Tools for Visual Studio (PTVS)\n__pycache__/\n*.pyc\n\n# Cake - Uncomment if you are using it\n# tools/**\n# !tools/packages.config\n\n# Tabs Studio\n*.tss\n\n# Telerik's JustMock configuration file\n*.jmconfig\n\n# BizTalk build output\n*.btp.cs\n*.btm.cs\n*.odx.cs\n*.xsd.cs\n\n# OpenCover UI analysis results\nOpenCover/\n\n# Azure Stream Analytics local run output\nASALocalRun/\n\n# MSBuild Binary and Structured Log\n*.binlog\n\n# NVidia Nsight GPU debugger configuration file\n*.nvuser\n\n# MFractors (Xamarin productivity tool) working folder\n.mfractor/\n\n# Local History for Visual Studio\n.localhistory/\n\n# BeatPulse healthcheck temp database\nhealthchecksdb\n\n# Backup folder for Package Reference Convert tool in Visual Studio 2017\nMigrationBackup/\n\n# Ionide (cross platform F# VS Code tools) working folder\n.ionide/\n"
  },
  {
    "path": "Examples/Credit.txt",
    "content": "https://www.deviantart.com/ncoll36/art/Ayase-Aragaki-Oreimo-614404759"
  },
  {
    "path": "LogoDiy/App.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n    <startup> \n        <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.7.2\" />\n    </startup>\n    <appSettings>\n        <add key=\"EnableWindowsFormsHighDpiAutoResizing\" value=\"true\" />\n    </appSettings>\n</configuration>"
  },
  {
    "path": "LogoDiy/DiyHelper.cs",
    "content": "﻿using System;\nusing System.Runtime.InteropServices;\n\nnamespace LogoDiy\n{\n\tpublic class DiyHelper\n\t{\n\t\t[DllImport(\"User32.dll\")]\n\t\tpublic static extern IntPtr FindWindow(string lpClassName, string lpWindowName);\n\n\t\t[DllImport(\"User32.dll\")]\n\t\tpublic static extern IntPtr SendMessage(int hWnd, int msg, IntPtr wParam, IntPtr lParam);\n\n\t\t[DllImport(\"AIToolAPI.dll\", CallingConvention = CallingConvention.Cdecl)]\n\t\tpublic static extern int GetLogoDIYInfo(ref byte enable, ref uint format, ref int height, ref int width);\n\n\t\t[DllImport(\"AIToolAPI.dll\", CallingConvention = CallingConvention.Cdecl)]\n\t\tpublic static extern int SetLogoDIYInfo(byte enable);\n\n\t\t[DllImport(\"AIToolAPI.dll\", CallingConvention = CallingConvention.Cdecl)]\n\t\tpublic static extern int SetLogDIYCRC(string filepath);\n\n\t\t[DllImport(\"AIToolAPI.dll\", CallingConvention = CallingConvention.Cdecl)]\n\t\tpublic static extern int IsEditionCircle();\n\n\t\t[DllImport(\"Kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n\t\tpublic static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr);\n\n\t\t[DllImport(\"Kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\n\t\tpublic static extern bool Wow64RevertWow64FsRedirection(IntPtr ptr);\n\t}\n}\n"
  },
  {
    "path": "LogoDiy/EnumDisplayAttribute.cs",
    "content": "using System;\n\n[AttributeUsage(AttributeTargets.Field)]\npublic class EnumDisplayAttribute : Attribute\n{\n\tpublic string Display\n\t{\n\t\tget;\n\t\tprivate set;\n\t}\n\n\tpublic EnumDisplayAttribute(string displayStr)\n\t{\n\t\tDisplay = displayStr;\n\t}\n}\n"
  },
  {
    "path": "LogoDiy/EnumExtentions.cs",
    "content": "using System;\nusing System.Linq;\n\npublic static class EnumExtentions\n{\n\tpublic static string Display(this Enum t)\n\t{\n\t\tType type = t.GetType();\n\t\tstring name = Enum.GetName(type, t);\n\t\tEnumDisplayAttribute enumDisplayAttribute = type.GetField(name).GetCustomAttributes(inherit: false).FirstOrDefault((object p) => p.GetType().Equals(typeof(EnumDisplayAttribute))) as EnumDisplayAttribute;\n\t\tif (enumDisplayAttribute != null)\n\t\t{\n\t\t\treturn enumDisplayAttribute.Display;\n\t\t}\n\t\treturn name;\n\t}\n}\n"
  },
  {
    "path": "LogoDiy/Form1.Designer.cs",
    "content": "﻿namespace LogoDiy\n{\n    partial class Form1\n    {\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.IContainer components = null;\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing && (components != null))\n            {\n                components.Dispose();\n            }\n            base.Dispose(disposing);\n        }\n\n        #region Windows Form Designer generated code\n\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            this.SelectImage = new System.Windows.Forms.Button();\n            this.Apply = new System.Windows.Forms.Button();\n            this.Recovery = new System.Windows.Forms.Button();\n            this.checkBox1 = new System.Windows.Forms.CheckBox();\n            this.label1 = new System.Windows.Forms.Label();\n            this.label2 = new System.Windows.Forms.Label();\n            this.SuspendLayout();\n            // \n            // SelectImage\n            // \n            this.SelectImage.Location = new System.Drawing.Point(24, 22);\n            this.SelectImage.Name = \"SelectImage\";\n            this.SelectImage.Size = new System.Drawing.Size(199, 69);\n            this.SelectImage.TabIndex = 0;\n            this.SelectImage.Text = \"Select Image\";\n            this.SelectImage.UseVisualStyleBackColor = true;\n            this.SelectImage.Click += new System.EventHandler(this.button1_Click);\n            // \n            // Apply\n            // \n            this.Apply.Enabled = false;\n            this.Apply.Location = new System.Drawing.Point(244, 22);\n            this.Apply.Name = \"Apply\";\n            this.Apply.Size = new System.Drawing.Size(199, 69);\n            this.Apply.TabIndex = 1;\n            this.Apply.Text = \"Apply\";\n            this.Apply.UseVisualStyleBackColor = true;\n            this.Apply.Click += new System.EventHandler(this.button2_Click);\n            // \n            // Recovery\n            // \n            this.Recovery.Location = new System.Drawing.Point(771, 22);\n            this.Recovery.Name = \"Recovery\";\n            this.Recovery.Size = new System.Drawing.Size(199, 69);\n            this.Recovery.TabIndex = 2;\n            this.Recovery.Text = \"Reset to default\";\n            this.Recovery.UseVisualStyleBackColor = true;\n            this.Recovery.Click += new System.EventHandler(this.button1_Click_1);\n            // \n            // checkBox1\n            // \n            this.checkBox1.AutoSize = true;\n            this.checkBox1.Enabled = false;\n            this.checkBox1.Location = new System.Drawing.Point(495, 43);\n            this.checkBox1.Name = \"checkBox1\";\n            this.checkBox1.Size = new System.Drawing.Size(226, 29);\n            this.checkBox1.TabIndex = 3;\n            this.checkBox1.Text = \"Show Loading Icon\";\n            this.checkBox1.UseVisualStyleBackColor = true;\n            this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);\n            // \n            // label1\n            // \n            this.label1.AutoSize = true;\n            this.label1.ForeColor = System.Drawing.Color.DarkRed;\n            this.label1.Location = new System.Drawing.Point(763, 117);\n            this.label1.Name = \"label1\";\n            this.label1.Size = new System.Drawing.Size(207, 25);\n            this.label1.TabIndex = 4;\n            this.label1.Text = \"Use at your own risk\";\n            // \n            // label2\n            // \n            this.label2.AutoSize = true;\n            this.label2.ForeColor = System.Drawing.Color.DarkRed;\n            this.label2.Location = new System.Drawing.Point(19, 117);\n            this.label2.Name = \"label2\";\n            this.label2.Size = new System.Drawing.Size(156, 25);\n            this.label2.TabIndex = 5;\n            this.label2.Text = \"Format: , Max: \";\n            // \n            // Form1\n            // \n            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.ClientSize = new System.Drawing.Size(997, 169);\n            this.Controls.Add(this.label2);\n            this.Controls.Add(this.label1);\n            this.Controls.Add(this.checkBox1);\n            this.Controls.Add(this.Recovery);\n            this.Controls.Add(this.Apply);\n            this.Controls.Add(this.SelectImage);\n            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\n            this.MaximizeBox = false;\n            this.Name = \"Form1\";\n            this.Text = \"LogoDiy\";\n            this.Load += new System.EventHandler(this.Form1_Load);\n            this.ResumeLayout(false);\n            this.PerformLayout();\n\n        }\n\n        #endregion\n\n        private System.Windows.Forms.Button SelectImage;\n        private System.Windows.Forms.Button Apply;\n        private System.Windows.Forms.Button Recovery;\n        private System.Windows.Forms.CheckBox checkBox1;\n        private System.Windows.Forms.Label label1;\n        private System.Windows.Forms.Label label2;\n    }\n}\n\n"
  },
  {
    "path": "LogoDiy/Form1.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace LogoDiy\n{\n    public partial class Form1 : Form\n    {\n        public Form1()\n        {\n            InitializeComponent();\n        }\n\n        private void Form1_Load(object sender, EventArgs e)\n        {\n            LogoDiyViewModel.Instance.CreateViewData();\n            if (!LogoDiyViewModel.Instance.UIIsEnable)\n            {\n                MessageBox.Show(\"Unsupported BIOS!\\nThis application only supports Lenovo computers with newer BIOS versions.\");\n                Application.Exit();\n                return;\n            }\n            if (LogoDiyViewModel.Instance.VidibalyLodingIco)\n            {\n                checkBox1.Checked = LogoDiyViewModel.Instance.IsShowLodingIco;\n                checkBox1.Enabled = true;\n            }\n            label2.Text = \"Format: \" + LogoDiyViewModel.Instance.Filter + \" / Max: \" + LogoDiyViewModel.Instance.DefaultWidth.ToString() + \"x\" + LogoDiyViewModel.Instance.DefaultHeight.ToString();\n        }\n\n        private void button1_Click(object sender, EventArgs e)\n        {\n            LogoDiyViewModel.Instance.SelectedImageClick();\n            showTip();\n        }\n\n        private void button2_Click(object sender, EventArgs e)\n        {\n            LogoDiyViewModel.Instance.SaveLogoClick();\n            showTip();\n        }\n\n        private void showTip()\n        {\n            if (LogoDiyViewModel.Instance.ShowWarning)\n            {\n                MessageBox.Show(LogoDiyViewModel.Instance.ShowWarnInfo);\n                LogoDiyViewModel.Instance.ShowWarning = false;\n            }\n            if (LogoDiyViewModel.Instance.ShowSuccessTip)\n            {\n                MessageBox.Show(LogoDiyViewModel.Instance.ShowSuccessText);\n                LogoDiyViewModel.Instance.ShowSuccessTip = false;\n            }\n            Apply.Enabled = LogoDiyViewModel.Instance.FunEnable;\n            Recovery.Enabled = LogoDiyViewModel.Instance.CanRecovery;\n        }\n\n        private void button1_Click_1(object sender, EventArgs e)\n        {\n            LogoDiyViewModel.Instance.ToRecovery();\n            showTip();\n        }\n\n        private void checkBox1_CheckedChanged(object sender, EventArgs e)\n        {\n            if (!checkBox1.Enabled)\n            {\n                return;\n            }\n            if (LogoDiyViewModel.Instance.ChangeLodingIco(checkBox1.Checked))\n            {\n                MessageBox.Show(\"Done!\");\n            } else\n            {\n                MessageBox.Show(\"Failed!\");\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "LogoDiy/Form1.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n</root>"
  },
  {
    "path": "LogoDiy/LogHelper.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Diagnostics;\n\nnamespace LogoDiy\n{\n    class LogHelper\n    {\n        public static void Info(string info)\n        {\n            Console.WriteLine(info);\n            Debug.WriteLine(info);\n        }\n\n        public static void Error(string info)\n        {\n            Info(info);\n        }\n\n        public static void Error(Exception ex)\n        {\n            Info(ex.ToString());\n        }\n    }\n}\n"
  },
  {
    "path": "LogoDiy/LogoDiy.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{3DF19333-D9AA-4CFD-8B0F-21DF0916508C}</ProjectGuid>\n    <OutputType>WinExe</OutputType>\n    <RootNamespace>LogoDIY</RootNamespace>\n    <AssemblyName>LogoDIY</AssemblyName>\n    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>\n    <Deterministic>true</Deterministic>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup>\n    <ApplicationManifest>app.manifest</ApplicationManifest>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"PresentationCore\" />\n    <Reference Include=\"PresentationFramework\" />\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xaml\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Deployment\" />\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Net.Http\" />\n    <Reference Include=\"System.Windows.Forms\" />\n    <Reference Include=\"System.Xml\" />\n    <Reference Include=\"WindowsBase\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"EnumDisplayAttribute.cs\" />\n    <Compile Include=\"EnumExtentions.cs\" />\n    <Compile Include=\"LogHelper.cs\" />\n    <Compile Include=\"LogoDiyViewModel.cs\" />\n    <Compile Include=\"Form1.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"Form1.Designer.cs\">\n      <DependentUpon>Form1.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"DiyHelper.cs\" />\n    <EmbeddedResource Include=\"Form1.resx\">\n      <DependentUpon>Form1.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"Properties\\Resources.resx\">\n      <Generator>ResXFileCodeGenerator</Generator>\n      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\n      <SubType>Designer</SubType>\n    </EmbeddedResource>\n    <Compile Include=\"Properties\\Resources.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DependentUpon>Resources.resx</DependentUpon>\n      <DesignTime>True</DesignTime>\n    </Compile>\n    <None Include=\"app.manifest\" />\n    <None Include=\"Properties\\Settings.settings\">\n      <Generator>SettingsSingleFileGenerator</Generator>\n      <LastGenOutput>Settings.Designer.cs</LastGenOutput>\n    </None>\n    <Compile Include=\"Properties\\Settings.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DependentUpon>Settings.settings</DependentUpon>\n      <DesignTimeSharedInput>True</DesignTimeSharedInput>\n    </Compile>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"AIToolAPI.dll\">\n      <CopyToOutputDirectory>Always</CopyToOutputDirectory>\n    </None>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n</Project>"
  },
  {
    "path": "LogoDiy/LogoDiyViewModel.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Input;\nusing System.Windows.Media.Imaging;\nusing System.Windows.Forms;\n\nnamespace LogoDiy\n{\n\tpublic class LogoDiyViewModel\n\t{\n\t\tpublic enum FileExtension\n\t\t{\n\t\t\t[EnumDisplay(\".jpg\")]\n\t\t\tJPG = 255216,\n\t\t\t[EnumDisplay(\".gif\")]\n\t\t\tGIF = 7173,\n\t\t\t[EnumDisplay(\".png\")]\n\t\t\tPNG = 13780,\n\t\t\t[EnumDisplay(\".bmp\")]\n\t\t\tBMP = 19778,\n\t\t\t[EnumDisplay(\".bmp\")]\n\t\t\tBMP2 = 6677,\n\t\t\t[EnumDisplay(\".jpeg\")]\n\t\t\tJPEG = 65496\n\t\t}\n\n\t\tprivate enum ButtonStyle\n\t\t{\n\t\t\tJPG = 1,\n\t\t\tTGA = 2,\n\t\t\tPCX = 4,\n\t\t\tGIF = 8,\n\t\t\tBMP = 0x10,\n\t\t\tPNG = 0x20\n\t\t}\n\n\t\tprivate static LogoDiyViewModel _instance;\n\n\t\tprivate bool _IsShowLodingIco = true;\n\n\t\tprivate bool vidibalyLodingIco;\n\n\t\tprivate string _SupportingFormat = \"jpg、jepg、bmp\";\n\n\t\tprivate double _ImageHeight = 140.0;\n\n\t\tprivate double _ImageWidth = 224.0;\n\n\t\tprivate bool _ShowWarning;\n\n\t\tprivate string _ShowWarnInfo;\n\n\t\tprivate bool _ShowSuccessTip;\n\n\t\tprivate string showSuccessText = \"\";\n\n\t\tprivate BitmapImage imageSource;\n\n\t\tprivate bool _UIIsEnable = true;\n\n\t\tprivate bool funEnable = true;\n\n\t\tprivate long diskFreeSpace = 54525952L;\n\n\t\tprivate bool canRecovery;\n\n\t\tprivate string name;\n\n\t\tprivate int defaultHeight = 1080;\n\n\t\tprivate int defaultWidth = 1920;\n\n\t\tprivate string imagePath1;\n\n\t\tprivate string defaultpath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, \"Images/pc.png\");\n\n\t\tprivate string fileExtension = \"\";\n\n\t\tprivate string filter1 = \"*.png,*.jpg,*.bmp\";\n\n\t\tprivate string filter2 = \"*.png;*.jpg;*.bmp\";\n\n\t\tpublic static LogoDiyViewModel Instance\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\tif (_instance == null)\n\t\t\t\t{\n\t\t\t\t\t_instance = new LogoDiyViewModel();\n\t\t\t\t}\n\t\t\t\treturn _instance;\n\t\t\t}\n\t\t}\n\n\t\tpublic bool IsShowLodingIco\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _IsShowLodingIco;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_IsShowLodingIco = value;\n\t\t\t\t// RaisePropertyChanged(() => IsShowLodingIco);\n\t\t\t}\n\t\t}\n\n\t\tpublic bool VidibalyLodingIco\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn vidibalyLodingIco;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\tvidibalyLodingIco = value;\n\t\t\t\t// RaisePropertyChanged(() => VidibalyLodingIco);\n\t\t\t}\n\t\t}\n\n\t\tpublic string Filter\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn filter1;\n\t\t\t}\n\t\t}\n\n\t\tpublic string SupportingFormat\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _SupportingFormat;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_SupportingFormat = value;\n\t\t\t\t// RaisePropertyChanged(() => SupportingFormat);\n\t\t\t}\n\t\t}\n\n\t\tpublic double ImageHeight\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _ImageHeight;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_ImageHeight = value;\n\t\t\t\t// RaisePropertyChanged(() => ImageHeight);\n\t\t\t}\n\t\t}\n\n\t\tpublic double ImageWidth\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _ImageWidth;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_ImageWidth = value;\n\t\t\t\t// RaisePropertyChanged(() => ImageWidth);\n\t\t\t}\n\t\t}\n\n\t\tpublic bool ShowWarning\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _ShowWarning;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_ShowWarning = value;\n\t\t\t\t// RaisePropertyChanged(() => ShowWarning);\n\t\t\t}\n\t\t}\n\n\t\tpublic string ShowWarnInfo\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _ShowWarnInfo;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_ShowWarnInfo = value;\n\t\t\t\t// RaisePropertyChanged(() => ShowWarnInfo);\n\t\t\t}\n\t\t}\n\n\t\tpublic bool ShowSuccessTip\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _ShowSuccessTip;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_ShowSuccessTip = value;\n\t\t\t\t// RaisePropertyChanged(() => ShowSuccessTip);\n\t\t\t}\n\t\t}\n\n\t\tpublic string ShowSuccessText\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn showSuccessText;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\tshowSuccessText = value;\n\t\t\t\t// RaisePropertyChanged(() => ShowSuccessText);\n\t\t\t}\n\t\t}\n\n\t\tpublic BitmapImage ImageSource\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn imageSource;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\timageSource = value;\n\t\t\t\t// RaisePropertyChanged(() => ImageSource);\n\t\t\t}\n\t\t}\n\n\t\tpublic bool UIIsEnable\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn _UIIsEnable;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\t_UIIsEnable = value;\n\t\t\t\t// RaisePropertyChanged(() => UIIsEnable);\n\t\t\t}\n\t\t}\n\n\t\tpublic bool FunEnable\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn funEnable;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\tfunEnable = value;\n\t\t\t\t// RaisePropertyChanged(() => FunEnable);\n\t\t\t}\n\t\t}\n\n\t\tpublic long DiskFreeSpace => diskFreeSpace;\n\n\t\tpublic bool CanRecovery\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn canRecovery;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\tcanRecovery = value;\n\t\t\t\t// RaisePropertyChanged(() => CanRecovery);\n\t\t\t}\n\t\t}\n\n\t\tpublic int DefaultHeight\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn defaultHeight;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\tvalue = defaultHeight;\n\t\t\t\t// RaisePropertyChanged(() => DefaultHeight);\n\t\t\t}\n\t\t}\n\n\t\tpublic int DefaultWidth\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn defaultWidth;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\tdefaultWidth = value;\n\t\t\t\t// RaisePropertyChanged(() => DefaultWidth);\n\t\t\t}\n\t\t}\n\n\t\tpublic string ImagePath1\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn imagePath1;\n\t\t\t}\n\t\t\tset\n\t\t\t{\n\t\t\t\timagePath1 = value;\n\t\t\t\t// RaisePropertyChanged(() => ImagePath1);\n\t\t\t}\n\t\t}\n\n\t\tprivate LogoDiyViewModel()\n\t\t{\n\t\t}\n\n\t\tpublic void CreateViewData()\n\t\t{\n\t\t\tImageHeight = 140.0;\n\t\t\tImageWidth = 224.0;\n\t\t\tShowSuccessTip = false;\n\t\t\tShowWarning = false;\n\t\t\tGetLogoInfo();\n\t\t\tVidibalyLodingIco = GetLoadingCircle();\n\t\t\tif (VidibalyLodingIco)\n\t\t\t{\n\t\t\t\tGetShowLodingIco();\n\t\t\t}\n\t\t}\n\n\t\tprivate bool GetLoadingCircle()\n\t\t{\n\t\t\tint build = Environment.OSVersion.Version.Build;\n\t\t\tLogoDiy.LogHelper.Info($\"ostype = {build}\");\n\t\t\tif (build > 14393)\n\t\t\t{\n\t\t\t\tint num = DiyHelper.IsEditionCircle();\n\t\t\t\tLogoDiy.LogHelper.Info($\"IsEditionCircle = {num}\");\n\t\t\t\tif (num != 0)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tprivate void GetShowLodingIco()\n\t\t{\n\t\t\tIntPtr ptr = default(IntPtr);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tDiyHelper.Wow64DisableWow64FsRedirection(ref ptr);\n\t\t\t\tstring text = \"bcdedit /enum all\";\n\t\t\t\tProcess process = new Process();\n\t\t\t\tprocess.StartInfo.FileName = \"cmd.exe\";\n\t\t\t\tprocess.StartInfo.UseShellExecute = false;\n\t\t\t\tprocess.StartInfo.RedirectStandardInput = true;\n\t\t\t\tprocess.StartInfo.RedirectStandardOutput = true;\n\t\t\t\tprocess.StartInfo.RedirectStandardError = true;\n\t\t\t\tprocess.StartInfo.CreateNoWindow = true;\n\t\t\t\tprocess.Start();\n\t\t\t\tprocess.StandardInput.WriteLine(text + \"&exit\");\n\t\t\t\tprocess.StandardInput.AutoFlush = true;\n\t\t\t\tStreamReader standardOutput = process.StandardOutput;\n\t\t\t\tstring text2 = standardOutput.ReadLine();\n\t\t\t\tbool flag = false;\n\t\t\t\twhile (!standardOutput.EndOfStream)\n\t\t\t\t{\n\t\t\t\t\ttext2 = standardOutput.ReadLine();\n\t\t\t\t\tif ((text2.Contains(\"标识符\") || text2.Contains(\"identifier\")) && text2.Contains(\"{globalsettings}\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (flag && text2.Contains(\"bootuxdisabled\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tConsole.WriteLine(\"gobalsettings: \" + text2);\n\t\t\t\t\t\tstring text3 = text2.Replace(\"bootuxdisabled\", \"\").Trim();\n\t\t\t\t\t\tIsShowLodingIco = text3.Contains(\"No\");\n\t\t\t\t\t\tLogoDiy.LogHelper.Info($\"{text2}; 載入系統圖示 = {IsShowLodingIco}\");\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprocess.WaitForExit();\n\t\t\t\tprocess.Close();\n\t\t\t}\n\t\t\tcatch (Exception)\n\t\t\t{\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tDiyHelper.Wow64RevertWow64FsRedirection(ptr);\n\t\t\t}\n\t\t}\n\n\t\tprivate long GetHardDiskFreeSpace(string str_HardDiskName)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tstr_HardDiskName += \":\\\\\";\n\t\t\t\tDriveInfo[] drives = DriveInfo.GetDrives();\n\t\t\t\tforeach (DriveInfo driveInfo in drives)\n\t\t\t\t{\n\t\t\t\t\tConsole.WriteLine($\"{driveInfo.Name}\");\n\t\t\t\t\tif (driveInfo.Name == str_HardDiskName)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn driveInfo.TotalFreeSpace;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception)\n\t\t\t{\n\t\t\t}\n\t\t\treturn 0L;\n\t\t}\n\n\t\tprivate void GetDiskFree(long freeM)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tlong num = 33554432L;\n\t\t\t\tdiskFreeSpace = freeM - num;\n\t\t\t\tLogoDiy.LogHelper.Info($\"diskFreeSpace = {diskFreeSpace}; freeTotal = {freeM};  _32M = {num} \");\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Error(ex);\n\t\t\t}\n\t\t}\n\n\t\tprivate bool IsSizeExceed(string path)\n\t\t{\n\t\t\tImage image = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tPath.GetExtension(path);\n\t\t\t\timage = Image.FromFile(path);\n\t\t\t\tdouble num = image.Width;\n\t\t\t\tdouble num2 = image.Height;\n\t\t\t\tif (num > (double)DefaultWidth || num2 > (double)DefaultHeight)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcatch (Exception)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\timage?.Dispose();\n\t\t\t}\n\t\t}\n\n\t\tprivate bool SetImageSize(string path)\n\t\t{\n\t\t\tImage image = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tPath.GetExtension(path);\n\t\t\t\timage = Image.FromFile(path);\n\t\t\t\tdouble num = image.Width;\n\t\t\t\tdouble num2 = image.Height;\n\t\t\t\tLogoDiy.LogHelper.Info($\"img h = {num2}; w = {num}\");\n\t\t\t\tImageHeight = 140.0 * num2 / (double)defaultHeight;\n\t\t\t\tImageWidth = 224.0 * num / (double)defaultWidth;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (Exception)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\timage?.Dispose();\n\t\t\t}\n\t\t}\n\n\t\tprivate void SetImagePath(bool defaultImage)\n\t\t{\n\t\t\tstring tempPath = Path.GetTempPath();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tstring text = ChangeEFIDisk(mount: true);\n\t\t\t\tlong hardDiskFreeSpace = GetHardDiskFreeSpace(text);\n\t\t\t\tstring path = Path.Combine(text + \":\", \"EFI\\\\Lenovo\\\\Logo\");\n\t\t\t\tif (!defaultImage && Directory.Exists(path))\n\t\t\t\t{\n\t\t\t\t\tstring[] files = Directory.GetFiles(path);\n\t\t\t\t\tif (files.Length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstring text2 = files[0];\n\t\t\t\t\t\ttempPath = Path.Combine(tempPath, Path.GetFileName(text2));\n\t\t\t\t\t\tFile.Copy(text2, tempPath, overwrite: true);\n\t\t\t\t\t\tSetImageSize(tempPath);\n\t\t\t\t\t\tGetBitmapImage(tempPath);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tGetBitmapImage(defaultpath);\n\t\t\t\t}\n\t\t\t\tGetDiskFree(hardDiskFreeSpace);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Info($\"SetImagePath error {ex.Message}\");\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tChangeEFIDisk(mount: false);\n\t\t\t}\n\t\t}\n\n\t\tpublic void ToRecovery()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tname = ChangeEFIDisk(mount: true);\n\t\t\t\tstring text = \"\";\n\t\t\t\ttext = Path.Combine(name + \":\\\\\", \"EFI\\\\Lenovo\\\\Logo\");\n\t\t\t\tDeleteOtherDirectory(text);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Error(ex);\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tChangeEFIDisk(mount: false);\n\t\t\t}\n\t\t\tint num = DiyHelper.SetLogoDIYInfo(0);\n\t\t\tLogoDiy.LogHelper.Info($\"set logoinfo ret = {num}\");\n\t\t\tif (num == 0)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Info($\"set logoinfo error: ret = {num}\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tShowSuccessText = \"Done! Restored to default settings.\\n預設設定恢復成功\";\n\t\t\tShowSuccessTip = true;\n\t\t\tFunEnable = false;\n\t\t}\n\n\t\tprivate void GetLogoInfo()\n\t\t{\n\t\t\tuint format = 0u;\n\t\t\tbyte enable = 0;\n\t\t\tint logoDIYInfo = DiyHelper.GetLogoDIYInfo(ref enable, ref format, ref defaultHeight, ref defaultWidth);\n\n\t\t\tLogoDiy.LogHelper.Info($\"ret1 = {logoDIYInfo}; Height = {defaultHeight}; Width = {defaultWidth}\");\n\t\t\tif (logoDIYInfo != 0)\n\t\t\t{\n\t\t\t\tChangeSupportingFormat(format);\n\t\t\t\tif (defaultHeight < 0 || defaultWidth < 0)\n\t\t\t\t{\n\t\t\t\t\tLogoDiy.LogHelper.Info(\"get height/width error, set default 1920*1080\");\n\t\t\t\t\tDefaultWidth = 1920;\n\t\t\t\t\tDefaultHeight = 1080;\n\t\t\t\t}\n\t\t\t\tLogoDiy.LogHelper.Info($\"get logoinfo -> enable = {enable}; type = {format}; \");\n\t\t\t\tbool flag = enable == 0;\n\t\t\t\tSetImagePath(flag);\n\t\t\t\tCanRecovery = !flag;\n\t\t\t\tFunEnable = !flag;\n\t\t\t\tUIIsEnable = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tGetBitmapImage(defaultpath);\n\t\t\t\tLogoDiy.LogHelper.Info(\"get logo_info error:\");\n\t\t\t\tUIIsEnable = false;\n\t\t\t\tFunEnable = false;\n\t\t\t\tCanRecovery = false;\n\t\t\t}\n\t\t}\n\n\t\tpublic void SaveLogoClick()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tConsole.WriteLine(\"SaveLogoClick\");\n\t\t\t\tint num = DiyHelper.SetLogoDIYInfo(1);\n\t\t\t\tLogoDiy.LogHelper.Info($\"set logoinfo ret = {num}\");\n\t\t\t\tif (num == 0)\n\t\t\t\t{\n\t\t\t\t\tShowSuccessTip = false;\n\t\t\t\t\tLogoDiy.LogHelper.Info($\"set logoinfo error: ret = {num}\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tLogoDiy.LogHelper.Info($\"set logoinfo success:  ret = {num}\");\n\t\t\t\tname = ChangeEFIDisk(mount: true);\n\t\t\t\tstring text = \"\";\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tstring extension = Path.GetExtension(ImagePath1);\n\t\t\t\t\tif (!string.IsNullOrWhiteSpace(fileExtension) && extension != fileExtension)\n\t\t\t\t\t{\n\t\t\t\t\t\textension = fileExtension;\n\t\t\t\t\t}\n\t\t\t\t\ttext = Path.Combine(name + \":\\\\\", \"EFI\\\\Lenovo\\\\Logo\", $\"mylogo_{DefaultWidth}x{DefaultHeight}\" + extension);\n\t\t\t\t\tLogoDiy.LogHelper.Info($\"path = {text}\");\n\t\t\t\t\tDeleteOtherFile(text);\n\t\t\t\t\tLogoDiy.LogHelper.Info($\"source path = {ImagePath1}; dest path = {text}\");\n\t\t\t\t\tFile.Copy(ImagePath1, text);\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tLogoDiy.LogHelper.Info(\"copy file error:\" + ex.Message);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (DiyHelper.SetLogDIYCRC(text) > 0)\n\t\t\t\t{\n\t\t\t\t\tLogoDiy.LogHelper.Info(\"Set CRC success\");\n\t\t\t\t\tChangeEFIDisk(mount: false);\n\t\t\t\t\tShowSuccessText = \"Success! You can restart to view the new boot logo now.\\n設定成功，請重新啟動電腦檢視效果\";\n\t\t\t\t\tShowSuccessTip = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tLogoDiy.LogHelper.Info(\"Set CRC ERROR\");\n\t\t\t\t\tShowSuccessTip = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ex2)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Error(ex2);\n\t\t\t\tShowSuccessTip = false;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tCanRecovery = true;\n\t\t\t\tChangeEFIDisk(mount: false);\n\t\t\t}\n\t\t}\n\n\t\tprivate void DeleteOtherDirectory(string path)\n\t\t{\n\t\t\tif (Directory.Exists(path))\n\t\t\t{\n\t\t\t\tDirectory.Delete(path, recursive: true);\n\t\t\t}\n\t\t}\n\n\t\tprivate void DeleteOtherFile(string path)\n\t\t{\n\t\t\tstring directoryName = Path.GetDirectoryName(path);\n\t\t\tLogoDiy.LogHelper.Info($\"delete directory {directoryName}\");\n\t\t\tif (Directory.Exists(directoryName))\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Info(\"Delete directory error, to delete file\");\n\t\t\t\tstring[] files = Directory.GetFiles(directoryName);\n\t\t\t\tforeach (string text in files)\n\t\t\t\t{\n\t\t\t\t\tLogoDiy.LogHelper.Info($\"delete other file {text}\");\n\t\t\t\t\tFile.Delete(text);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Info($\"Create new directory {directoryName}\");\n\t\t\t\tDirectory.CreateDirectory(directoryName);\n\t\t\t}\n\t\t}\n\n\t\tprivate string GetDiskName()\n\t\t{\n\t\t\tstring[] logicalDrives = Directory.GetLogicalDrives();\n\t\t\tfor (int i = 65; i < 91; i++)\n\t\t\t{\n\t\t\t\tASCIIEncoding aSCIIEncoding = new ASCIIEncoding();\n\t\t\t\tbyte[] bytes = new byte[1]\n\t\t\t\t{\n\t\t\t\t\t(byte)i\n\t\t\t\t};\n\t\t\t\tstring @string = aSCIIEncoding.GetString(bytes);\n\t\t\t\tif (!logicalDrives.Contains(@string))\n\t\t\t\t{\n\t\t\t\t\treturn @string;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn \"\";\n\t\t}\n\n\t\tprivate string ChangeEFIDisk(bool mount)\n\t\t{\n\t\t\tstring diskName = GetDiskName();\n\t\t\ttry\n\t\t\t{\n\t\t\t\tstring arg = (mount ? \"/s\" : \"/d\");\n\t\t\t\tstring text = $\"mountvol {diskName}: {arg}\";\n\t\t\t\tLogoDiy.LogHelper.Info(text);\n\t\t\t\tProcess process = new Process();\n\t\t\t\tprocess.StartInfo.FileName = \"cmd.exe\";\n\t\t\t\tprocess.StartInfo.UseShellExecute = false;\n\t\t\t\tprocess.StartInfo.RedirectStandardInput = true;\n\t\t\t\tprocess.StartInfo.RedirectStandardOutput = true;\n\t\t\t\tprocess.StartInfo.RedirectStandardError = true;\n\t\t\t\tprocess.StartInfo.CreateNoWindow = true;\n\t\t\t\tprocess.Start();\n\t\t\t\tprocess.StandardInput.WriteLine(text + \"&exit\");\n\t\t\t\tprocess.StandardInput.AutoFlush = true;\n\t\t\t\tprocess.WaitForExit();\n\t\t\t\tprocess.Close();\n\t\t\t\treturn diskName;\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Error(ex);\n\t\t\t\treturn diskName;\n\t\t\t}\n\t\t}\n\n\t\tpublic bool ChangeLodingIco(bool isShow)\n\t\t{\n\t\t\tIntPtr ptr = default(IntPtr);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tDiyHelper.Wow64DisableWow64FsRedirection(ref ptr);\n\t\t\t\tstring text = \"\";\n\t\t\t\ttext = ((!isShow) ? \"bcdedit.exe -set {globalsettings} bootuxdisabled on\" : \"bcdedit.exe -set {globalsettings} bootuxdisabled off\");\n\t\t\t\tConsole.WriteLine(text);\n\t\t\t\tLogoDiy.LogHelper.Info(text);\n\t\t\t\tProcess process = new Process();\n\t\t\t\tprocess.StartInfo.FileName = \"cmd.exe\";\n\t\t\t\tprocess.StartInfo.UseShellExecute = false;\n\t\t\t\tprocess.StartInfo.RedirectStandardInput = true;\n\t\t\t\tprocess.StartInfo.RedirectStandardOutput = true;\n\t\t\t\tprocess.StartInfo.RedirectStandardError = true;\n\t\t\t\tprocess.StartInfo.CreateNoWindow = true;\n\t\t\t\tprocess.Start();\n\t\t\t\tprocess.StandardInput.WriteLine(text + \"&exit\");\n\t\t\t\tprocess.StandardInput.AutoFlush = true;\n\t\t\t\tprocess.WaitForExit();\n\t\t\t\tprocess.Close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Error(ex);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tDiyHelper.Wow64RevertWow64FsRedirection(ptr);\n\t\t\t}\n\t\t}\n\n\t\tpublic bool ImageCheck(string path)\n\t\t{\n\t\t\tFileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read);\n\t\t\tBinaryReader binaryReader = new BinaryReader(fileStream);\n\t\t\tstring empty = string.Empty;\n\t\t\tbool flag = false;\n\t\t\tflag = IsImage(path);\n\t\t\tif (!flag)\n\t\t\t{\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\tPath.GetExtension(path);\n\t\t\t\tempty += binaryReader.ReadByte();\n\t\t\t\tempty += binaryReader.ReadByte();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tFileExtension fileExtension = (FileExtension)Enum.Parse(typeof(FileExtension), empty);\n\t\t\t\t\tswitch (fileExtension)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase FileExtension.BMP2:\n\t\t\t\t\t\tcase FileExtension.PNG:\n\t\t\t\t\t\tcase FileExtension.BMP:\n\t\t\t\t\t\tcase FileExtension.JPEG:\n\t\t\t\t\t\tcase FileExtension.JPG:\n\t\t\t\t\t\t\tthis.fileExtension = fileExtension.Display();\n\t\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\t\treturn flag;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\treturn flag;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tLogoDiy.LogHelper.Error(ex);\n\t\t\t\t\treturn flag;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception ex2)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Error(ex2);\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tif (fileStream != null)\n\t\t\t\t{\n\t\t\t\t\tfileStream.Close();\n\t\t\t\t\tbinaryReader.Close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate bool IsImage(string path)\n\t\t{\n\t\t\tImage image = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tstring text = Path.GetExtension(path).ToLower();\n\t\t\t\tif (!(text == \".tga\") && !(text == \".pcx\"))\n\t\t\t\t{\n\t\t\t\t\timage = Image.FromFile(path);\n\t\t\t\t\timage.Dispose();\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (Exception)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\timage?.Dispose();\n\t\t\t}\n\t\t}\n\n\t\tpublic void SelectedImageClick()\n\t\t{\n\t\t\tShowSuccessTip = false;\n\t\t\tOpenFileDialog openFileDialog = new OpenFileDialog();\n\t\t\topenFileDialog.Multiselect = false;\n\t\t\topenFileDialog.Title = \"Please select an image / 請選擇圖片\";\n\t\t\topenFileDialog.Filter = $\"Image({filter1})|{filter2}\";\n\t\t\tvar res = openFileDialog.ShowDialog();\n\t\t\tif (res == DialogResult.OK)\n\t\t\t{\n\t\t\t\tCanRecovery = false;\n\t\t\t\tFunEnable = false;\n\t\t\t\tstring fileName = openFileDialog.FileName;\n\t\t\t\tFileInfo fileInfo = new FileInfo(fileName);\n\t\t\t\tif (!ImageCheck(fileName))\n\t\t\t\t{\n\t\t\t\t\tShowWarning = true;\n\t\t\t\t\tShowWarnInfo = \"The selected file is not an image!\\n當前選擇的檔案不是圖片，請重試！\";\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (fileInfo.Length > DiskFreeSpace)\n\t\t\t\t{\n\t\t\t\t\tint num = (int)(DiskFreeSpace / 1024 / 1024);\n\t\t\t\t\tShowWarnInfo = $\"Image must not exceed {num}MB!\\n圖片不得超過{num}MB，請重新選擇！\";\n\t\t\t\t\tShowWarning = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (IsSizeExceed(fileName))\n\t\t\t\t{\n\t\t\t\t\tShowWarnInfo = \"The image exceeds the maximum resolution!\\n圖片超出最大解析度，請重新選擇！\";\n\t\t\t\t\tShowWarning = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tGetBitmapImage(fileName);\n\t\t\t\tSetImageSize(fileName);\n\t\t\t\tFunEnable = true;\n\t\t\t\tShowWarning = false;\n\t\t\t\tLogoDiy.LogHelper.Info($\"介面圖片大小>>height = {ImageHeight}; width = {ImageWidth};\");\n\t\t\t}\n\t\t}\n\n\t\tpublic void GetBitmapImage(string imagePath)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\timagePath1 = imagePath;\n\t\t\t\tBitmapImage bitmapImage = new BitmapImage();\n\t\t\t\tbitmapImage.BeginInit();\n\t\t\t\tbitmapImage.CacheOption = BitmapCacheOption.OnLoad;\n\t\t\t\tbitmapImage.UriSource = new Uri(imagePath);\n\t\t\t\tbitmapImage.EndInit();\n\t\t\t\tImageSource = bitmapImage.Clone();\n\t\t\t\tbitmapImage.Freeze();\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tLogoDiy.LogHelper.Error(ex);\n\t\t\t}\n\t\t}\n\n\t\tprivate void ChangeSupportingFormat(uint format)\n\t\t{\n\t\t\tfilter1 = \"\";\n\t\t\tfilter2 = \"\";\n\t\t\tif ((1u & format) != 0)\n\t\t\t{\n\t\t\t\tfilter1 += \"*.jpg,\";\n\t\t\t\tfilter2 += \"*.jpg;\";\n\t\t\t}\n\t\t\tif ((0x10u & format) != 0)\n\t\t\t{\n\t\t\t\tfilter1 += \"*.bmp,\";\n\t\t\t\tfilter2 += \"*.bmp;\";\n\t\t\t}\n\t\t\tif ((0x20u & format) != 0)\n\t\t\t{\n\t\t\t\tfilter1 += \"*.png,\";\n\t\t\t\tfilter2 += \"*.png;\";\n\t\t\t}\n\t\t\tfilter1 = filter1.Substring(0, filter1.Length - 1);\n\t\t\tfilter2 = filter2.Substring(0, filter2.Length - 1);\n\t\t\tSupportingFormat = filter2;\n\t\t}\n\t}\n}"
  },
  {
    "path": "LogoDiy/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace LogoDiy\n{\n    static class Program\n    {\n        /// <summary>\n        /// The main entry point for the application.\n        /// </summary>\n        [STAThread]\n        static void Main()\n        {\n            Application.EnableVisualStyles();\n            Application.SetCompatibleTextRenderingDefault(false);\n            Application.Run(new Form1());\n        }\n    }\n}\n"
  },
  {
    "path": "LogoDiy/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following\n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"LogoDIY\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"LogoDIY\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2020\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible\n// to COM components.  If you need to access a type in this assembly from\n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"3df19333-d9aa-4cfd-8b0f-21df0916508c\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version\n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers\n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "LogoDiy/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:4.0.30319.42000\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace LogoDIY.Properties {\n    using System;\n    \n    \n    /// <summary>\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\n    /// </summary>\n    // This class was auto-generated by the StronglyTypedResourceBuilder\n    // class via a tool like ResGen or Visual Studio.\n    // To add or remove a member, edit your .ResX file then rerun ResGen\n    // with the /str option, or rebuild your VS project.\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"16.0.0.0\")]\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    internal class Resources {\n        \n        private static global::System.Resources.ResourceManager resourceMan;\n        \n        private static global::System.Globalization.CultureInfo resourceCulture;\n        \n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n        internal Resources() {\n        }\n        \n        /// <summary>\n        ///   Returns the cached ResourceManager instance used by this class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Resources.ResourceManager ResourceManager {\n            get {\n                if (object.ReferenceEquals(resourceMan, null)) {\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"LogoDIY.Properties.Resources\", typeof(Resources).Assembly);\n                    resourceMan = temp;\n                }\n                return resourceMan;\n            }\n        }\n        \n        /// <summary>\n        ///   Overrides the current thread's CurrentUICulture property for all\n        ///   resource lookups using this strongly typed resource class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Globalization.CultureInfo Culture {\n            get {\n                return resourceCulture;\n            }\n            set {\n                resourceCulture = value;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "LogoDiy/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n</root>"
  },
  {
    "path": "LogoDiy/Properties/Settings.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:4.0.30319.42000\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace LogoDIY.Properties\n{\n\n\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"11.0.0.0\")]\n    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase\n    {\n\n        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n\n        public static Settings Default\n        {\n            get\n            {\n                return defaultInstance;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "LogoDiy/Properties/Settings.settings",
    "content": "﻿<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"http://schemas.microsoft.com/VisualStudio/2004/01/settings\" CurrentProfile=\"(Default)\">\n  <Profiles>\n    <Profile Name=\"(Default)\" />\n  </Profiles>\n  <Settings />\n</SettingsFile>\n"
  },
  {
    "path": "LogoDiy/app.manifest",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<assembly manifestVersion=\"1.0\" xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n  <assemblyIdentity version=\"1.0.0.0\" name=\"MyApplication.app\"/>\n  <trustInfo xmlns=\"urn:schemas-microsoft-com:asm.v2\">\n    <security>\n      <requestedPrivileges xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n        <!-- UAC Manifest Options\n             If you want to change the Windows User Account Control level replace the \n             requestedExecutionLevel node with one of the following.\n\n        <requestedExecutionLevel  level=\"asInvoker\" uiAccess=\"false\" />\n        <requestedExecutionLevel  level=\"requireAdministrator\" uiAccess=\"false\" />\n        <requestedExecutionLevel  level=\"highestAvailable\" uiAccess=\"false\" />\n\n            Specifying requestedExecutionLevel element will disable file and registry virtualization. \n            Remove this element if your application requires this virtualization for backwards\n            compatibility.\n        -->\n        <requestedExecutionLevel  level=\"requireAdministrator\" uiAccess=\"false\" />\n      </requestedPrivileges>\n    </security>\n  </trustInfo>\n\n  <compatibility xmlns=\"urn:schemas-microsoft-com:compatibility.v1\">\n    <application>\n      <!-- A list of the Windows versions that this application has been tested on\n           and is designed to work with. Uncomment the appropriate elements\n           and Windows will automatically select the most compatible environment. -->\n\n      <!-- Windows Vista -->\n      <!--<supportedOS Id=\"{e2011457-1546-43c5-a5fe-008deee3d3f0}\" />-->\n\n      <!-- Windows 7 -->\n      <!--<supportedOS Id=\"{35138b9a-5d96-4fbd-8e2d-a2440225f93a}\" />-->\n\n      <!-- Windows 8 -->\n      <!--<supportedOS Id=\"{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}\" />-->\n\n      <!-- Windows 8.1 -->\n      <!--<supportedOS Id=\"{1f676c76-80e1-4239-95bb-83d0f6d0da78}\" />-->\n\n      <!-- Windows 10 -->\n      <supportedOS Id=\"{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}\" />\n\n    </application>\n  </compatibility>\n\n  <!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher\n       DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need \n       to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should \n       also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->\n  <application xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n    <windowsSettings>\n      <dpiAware xmlns=\"http://schemas.microsoft.com/SMI/2005/WindowsSettings\">true</dpiAware>\n    </windowsSettings>\n  </application>\n\n  <!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->\n  <!--\n  <dependency>\n    <dependentAssembly>\n      <assemblyIdentity\n          type=\"win32\"\n          name=\"Microsoft.Windows.Common-Controls\"\n          version=\"6.0.0.0\"\n          processorArchitecture=\"*\"\n          publicKeyToken=\"6595b64144ccf1df\"\n          language=\"*\"\n        />\n    </dependentAssembly>\n  </dependency>\n  -->\n\n</assembly>\n"
  },
  {
    "path": "LogoDiy.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.30621.155\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"LogoDiy\", \"LogoDiy\\LogoDiy.csproj\", \"{3DF19333-D9AA-4CFD-8B0F-21DF0916508C}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{3DF19333-D9AA-4CFD-8B0F-21DF0916508C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{3DF19333-D9AA-4CFD-8B0F-21DF0916508C}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{3DF19333-D9AA-4CFD-8B0F-21DF0916508C}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{3DF19333-D9AA-4CFD-8B0F-21DF0916508C}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {6278FE5B-0A18-4BFF-B6BF-9F6146BDAB45}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "README.md",
    "content": "# Boot Logo Customization\n\n**EN** | [ZH](README.zh.md)\n\nCustomize Lenovo PC boot logo (screen) without installing \"Lenovo PC Manager\".\n\n**This program will modify BIOS settings, use at your own risk.** The copyright of the code and binary files used belongs to the original manufacturer.\n\n## Supported models\n\n***Only Lenovo computers (Ideapad / Xiaoxin, Legion, Yoga, etc.) are supported.***\n\n- Xiaoxin Pro 14 2021 Intel\n\n- Xiaoxin Pro 13 Ryzen\n\n- Xiaoxin Air 14 2020 Intel\n\n- ThinkBook 14 G4+ IAP\n\n- ThinkBook 15 Gen 3\n\n- Legion Y9000P 2022\n\n- Yoga 7 16IAP7\n\n- IdeaPad Gaming 3 15ACH6\n\n- IdeaPad 3 15ITL6\n\n- Feel free to test and add to this list\n\n## FAQ\n\n### New boot logo does not take effect / corrupted logo\n\nThis may happen when using `.jpg` format files saved with Photoshop. You can save the image as `.bmp` format, or resave it to `.jpg` format with other software (e.g. Microsoft Paint).\n\n### User interface of this utility is too ugly 🤯\n\nThis is actually just something I wanted to use for myself and quickly build ;).\n\n### Any recommendations for boot logo design?\n\n[Here](https://github.com/Coxxs/LogoDiy/tree/master/Examples) are some examples.\n"
  },
  {
    "path": "README.zh.md",
    "content": "# 開機 Logo 自訂\n\n[EN](README.md) | **ZH**\n\n自訂 Lenovo 電腦開機 Logo（畫面），無需安裝「聯想電腦管家」軟體。\n\n**涉及修改 BIOS 設置，一切風險自負。** 代碼及二進制檔案著作權歸其原開發商所有。\n\n## 測試可用機型\n\n**僅支援 Lenovo 電腦（Ideapad / Xiaoxin、Legion、Yoga 等）。**\n\n- Xiaoxin Pro 14 2021 Intel\n\n- Xiaoxin Pro 13 Ryzen\n\n- Xiaoxin Air 14 2020 Intel\n\n- ThinkBook 14 G4+ IAP\n\n- ThinkBook 15 Gen 3\n\n- Legion Y9000P 2022\n\n- Yoga 7 16IAP7\n\n- IdeaPad Gaming 3 15ACH6\n\n- IdeaPad 3 15ITL6\n\n- 歡迎測試添加\n\n## 常見問題\n\n### 設定成功後，重新啟動未生效 / 顯示錯誤\n\nPhotoshop 儲存的 `.jpg` 格式檔案可能會出現這樣的情況。可以儲存為 `.bmp` 格式後直接使用，或用其他軟體（如小畫家）轉換為 `.jpg` 格式。\n\n### 軟體介面太醜了 🤯\n\n這個其實只是我自己要用而快速糊出來的東西 ;)\n\n### 換成什麼圖案好呢\n\n[這裡](https://github.com/Coxxs/LogoDiy/tree/master/Examples) 有一些例子可供參考。\n"
  }
]