Browse Source

创建版本打包工具,优化流量工具,添加Ini工具类获取long类型值

yuzhengyang 8 years ago
parent
commit
52bbbfac4d
43 changed files with 1110 additions and 151 deletions
  1. BIN
      Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide
  2. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide
  3. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm
  4. BIN
      Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal
  5. 8 1
      Fork.Net/Fork.Net.Tools/Y.Utils/IOUtils/TxtUtils/IniTool.cs
  6. 5 0
      Fork.Net/Fork.Net.Tools/Y.Utils/NetUtils/HttpUtils/HttpTool.cs
  7. 21 0
      Fork.Net/Fork.Net.Tools/Y.Utils/NetUtils/NetInfoUtils/NetflowTool.cs
  8. 3 1
      Fork.Net/Fork.Net.Tools/Y.Utils/SoftwareUtils/SoftwareTool.cs
  9. 23 1
      Fork.Net/Fork.Net.Tools/Y.Utils/WindowsUtils/InfoUtils/ComputerInfoTool.cs
  10. 17 3
      Fork.Net/Fork.Net.Tools/Y.Utils/WindowsUtils/ProcessUtils/ProcessTool.cs
  11. 11 0
      Fork.Net/Fork.Net.sln
  12. 6 0
      Fork.Net/Oreo.Plugins/Oreo.NetMan/Oreo.NetMan.csproj
  13. 1 0
      Fork.Net/Oreo.Plugins/Oreo.NetMan/Program.cs
  14. 0 1
      Fork.Net/Oreo.Plugins/Oreo.NetMonitor/FodyWeavers.xml
  15. 6 8
      Fork.Net/Oreo.Plugins/Oreo.NetMonitor/Oreo.NetMonitor.csproj
  16. 4 7
      Fork.Net/Oreo.Plugins/Oreo.NetMonitor/Program.cs
  17. 0 5
      Fork.Net/Oreo.Plugins/Oreo.NetMonitor/packages.config
  18. 463 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Form1.Designer.cs
  19. 57 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Form1.cs
  20. 120 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Form1.resx
  21. 83 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Oreo.VersionPackage.csproj
  22. 21 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Program.cs
  23. 36 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/AssemblyInfo.cs
  24. 71 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Resources.Designer.cs
  25. 117 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Resources.resx
  26. 30 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Settings.Designer.cs
  27. 7 0
      Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Settings.settings
  28. 0 4
      Fork.Net/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.install.xdt
  29. 0 4
      Fork.Net/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.uninstall.xdt
  30. BIN
      Fork.Net/packages/Costura.Fody.1.3.3.0/Costura.Fody.1.3.3.0.nupkg
  31. BIN
      Fork.Net/packages/Costura.Fody.1.3.3.0/Costura.Fody.dll
  32. 0 106
      Fork.Net/packages/Costura.Fody.1.3.3.0/Tools/commands.psm1
  33. 0 3
      Fork.Net/packages/Costura.Fody.1.3.3.0/Tools/init.ps1
  34. 0 4
      Fork.Net/packages/Fody.2.0.9/Content/FodyWeavers.xml
  35. BIN
      Fork.Net/packages/Fody.2.0.9/Fody.2.0.9.nupkg
  36. BIN
      Fork.Net/packages/Fody.2.0.9/Fody.dll
  37. BIN
      Fork.Net/packages/Fody.2.0.9/FodyCommon.dll
  38. BIN
      Fork.Net/packages/Fody.2.0.9/FodyIsolated.dll
  39. BIN
      Fork.Net/packages/Fody.2.0.9/Mono.Cecil.Mdb.dll
  40. BIN
      Fork.Net/packages/Fody.2.0.9/Mono.Cecil.Pdb.dll
  41. BIN
      Fork.Net/packages/Fody.2.0.9/Mono.Cecil.Rocks.dll
  42. BIN
      Fork.Net/packages/Fody.2.0.9/Mono.Cecil.dll
  43. 0 3
      Fork.Net/packages/Fody.2.0.9/Tools/install.ps1

BIN
Fork.Net/.vs/Fork.Net/v15/Server/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-shm


BIN
Fork.Net/.vs/Fork.Net/v15/sqlite3/storage.ide-wal


+ 8 - 1
Fork.Net/Fork.Net.Tools/Y.Utils/IOUtils/TxtUtils/IniTool.cs

@@ -399,7 +399,14 @@ namespace Y.Utils.IOUtils.TxtUtils
         {
             string flag = GetStringValue(iniFile, section, key, "0");
             int result = 0;
-            int.TryParse(flag,out result);
+            int.TryParse(flag, out result);
+            return result;
+        }
+        public static long GetLongValue(string iniFile, string section, string key)
+        {
+            string flag = GetStringValue(iniFile, section, key, "0");
+            long result = 0;
+            long.TryParse(flag, out result);
             return result;
         }
 

+ 5 - 0
Fork.Net/Fork.Net.Tools/Y.Utils/NetUtils/HttpUtils/HttpTool.cs

