+体检自动更新程序

yjfy
HI 11 months ago
parent 592f6483fb
commit 39d23d3d66
  1. 23
      PEIS.sln
  2. 3
      README.md
  3. 79
      Update/Form1.Designer.cs
  4. 168
      Update/Form1.cs
  5. 120
      Update/Form1.resx
  6. 41
      Update/Program.cs
  7. 36
      Update/Properties/AssemblyInfo.cs
  8. 73
      Update/Properties/Resources.Designer.cs
  9. 124
      Update/Properties/Resources.resx
  10. 30
      Update/Properties/Settings.Designer.cs
  11. 7
      Update/Properties/Settings.settings
  12. 100
      Update/Update.csproj
  13. 4
      Update/packages.config
  14. BIN
      Update/update.png

@ -15,14 +15,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DicomTool", "DicomTool\Dico
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWindowsFormsApp", "..\..\..\Test\TestWindowsFormsApp\TestWindowsFormsApp.csproj", "{BAC2778E-8EDF-435A-BC81-7C8D1F027572}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWindowsFormsApp", "..\..\..\Test\TestWindowsFormsApp\TestWindowsFormsApp.csproj", "{BAC2778E-8EDF-435A-BC81-7C8D1F027572}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "..\..\..\Update\Update.csproj", "{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scale", "Scale\Scale.csproj", "{F13021FD-372E-4D3C-8982-6FE5102AF45A}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scale", "Scale\Scale.csproj", "{F13021FD-372E-4D3C-8982-6FE5102AF45A}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{37E64FF5-7C4B-4DC7-BFA9-2529CF95BEE3}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp", "ConsoleApp\ConsoleApp.csproj", "{37E64FF5-7C4B-4DC7-BFA9-2529CF95BEE3}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWinFormApp", "..\..\..\Test\TestWinFormApp\TestWinFormApp.csproj", "{4A92A40D-1C15-471C-AA42-80732E925904}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestWinFormApp", "..\..\..\Test\TestWinFormApp\TestWinFormApp.csproj", "{4A92A40D-1C15-471C-AA42-80732E925904}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -71,14 +71,6 @@ Global
{BAC2778E-8EDF-435A-BC81-7C8D1F027572}.Release|Any CPU.Build.0 = Release|Any CPU {BAC2778E-8EDF-435A-BC81-7C8D1F027572}.Release|Any CPU.Build.0 = Release|Any CPU
{BAC2778E-8EDF-435A-BC81-7C8D1F027572}.Release|x86.ActiveCfg = Release|Any CPU {BAC2778E-8EDF-435A-BC81-7C8D1F027572}.Release|x86.ActiveCfg = Release|Any CPU
{BAC2778E-8EDF-435A-BC81-7C8D1F027572}.Release|x86.Build.0 = Release|Any CPU {BAC2778E-8EDF-435A-BC81-7C8D1F027572}.Release|x86.Build.0 = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|x86.ActiveCfg = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|x86.Build.0 = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|Any CPU.Build.0 = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|x86.ActiveCfg = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|x86.Build.0 = Release|Any CPU
{F13021FD-372E-4D3C-8982-6FE5102AF45A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F13021FD-372E-4D3C-8982-6FE5102AF45A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F13021FD-372E-4D3C-8982-6FE5102AF45A}.Debug|Any CPU.Build.0 = Debug|Any CPU {F13021FD-372E-4D3C-8982-6FE5102AF45A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F13021FD-372E-4D3C-8982-6FE5102AF45A}.Debug|x86.ActiveCfg = Debug|Any CPU {F13021FD-372E-4D3C-8982-6FE5102AF45A}.Debug|x86.ActiveCfg = Debug|Any CPU
@ -103,10 +95,21 @@ Global
{4A92A40D-1C15-471C-AA42-80732E925904}.Release|Any CPU.Build.0 = Release|Any CPU {4A92A40D-1C15-471C-AA42-80732E925904}.Release|Any CPU.Build.0 = Release|Any CPU
{4A92A40D-1C15-471C-AA42-80732E925904}.Release|x86.ActiveCfg = Release|Any CPU {4A92A40D-1C15-471C-AA42-80732E925904}.Release|x86.ActiveCfg = Release|Any CPU
{4A92A40D-1C15-471C-AA42-80732E925904}.Release|x86.Build.0 = Release|Any CPU {4A92A40D-1C15-471C-AA42-80732E925904}.Release|x86.Build.0 = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|x86.ActiveCfg = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|x86.Build.0 = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|Any CPU.Build.0 = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|x86.ActiveCfg = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5} = {AB0394FA-735E-4213-9ACE-31C02F698FA7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56DA78F6-DED1-4B17-AE1F-7DCF4A666388} SolutionGuid = {56DA78F6-DED1-4B17-AE1F-7DCF4A666388}
EndGlobalSection EndGlobalSection