@@ -396,6 +396,11 @@ namespace Y.Utils.NetUtils.HttpUtils
                 {
                     fs.Write(buffer, 0, readCount);
                     current += readCount;
+                    if (filesize <= 0 || filesize < current)
+                    {
+                        if (current > 0) filesize = current;
+                        else filesize = 1;
+                    }
                     progress?.Invoke(sender, new ProgressEventArgs(current, filesize));
                 }
                 //stream.Close();

+ 21 - 0
Fork.Net/Fork.Net.Tools/Y.Utils/NetUtils/NetInfoUtils/NetflowTool.cs

@@ -77,6 +77,11 @@ namespace Y.Utils.NetUtils.NetInfoUtils
             }
             return false;
         }
+        /// <summary>
+        /// 启动流量监测
+        /// </summary>
+        /// <param name="interval"></param>
+        /// <returns></returns>
         public bool Start(int interval = 1000)
         {
             if (Init() && !IsStart)
@@ -115,6 +120,9 @@ namespace Y.Utils.NetUtils.NetInfoUtils
             }
             return false;
         }
+        /// <summary>
+        /// 重启流量计数器
+        /// </summary>
         public void Restart()
         {
             if (IsStart)
@@ -131,6 +139,19 @@ namespace Y.Utils.NetUtils.NetInfoUtils
 
             Init();
         }
+        /// <summary>
+        /// 重置流量表数
+        /// </summary>
+        public void Reset()
+        {
+            _UploadData = 0;
+            _UploadDataCount = 0;
+            _DownloadData = 0;
+            _DownloadDataCount = 0;
+        }
+        /// <summary>
+        /// 停止流量监测
+        /// </summary>
         public void Stop()
         {
             if (IsStart)

+ 3 - 1
Fork.Net/Fork.Net.Tools/Y.Utils/SoftwareUtils/SoftwareTool.cs

@@ -65,8 +65,10 @@ namespace Y.Utils.SoftwareUtils
                             string sizestr = SubKey.GetValue("EstimatedSize", "").ToString();
                             string helpurl = SubKey.GetValue("HelpLink", "").ToString();
                             string abouturl = SubKey.GetValue("URLInfoAbout", "").ToString();
-                            DateTime date;
+                            DateTime date = DateTime.Parse("2001-10-25");//设置初始值为WindowsXP发布日期
                             DateTime.TryParseExact(datestr, "yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, out date);
+                            if (date.Year < 2001) date = DateTime.Parse("2001-10-25");
+
                             int size = 0;
                             int.TryParse(sizestr, out size);
                             result.Add(new SoftwareInfo()

+ 23 - 1
Fork.Net/Fork.Net.Tools/Y.Utils/WindowsUtils/InfoUtils/ComputerInfoTool.cs

@@ -7,6 +7,7 @@
 //************************************************************************
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Management;
 using System.Net.NetworkInformation;
 using System.Runtime.InteropServices;
@@ -215,7 +216,7 @@ namespace Y.Utils.WindowsUtils.InfoUtils
                     string caption = MyObject["Caption"].ToString().Trim();
                     string windowsdirectory = MyObject["WindowsDirectory"].ToString().Trim();
                     string installdate = MyObject["InstallDate"].ToString().Trim();
-                    DateTime dtinstalldate = DateTime.MinValue;
+                    DateTime dtinstalldate = DateTime.Parse("2001-10-25");//设置初始值为WindowsXP发布日期
 
                     if (installdate.Length >= 14)
                     {
@@ -227,6 +228,7 @@ namespace Y.Utils.WindowsUtils.InfoUtils
                         installdate = installdate.Insert(4, "-");
                         DateTime.TryParse(installdate, out dtinstalldate);
                     }
+                    if (dtinstalldate.Year < 2001) dtinstalldate = DateTime.Parse("2001-10-25");
 
                     result = new Tuple<string, string, DateTime>(
                         caption, windowsdirectory, dtinstalldate);
@@ -375,5 +377,25 @@ namespace Y.Utils.WindowsUtils.InfoUtils
         {
             return Environment.Is64BitOperatingSystem;
         }
+        /// <summary>
+        /// 获取系统盘总容量
+        /// </summary>
+        /// <returns></returns>
+        public static long GetSystemDriveTotalSize()
+        {
+            try
+            {
+                DriveInfo Drive = new DriveInfo("C");//系统盘驱动器
+                var osinfo = ComputerInfoTool.OsInfo();
+                if (osinfo != null)
+                {
+                    string drive = osinfo.Item2.Substring(0, 1);
+                    Drive = new DriveInfo(drive);
+                }
+                return Drive.TotalSize;
+            }
+            catch { }
+            return 0;
+        }
     }
 }

+ 17 - 3
Fork.Net/Fork.Net.Tools/Y.Utils/WindowsUtils/ProcessUtils/ProcessTool.cs

@@ -66,8 +66,22 @@ namespace Y.Utils.WindowsUtils.ProcessUtils
                 }
             }
         }
-
-        public static bool Start(string file, string args = "")
+        public static bool Start(string file)
+        {
+            try
+            {
+                if (File.Exists(file))
+                {
+                    Process p = new Process();
+                    p.StartInfo.FileName = file;
+                    p.Start();
+                    return true;
+                }
+            }
+            catch (Exception ex) { }
+            return false;
+        }
+        public static bool Start(string file, string args)
         {
             try
             {
@@ -75,7 +89,7 @@ namespace Y.Utils.WindowsUtils.ProcessUtils
                 {
                     Process p = new Process();
                     p.StartInfo.FileName = file;
-                    p.StartInfo.Arguments = "";
+                    p.StartInfo.Arguments = args;
                     p.StartInfo.UseShellExecute = true;
                     p.Start();
                     p.WaitForInputIdle(3000);

+ 11 - 0
Fork.Net/Fork.Net.sln

@@ -63,6 +63,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.FilePackage", "Oreo.Pl
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azylee.YeahWeb", "Azylee.Utils\Azylee.YeahWeb\Azylee.YeahWeb.csproj", "{CCF7A654-B442-4DB1-BB3B-0F8014C3237F}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oreo.VersionPackage", "Oreo.Plugins\Oreo.VersionPackage\Oreo.VersionPackage.csproj", "{EE2AE6AE-500B-47F1-8798-7429F02E92D9}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -271,6 +273,14 @@ Global
 		{CCF7A654-B442-4DB1-BB3B-0F8014C3237F}.Release|Any CPU.Build.0 = Release|Any CPU
 		{CCF7A654-B442-4DB1-BB3B-0F8014C3237F}.Release|x86.ActiveCfg = Release|Any CPU
 		{CCF7A654-B442-4DB1-BB3B-0F8014C3237F}.Release|x86.Build.0 = Release|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Debug|x86.Build.0 = Debug|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Release|x86.ActiveCfg = Release|Any CPU
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -300,6 +310,7 @@ Global
 		{0DFAC9FC-9D48-4DCF-AE72-8FB1CA70A06E} = {F222E566-DA0C-443C-BB9F-80536F02DB36}
 		{1500F997-4261-4999-A6F1-0EBB34E9854F} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
 		{CCF7A654-B442-4DB1-BB3B-0F8014C3237F} = {C34A95B5-5F83-46E3-868A-56BDDA2D0B87}
+		{EE2AE6AE-500B-47F1-8798-7429F02E92D9} = {E53B3662-A5FD-4D4C-AFF6-1DC9FF24EA16}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {5436696D-5F55-490A-AB40-050B54BE2AB4}

+ 6 - 0
Fork.Net/Oreo.Plugins/Oreo.NetMan/Oreo.NetMan.csproj

@@ -95,6 +95,12 @@
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
     </Compile>
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Fork.Net.Tools\Y.Utils\Y.Utils.csproj">
+      <Project>{5b8eeec7-aeb5-407d-9dc1-1c59e53f78d5}</Project>
+      <Name>Y.Utils</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

+ 1 - 0
Fork.Net/Oreo.Plugins/Oreo.NetMan/Program.cs

@@ -10,6 +10,7 @@ namespace Oreo.NetMan
 {
     static class Program
     {
+        static AppUnique AppUnique = new AppUnique();
         /// <summary>
         /// 应用程序的主入口点。
         /// </summary>

+ 0 - 1
Fork.Net/Oreo.Plugins/Oreo.NetMonitor/FodyWeavers.xml

@@ -1,4 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Weavers>
-	<Costura/>
 </Weavers>

+ 6 - 8
Fork.Net/Oreo.Plugins/Oreo.NetMonitor/Oreo.NetMonitor.csproj

@@ -126,7 +126,6 @@
     <None Include="NewFolder1\NumenTCPPorts.dat" />
     <None Include="NewFolder1\NumenUDPPorts.dat" />
     <None Include="Properties\app.manifest" />
-    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -143,14 +142,13 @@
   <ItemGroup>
     <None Include="FodyWeavers.xml" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Fork.Net.Tools\Y.Utils\Y.Utils.csproj">
+      <Project>{5b8eeec7-aeb5-407d-9dc1-1c59e53f78d5}</Project>
+      <Name>Y.Utils</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\packages\Fody.2.0.9\build\portable-net+sl+win+wpa+wp\Fody.targets" Condition="Exists('..\packages\Fody.2.0.9\build\portable-net+sl+win+wpa+wp\Fody.targets')" />
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
-    <PropertyGroup>
-      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
-    </PropertyGroup>
-    <Error Condition="!Exists('..\packages\Fody.2.0.9\build\portable-net+sl+win+wpa+wp\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.2.0.9\build\portable-net+sl+win+wpa+wp\Fody.targets'))" />
-  </Target>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

+ 4 - 7
Fork.Net/Oreo.Plugins/Oreo.NetMonitor/Program.cs

@@ -17,13 +17,10 @@ namespace Oreo.NetMonitor
         [STAThread]
         static void Main()
         {
-            if (AppUnique.IsUnique("Oreo.NetMonitor"))
-            {
-                P.Init();
-                Application.EnableVisualStyles();
-                Application.SetCompatibleTextRenderingDefault(false);
-                Application.Run(new FloatForm());
-            }
+            P.Init();
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new FloatForm());
         }
     }
 }

+ 0 - 5
Fork.Net/Oreo.Plugins/Oreo.NetMonitor/packages.config

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Costura.Fody" version="1.3.3.0" targetFramework="net40" developmentDependency="true" />
-  <package id="Fody" version="2.0.9" targetFramework="net40" developmentDependency="true" />
-</packages>

+ 463 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Form1.Designer.cs

@@ -0,0 +1,463 @@
+namespace Oreo.VersionPackage
+{
+    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.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.tbVersion = new System.Windows.Forms.TextBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.tbReleasePath = new System.Windows.Forms.TextBox();
+            this.label15 = new System.Windows.Forms.Label();
+            this.cbNecessary = new System.Windows.Forms.CheckBox();
+            this.rbFtpMode = new System.Windows.Forms.RadioButton();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.tbAuthor = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.tbName = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.tbDesc = new System.Windows.Forms.TextBox();
+            this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.tbHttpUrl = new System.Windows.Forms.TextBox();
+            this.label9 = new System.Windows.Forms.Label();
+            this.tabPage2 = new System.Windows.Forms.TabPage();
+            this.label5 = new System.Windows.Forms.Label();
+            this.tbFtpIp = new System.Windows.Forms.TextBox();
+            this.tbFtpAccount = new System.Windows.Forms.TextBox();
+            this.label12 = new System.Windows.Forms.Label();
+            this.tbFtpPassword = new System.Windows.Forms.TextBox();
+            this.label11 = new System.Windows.Forms.Label();
+            this.tbFtpFile = new System.Windows.Forms.TextBox();
+            this.label10 = new System.Windows.Forms.Label();
+            this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.label6 = new System.Windows.Forms.Label();
+            this.rbHttpMode = new System.Windows.Forms.RadioButton();
+            this.btPackage = new System.Windows.Forms.Button();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.tbPath = new System.Windows.Forms.TextBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.groupBox2.SuspendLayout();
+            this.groupBox1.SuspendLayout();
+            this.tabPage1.SuspendLayout();
+            this.tabPage2.SuspendLayout();
+            this.tabControl1.SuspendLayout();
+            this.groupBox3.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.label2);
+            this.groupBox2.Controls.Add(this.tbVersion);
+            this.groupBox2.Controls.Add(this.label4);
+            this.groupBox2.Controls.Add(this.tbReleasePath);
+            this.groupBox2.Controls.Add(this.label15);
+            this.groupBox2.Controls.Add(this.cbNecessary);
+            this.groupBox2.Location = new System.Drawing.Point(12, 53);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(278, 141);
+            this.groupBox2.TabIndex = 46;
+            this.groupBox2.TabStop = false;
+            this.groupBox2.Text = "基础信息";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(15, 23);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(53, 12);
+            this.label2.TabIndex = 4;
+            this.label2.Text = "版本号:";
+            // 
+            // tbVersion
+            // 
+            this.tbVersion.Location = new System.Drawing.Point(114, 20);
+            this.tbVersion.Name = "tbVersion";
+            this.tbVersion.Size = new System.Drawing.Size(126, 21);
+            this.tbVersion.TabIndex = 3;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(15, 91);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(65, 12);
+            this.label4.TabIndex = 6;
+            this.label4.Text = "必要升级:";
+            // 
+            // tbReleasePath
+            // 
+            this.tbReleasePath.Location = new System.Drawing.Point(114, 52);
+            this.tbReleasePath.Name = "tbReleasePath";
+            this.tbReleasePath.Size = new System.Drawing.Size(126, 21);
+            this.tbReleasePath.TabIndex = 27;
+            this.tbReleasePath.Text = "|AppRoot|";
+            // 
+            // label15
+            // 
+            this.label15.AutoSize = true;
+            this.label15.Location = new System.Drawing.Point(15, 55);
+            this.label15.Name = "label15";
+            this.label15.Size = new System.Drawing.Size(83, 12);
+            this.label15.TabIndex = 28;
+            this.label15.Text = "ReleasePath:";
+            // 
+            // cbNecessary
+            // 
+            this.cbNecessary.AutoSize = true;
+            this.cbNecessary.Checked = true;
+            this.cbNecessary.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.cbNecessary.Location = new System.Drawing.Point(114, 90);
+            this.cbNecessary.Name = "cbNecessary";
+            this.cbNecessary.Size = new System.Drawing.Size(48, 16);
+            this.cbNecessary.TabIndex = 33;
+            this.cbNecessary.Text = "必要";
+            this.cbNecessary.UseVisualStyleBackColor = true;
+            // 
+            // rbFtpMode
+            // 
+            this.rbFtpMode.AutoSize = true;
+            this.rbFtpMode.Location = new System.Drawing.Point(171, 28);
+            this.rbFtpMode.Name = "rbFtpMode";
+            this.rbFtpMode.Size = new System.Drawing.Size(41, 16);
+            this.rbFtpMode.TabIndex = 44;
+            this.rbFtpMode.Text = "FTP";
+            this.rbFtpMode.UseVisualStyleBackColor = true;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.label8);
+            this.groupBox1.Controls.Add(this.tbAuthor);
+            this.groupBox1.Controls.Add(this.label1);
+            this.groupBox1.Controls.Add(this.tbName);
+            this.groupBox1.Controls.Add(this.label3);
+            this.groupBox1.Controls.Add(this.tbDesc);
+            this.groupBox1.Location = new System.Drawing.Point(308, 53);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(278, 141);
+            this.groupBox1.TabIndex = 43;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "描述信息";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Location = new System.Drawing.Point(15, 49);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(41, 12);
+            this.label8.TabIndex = 10;
+            this.label8.Text = "作者:";
+            // 
+            // tbAuthor
+            // 
+            this.tbAuthor.Location = new System.Drawing.Point(80, 46);
+            this.tbAuthor.Name = "tbAuthor";
+            this.tbAuthor.Size = new System.Drawing.Size(179, 21);
+            this.tbAuthor.TabIndex = 9;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(15, 23);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(41, 12);
+            this.label1.TabIndex = 2;
+            this.label1.Text = "名称:";
+            // 
+            // tbName
+            // 
+            this.tbName.Location = new System.Drawing.Point(80, 20);
+            this.tbName.Name = "tbName";
+            this.tbName.Size = new System.Drawing.Size(179, 21);
+            this.tbName.TabIndex = 0;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(15, 75);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(41, 12);
+            this.label3.TabIndex = 8;
+            this.label3.Text = "描述:";
+            // 
+            // tbDesc
+            // 
+            this.tbDesc.Location = new System.Drawing.Point(80, 72);
+            this.tbDesc.Multiline = true;
+            this.tbDesc.Name = "tbDesc";
+            this.tbDesc.Size = new System.Drawing.Size(179, 48);
+            this.tbDesc.TabIndex = 7;
+            // 
+            // tabPage1
+            // 
+            this.tabPage1.Controls.Add(this.tbHttpUrl);
+            this.tabPage1.Controls.Add(this.label9);
+            this.tabPage1.Location = new System.Drawing.Point(4, 22);
+            this.tabPage1.Name = "tabPage1";
+            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage1.Size = new System.Drawing.Size(512, 129);
+            this.tabPage1.TabIndex = 0;
+            this.tabPage1.Text = "HTTP 下载设置";
+            this.tabPage1.UseVisualStyleBackColor = true;
+            // 
+            // tbHttpUrl
+            // 
+            this.tbHttpUrl.Location = new System.Drawing.Point(116, 21);
+            this.tbHttpUrl.Name = "tbHttpUrl";
+            this.tbHttpUrl.Size = new System.Drawing.Size(281, 21);
+            this.tbHttpUrl.TabIndex = 23;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Location = new System.Drawing.Point(17, 24);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(95, 12);
+            this.label9.TabIndex = 24;
+            this.label9.Text = "Http 文件链接:";
+            // 
+            // tabPage2
+            // 
+            this.tabPage2.Controls.Add(this.label5);
+            this.tabPage2.Controls.Add(this.tbFtpIp);
+            this.tabPage2.Controls.Add(this.tbFtpAccount);
+            this.tabPage2.Controls.Add(this.label12);
+            this.tabPage2.Controls.Add(this.tbFtpPassword);
+            this.tabPage2.Controls.Add(this.label11);
+            this.tabPage2.Controls.Add(this.tbFtpFile);
+            this.tabPage2.Controls.Add(this.label10);
+            this.tabPage2.Location = new System.Drawing.Point(4, 22);
+            this.tabPage2.Name = "tabPage2";
+            this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage2.Size = new System.Drawing.Size(512, 129);
+            this.tabPage2.TabIndex = 1;
+            this.tabPage2.Text = "FTP 下载设置";
+            this.tabPage2.UseVisualStyleBackColor = true;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(14, 24);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(47, 12);
+            this.label5.TabIndex = 16;
+            this.label5.Text = "FtpIp:";
+            // 
+            // tbFtpIp
+            // 
+            this.tbFtpIp.Location = new System.Drawing.Point(113, 21);
+            this.tbFtpIp.Name = "tbFtpIp";
+            this.tbFtpIp.Size = new System.Drawing.Size(126, 21);
+            this.tbFtpIp.TabIndex = 15;
+            // 
+            // tbFtpAccount
+            // 
+            this.tbFtpAccount.Location = new System.Drawing.Point(366, 21);
+            this.tbFtpAccount.Name = "tbFtpAccount";
+            this.tbFtpAccount.Size = new System.Drawing.Size(126, 21);
+            this.tbFtpAccount.TabIndex = 17;
+            // 
+            // label12
+            // 
+            this.label12.AutoSize = true;
+            this.label12.Location = new System.Drawing.Point(267, 24);
+            this.label12.Name = "label12";
+            this.label12.Size = new System.Drawing.Size(65, 12);
+            this.label12.TabIndex = 18;
+            this.label12.Text = "Ftp 账号:";
+            // 
+            // tbFtpPassword
+            // 
+            this.tbFtpPassword.Location = new System.Drawing.Point(366, 60);
+            this.tbFtpPassword.Name = "tbFtpPassword";
+            this.tbFtpPassword.Size = new System.Drawing.Size(126, 21);
+            this.tbFtpPassword.TabIndex = 19;
+            // 
+            // label11
+            // 
+            this.label11.AutoSize = true;
+            this.label11.Location = new System.Drawing.Point(267, 63);
+            this.label11.Name = "label11";
+            this.label11.Size = new System.Drawing.Size(65, 12);
+            this.label11.TabIndex = 20;
+            this.label11.Text = "Ftp 密码:";
+            // 
+            // tbFtpFile
+            // 
+            this.tbFtpFile.Location = new System.Drawing.Point(113, 60);
+            this.tbFtpFile.Name = "tbFtpFile";
+            this.tbFtpFile.Size = new System.Drawing.Size(126, 21);
+            this.tbFtpFile.TabIndex = 21;
+            // 
+            // label10
+            // 
+            this.label10.AutoSize = true;
+            this.label10.Location = new System.Drawing.Point(14, 63);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(89, 12);
+            this.label10.TabIndex = 22;
+            this.label10.Text = "Ftp 文件路径:";
+            // 
+            // tabControl1
+            // 
+            this.tabControl1.Controls.Add(this.tabPage1);
+            this.tabControl1.Controls.Add(this.tabPage2);
+            this.tabControl1.Location = new System.Drawing.Point(17, 61);
+            this.tabControl1.Name = "tabControl1";
+            this.tabControl1.SelectedIndex = 0;
+            this.tabControl1.Size = new System.Drawing.Size(520, 155);
+            this.tabControl1.TabIndex = 42;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(19, 30);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(65, 12);
+            this.label6.TabIndex = 41;
+            this.label6.Text = "下载模式:";
+            // 
+            // rbHttpMode
+            // 
+            this.rbHttpMode.AutoSize = true;
+            this.rbHttpMode.Checked = true;
+            this.rbHttpMode.Location = new System.Drawing.Point(101, 28);
+            this.rbHttpMode.Name = "rbHttpMode";
+            this.rbHttpMode.Size = new System.Drawing.Size(47, 16);
+            this.rbHttpMode.TabIndex = 45;
+            this.rbHttpMode.TabStop = true;
+            this.rbHttpMode.Text = "HTTP";
+            this.rbHttpMode.UseVisualStyleBackColor = true;
+            // 
+            // btPackage
+            // 
+            this.btPackage.Location = new System.Drawing.Point(512, 460);
+            this.btPackage.Name = "btPackage";
+            this.btPackage.Size = new System.Drawing.Size(75, 23);
+            this.btPackage.TabIndex = 39;
+            this.btPackage.Text = "打包";
+            this.btPackage.UseVisualStyleBackColor = true;
+            this.btPackage.Click += new System.EventHandler(this.btPackage_Click);
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.label6);
+            this.groupBox3.Controls.Add(this.rbHttpMode);
+            this.groupBox3.Controls.Add(this.rbFtpMode);
+            this.groupBox3.Controls.Add(this.tabControl1);
+            this.groupBox3.Location = new System.Drawing.Point(12, 218);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(574, 236);
+            this.groupBox3.TabIndex = 47;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "下载信息";
+            // 
+            // tbPath
+            // 
+            this.tbPath.Location = new System.Drawing.Point(126, 12);
+            this.tbPath.Name = "tbPath";
+            this.tbPath.Size = new System.Drawing.Size(441, 21);
+            this.tbPath.TabIndex = 48;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(19, 15);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(77, 12);
+            this.label7.TabIndex = 49;
+            this.label7.Text = "文件夹路径:";
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(599, 495);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.tbPath);
+            this.Controls.Add(this.groupBox3);
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.btPackage);
+            this.Name = "Form1";
+            this.Text = "Form1";
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.tabPage1.ResumeLayout(false);
+            this.tabPage1.PerformLayout();
+            this.tabPage2.ResumeLayout(false);
+            this.tabPage2.PerformLayout();
+            this.tabControl1.ResumeLayout(false);
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox tbVersion;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox tbReleasePath;
+        private System.Windows.Forms.Label label15;
+        private System.Windows.Forms.CheckBox cbNecessary;
+        private System.Windows.Forms.RadioButton rbFtpMode;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.TextBox tbAuthor;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox tbName;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.TextBox tbDesc;
+        private System.Windows.Forms.TabPage tabPage1;
+        private System.Windows.Forms.TextBox tbHttpUrl;
+        private System.Windows.Forms.Label label9;
+        private System.Windows.Forms.TabPage tabPage2;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox tbFtpIp;
+        private System.Windows.Forms.TextBox tbFtpAccount;
+        private System.Windows.Forms.Label label12;
+        private System.Windows.Forms.TextBox tbFtpPassword;
+        private System.Windows.Forms.Label label11;
+        private System.Windows.Forms.TextBox tbFtpFile;
+        private System.Windows.Forms.Label label10;
+        private System.Windows.Forms.TabControl tabControl1;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.RadioButton rbHttpMode;
+        private System.Windows.Forms.Button btPackage;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.TextBox tbPath;
+        private System.Windows.Forms.Label label7;
+    }
+}
+