@ -1,7 +1,7 @@
# PEIS # PEIS
新体检系统 新体检系统
!!! SVN 和 main分支保持同步 !!! !!! SVN 和 main分支保持同步 !!!\
通用功能同步提交到main分支,特殊定制功能提交到各自医院分支。 通用功能同步提交到main分支,特殊定制功能提交到各自医院分支。
## 分支 ## 分支
@ -14,3 +14,4 @@
- PEIS 体检系统程序 - PEIS 体检系统程序
- DicomTool PACS图片同步工具,Dicom文件转图片; - DicomTool PACS图片同步工具,Dicom文件转图片;
- Scale 身高体重/血压仪联机程序; - Scale 身高体重/血压仪联机程序;
- Update 体检系统自动更新程序

@ -0,0 +1,79 @@
namespace Update
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lblTips = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// lblTips
//
this.lblTips.AutoSize = true;
this.lblTips.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTips.Location = new System.Drawing.Point(93, 55);
this.lblTips.Name = "lblTips";
this.lblTips.Size = new System.Drawing.Size(74, 20);
this.lblTips.TabIndex = 4;
this.lblTips.Text = "正在更新···";
this.lblTips.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// pictureBox1
//
this.pictureBox1.Image = global::Update.Properties.Resources.update;
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(12, 40);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(50, 50);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 5;
this.pictureBox1.TabStop = false;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(304, 141);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.lblTips);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "体检系统更新";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblTips;
private System.Windows.Forms.PictureBox pictureBox1;
}
}