+ 57 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Form1.cs

@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using Y.Utils.DataUtils.JsonUtils;
+using Y.Utils.IOUtils.FileUtils;
+using Y.Utils.IOUtils.PathUtils;
+using Y.Utils.IOUtils.TxtUtils;
+using Y.Utils.UpdateUtils;
+
+namespace Oreo.VersionPackage
+{
+    public partial class Form1 : Form
+    {
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void btPackage_Click(object sender, EventArgs e)
+        {
+            string src = tbPath.Text;
+            string file = tbName.Text + "-" + tbVersion.Text.Replace('.', '-') + ".udp";
+            string dst = DirTool.Combine(DirTool.GetFilePath(tbPath.Text), file);
+
+            if (FilePackageTool.Pack(src, dst) > 0 && File.Exists(dst))
+            {
+                string md5Code = FileTool.GetMD5(dst);
+                //设置更新模型,14个属性
+                AppUpdateInfo aui = new AppUpdateInfo()
+                {
+                    Name = tbName.Text,
+                    Author = tbAuthor.Text,
+                    Desc = tbDesc.Text,
+                    Version = tbVersion.Text,
+                    ReleasePath = tbReleasePath.Text,
+                    Necessary = cbNecessary.Checked,
+                    DateTime = DateTime.Now,
+                    DownloadMode = rbHttpMode.Checked ? 0 : 1,
+                    HttpUrl = tbHttpUrl.Text,
+                    FtpIp = tbFtpIp.Text,
+                    FtpAccount = tbFtpAccount.Text,
+                    FtpPassword = tbFtpPassword.Text,
+                    FtpFile = tbFtpFile.Text,
+                    Md5 = md5Code,
+                };
+                string auiJson = JsonTool.ToStr(aui);
+                TxtTool.Create(dst + ".txt", auiJson);
+            }
+        }
+    }
+}

+ 120 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Form1.resx

@@ -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>

+ 83 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Oreo.VersionPackage.csproj

@@ -0,0 +1,83 @@
+<?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>{EE2AE6AE-500B-47F1-8798-7429F02E92D9}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>Oreo.VersionPackage</RootNamespace>
+    <AssemblyName>Oreo.VersionPackage</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </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.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </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>
+    </Compile>
+    <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>
+    <ProjectReference Include="..\..\Fork.Net.Tools\Y.Utils\Y.Utils.csproj">
+      <Project>{5b8eeec7-aeb5-407d-9dc1-1c59e53f78d5}</Project>
+      <Name>Y.Utils</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 21 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Program.cs

@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows.Forms;
+
+namespace Oreo.VersionPackage
+{
+    static class Program
+    {
+        /// <summary>
+        /// 应用程序的主入口点。
+        /// </summary>
+        [STAThread]
+        static void Main()
+        {
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new Form1());
+        }
+    }
+}

+ 36 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/AssemblyInfo.cs

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

+ 71 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本: 4.0.30319.42000
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Oreo.VersionPackage.Properties
+{
+
+
+    /// <summary>
+    ///   强类型资源类,用于查找本地化字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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 ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Oreo.VersionPackage.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   覆盖当前线程的 CurrentUICulture 属性
+        ///   使用此强类型的资源类的资源查找。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?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.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: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" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </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" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Settings.Designer.cs

@@ -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 Oreo.VersionPackage.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;
+            }
+        }
+    }
+}