@ -0,0 +1,168 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace Update
{
public partial class Form1 : Form
{
// 当前程序目录 **/Update/
private static string CurrentPath = Application.StartupPath;
public Form1()
{
InitializeComponent();
TopMost = true;
MaximizeBox = false;
ControlBox = true;
ControlBox = false;
try
{
// 体检系统
var program = "PEIS.exe";
// 解压文件目录 **/Update/Unzip/
var unZipPath = Path.Combine(CurrentPath, "UnZip");
// 检查程序是否正在运行
var processes = Process.GetProcessesByName(program);
if (processes.Length > 0)
{
// 关闭程序
foreach (var process in processes)
{
process.Kill();
process.WaitForExit(); // 等待程序退出
Console.WriteLine($@"Closed existing instance of {program}");
}
// 等待1秒
Thread.Sleep(1000);
}
lblTips.Text = @"正在更新……";
// 删除文件夹
DelDirectory();
// 解压路径是否存在
if (Directory.Exists(unZipPath))
{
// 获取解压文件下的第一个文件夹,避免 **/Update/UnZip/PEIS.exe || **/Update/UnZip/XxDirectory/PEIS.exe
var temp = Directory.GetDirectories(unZipPath, "*", SearchOption.AllDirectories).ToList()
?.FirstOrDefault();
if (File.Exists(Path.Combine(unZipPath, program)))
{
CopyFilesRecursively(unZipPath, Path.GetDirectoryName(CurrentPath));
var sourceFilePath = Path.Combine(unZipPath, "PEIS.exe.config");
var targetFilePath = Path.Combine(Path.GetDirectoryName(CurrentPath), "PEIS.exe.config");
// 复制并替换指定文件 PEIS.exe.config
File.Copy(sourceFilePath, targetFilePath, true);
//删除压缩目录
//Directory.Delete(unZipPath, true);
lblTips.Text = (@"更新完成,请重新启动!");
//Process.Start(programPath);
}
else if (File.Exists(Path.Combine(temp, program)))
{
CopyFilesRecursively(temp, Path.GetDirectoryName(CurrentPath));
var sourceFilePath = Path.Combine(temp, "PEIS.exe.config");
var targetFilePath = Path.Combine(Path.GetDirectoryName(CurrentPath), "PEIS.exe.config");
// 复制并替换指定文件
File.Copy(sourceFilePath, targetFilePath, true);
lblTips.Text = (@"更新完成,请重新启动!");
}
else
{
lblTips.Text = (@"未找到更新程序!");
}
}
else
{
lblTips.Text = (@"未找到更新文件!");
}
//Process.GetCurrentProcess().Kill();
}
catch (Exception e)
{
lblTips.Text = (e.Message);
//Process.GetCurrentProcess().Kill();
}
finally
{
ControlBox = true;
}
}
/// <summary>
/// 文件复制替换
/// </summary>
/// <param name="sourcePath">原位置</param>
/// <param name="targetPath">目标位置</param>
private static void CopyFilesRecursively(string sourcePath, string targetPath)
{
//现在创建所有目录
foreach (var dirPath in Directory.GetDirectories(sourcePath, "*", SearchOption.AllDirectories))
{
if (dirPath == CurrentPath) continue;
if (dirPath.Contains("Update")) continue;
var dir = dirPath.Replace(sourcePath, targetPath);
Directory.CreateDirectory(dir);
}
//复制所有文件并替换所有同名文件
foreach (var newPath in Directory.GetFiles(sourcePath, "*.*", SearchOption.AllDirectories))
{
//File.Copy(newPath, newPath.Replace(sourcePath, targetPath), true);
var newFilePath = newPath.Replace(sourcePath, targetPath);
var targetDirectory = Path.GetDirectoryName(newFilePath);
if (newPath.Contains("Update.exe")) continue;
if (newFilePath.Contains("Update.exe")) continue;
// 如果目标文件夹不存在,则创建
if (!Directory.Exists(targetDirectory))
{
Directory.CreateDirectory(targetDirectory);
}
File.Copy(newPath, newFilePath, true);
}
}
private static void DelDirectory()
{
var list = new List<string>()
{
"de",
"es",
"ja",
"ru",
"nl",
"x64",
"x86",
};
list.ForEach(item =>
{
var path = Path.Combine( Path.GetDirectoryName(CurrentPath), item);
DeleteDirectory(path);
});
}
static void DeleteDirectory(string targetDir)
{
if (Directory.Exists(targetDir))
{
string[] files = Directory.GetFiles(targetDir);
foreach (string file in files)
{
File.Delete(file);
}
string[] subDirs = Directory.GetDirectories(targetDir);
foreach (string subDir in subDirs)
{
DeleteDirectory(subDir);
}
Directory.Delete(targetDir);
}
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace Update
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var program = "PEIS.exe";
// 检查程序是否正在运行
Process[] processes = Process.GetProcessesByName(program);
if (processes.Length > 0)
{
// 关闭程序
foreach (var process in processes)
{
process.Kill();
process.WaitForExit(); // 等待程序退出
Console.WriteLine($@"Closed existing instance of {program}");
}
// 等待2秒
Thread.Sleep(1000);
}
Application.Run(new Form1());
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Update")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Update")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("8894c92c-210d-459c-b5cd-7a6d2ab4cbe5")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Update.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Update.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap update {
get {
object obj = ResourceManager.GetObject("update", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="update" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\update.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Update.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Update</RootNamespace>
<AssemblyName>Update</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="update.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.16.0" targetFramework="net40" />
</packages>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Loading…
Cancel
Save