+ 7 - 0
Fork.Net/Oreo.Plugins/Oreo.VersionPackage/Properties/Settings.settings

@@ -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 - 4
Fork.Net/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.install.xdt

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Weavers xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
-  <Costura xdt:Transform="Insert" />
-</Weavers>

+ 0 - 4
Fork.Net/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.uninstall.xdt

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Weavers xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
-  <Costura xdt:Transform="Remove" />
-</Weavers>

BIN
Fork.Net/packages/Costura.Fody.1.3.3.0/Costura.Fody.1.3.3.0.nupkg


BIN
Fork.Net/packages/Costura.Fody.1.3.3.0/Costura.Fody.dll


+ 0 - 106
Fork.Net/packages/Costura.Fody.1.3.3.0/Tools/commands.psm1

@@ -1,106 +0,0 @@
-function Resolve-ProjectName {
-    param(
-        [parameter(ValueFromPipelineByPropertyName = $true)]
-        [string[]]$ProjectName
-    )
-    
-    if($ProjectName) {
-        $projects = Get-Project $ProjectName
-    }
-    else {
-        # All projects by default
-        $projects = Get-Project
-    }
-    
-    $projects
-}
-
-function Get-MSBuildProject {
-    param(
-        [parameter(ValueFromPipelineByPropertyName = $true)]
-        [string[]]$ProjectName
-    )
-    Process {
-        (Resolve-ProjectName $ProjectName) | % {
-            $path = $_.FullName
-            @([Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($path))[0]
-        }
-    }
-}
-
-function Install-CleanReferencesTarget()
-{
-    $buildProject = Get-MSBuildProject
-
-    if ($buildProject.Xml.Targets | Where-Object { "CleanReferenceCopyLocalPaths" -contains $_.Name })
-    {
-        Write-Host "Target CleanReferenceCopyLocalPaths already exists." -foregroundcolor Black -backgroundcolor Yellow
-
-        return
-    }
-
-    $usingTask = $buildProject.Xml.AddUsingTask("CosturaCleanup", "`$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll", "")
-	$usingTask.TaskFactory = "CodeTaskFactory"
-    $parameterGroup = $usingTask.AddParameterGroup()
-    $configParam = $parameterGroup.AddParameter("Config", "false", "true", "Microsoft.Build.Framework.ITaskItem")
-    $filesParam = $parameterGroup.AddParameter("Files", "false", "true", "Microsoft.Build.Framework.ITaskItem[]")
-	$taskBody = $usingTask.AddUsingTaskBody("true", "<Reference xmlns=`"http://schemas.microsoft.com/developer/msbuild/2003`" Include=`"System.Xml`"/>
-      <Reference xmlns=`"http://schemas.microsoft.com/developer/msbuild/2003`" Include=`"System.Xml.Linq`"/>
-      <Using xmlns=`"http://schemas.microsoft.com/developer/msbuild/2003`" Namespace=`"System`"/>
-      <Using xmlns=`"http://schemas.microsoft.com/developer/msbuild/2003`" Namespace=`"System.IO`"/>
-      <Using xmlns=`"http://schemas.microsoft.com/developer/msbuild/2003`" Namespace=`"System.Xml.Linq`"/>
-      <Code xmlns=`"http://schemas.microsoft.com/developer/msbuild/2003`" Type=`"Fragment`" Language=`"cs`">
-<![CDATA[
-var config = XElement.Load(Config.ItemSpec).Elements(`"Costura`").FirstOrDefault();
-
-if (config == null) return true;
-
-var excludedAssemblies = new List<string>();
-var attribute = config.Attribute(`"ExcludeAssemblies`");
-if (attribute != null)
-    foreach (var item in attribute.Value.Split('|').Select(x => x.Trim()).Where(x => x != string.Empty))
-        excludedAssemblies.Add(item);
-var element = config.Element(`"ExcludeAssemblies`");
-if (element != null)
-    foreach (var item in element.Value.Split(new[] { `"\r\n`", `"\n`" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).Where(x => x != string.Empty))
-        excludedAssemblies.Add(item);
-
-var filesToCleanup = Files.Select(f => f.ItemSpec).Where(f => !excludedAssemblies.Contains(Path.GetFileNameWithoutExtension(f), StringComparer.InvariantCultureIgnoreCase));
-
-foreach (var item in filesToCleanup)
-  File.Delete(item);
-]]>
-      </Code>")
-
-    $target = $buildProject.Xml.AddTarget("CleanReferenceCopyLocalPaths")
-    $target.AfterTargets = "AfterBuild;NonWinFodyTarget"
-    $deleteTask = $target.AddTask("CosturaCleanup")
-    $deleteTask.SetParameter("Config", "FodyWeavers.xml")
-    $deleteTask.SetParameter("Files", "@(ReferenceCopyLocalPaths->`'`$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)`')")
-
-    $buildProject.Save()
-
-    Write-Host "Added target CleanReferenceCopyLocalPaths."
-}
-
-function Uninstall-CleanReferencesTarget()
-{
-    $buildProject = Get-MSBuildProject
-
-    $target = $buildProject.Xml.Targets | Where-Object { "CleanReferenceCopyLocalPaths" -contains $_.Name }
-    $usingTask = $buildProject.Xml.UsingTasks | Where-Object { "CosturaCleanup" -contains $_.TaskName }
-
-    if (!$target)
-    {
-        Write-Host "Target CleanReferenceCopyLocalPaths did not exist." -foregroundcolor Black -backgroundcolor Yellow
-
-        return
-    }
-
-    $buildProject.Xml.RemoveChild($usingTask)
-    $buildProject.Xml.RemoveChild($target)
-
-    $buildProject.Save()
-
-    Write-Host "Removed target CleanReferenceCopyLocalPaths."
-}

+ 0 - 3
Fork.Net/packages/Costura.Fody.1.3.3.0/Tools/init.ps1

@@ -1,3 +0,0 @@
-param($installPath, $toolsPath, $package, $project)
-
-Import-Module (Join-Path $toolsPath commands.psm1)

+ 0 - 4
Fork.Net/packages/Fody.2.0.9/Content/FodyWeavers.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<Weavers>
-  
-</Weavers>

BIN
Fork.Net/packages/Fody.2.0.9/Fody.2.0.9.nupkg


BIN
Fork.Net/packages/Fody.2.0.9/Fody.dll


BIN
Fork.Net/packages/Fody.2.0.9/FodyCommon.dll


BIN
Fork.Net/packages/Fody.2.0.9/FodyIsolated.dll


BIN
Fork.Net/packages/Fody.2.0.9/Mono.Cecil.Mdb.dll


BIN
Fork.Net/packages/Fody.2.0.9/Mono.Cecil.Pdb.dll


BIN
Fork.Net/packages/Fody.2.0.9/Mono.Cecil.Rocks.dll


BIN
Fork.Net/packages/Fody.2.0.9/Mono.Cecil.dll


+ 0 - 3
Fork.Net/packages/Fody.2.0.9/Tools/install.ps1

@@ -1,3 +0,0 @@
-param($installPath, $toolsPath, $package, $project)
-$item = $project.ProjectItems | where-object {$_.Name -eq "FodyWeavers.xml"} 
-$item.Properties.Item("BuildAction").Value = [int]0