Browse Source

调整更新请求url,优化启动器可以下载安装软件

yuzhengyang 8 years ago
parent
commit
f9bd60a2ae

+ 4 - 4
Fork.Net/Test/Y.Test/Program.cs

@@ -20,15 +20,15 @@ namespace Y.Test
         [STAThread]
         static void Main()
         {
-            string param = string.Format("id={0}&text={1}", "123123123", "123123123");
-            //string rs = HttpTool.Post("http://localhost:20001/Data/Post", param);
-            WebAPIMessageModel rs = HttpTool.Post<WebAPIMessageModel>("http://localhost:20001/Data/Post", param);
+            //string param = string.Format("id={0}&text={1}", "123123123", "123123123");
+            ////string rs = HttpTool.Post("http://localhost:20001/Data/Post", param);
+            //WebAPIMessageModel rs = HttpTool.Post<WebAPIMessageModel>("http://localhost:20001/Data/Post", param);
 
             //var a = DirTool.Parent(@"D:\Temp\流量测试\");
             //var b = DirTool.Parent(@"D:\Temp");
             //var c = DirTool.Parent(@"D:\");
             //var d = DirTool.Parent(@"\\\\");
-            //FilePackageTool.Pack(@"D:\Temp\流量测试\Oreo.NetMan", @"D:\Temp\流量测试\bag.bag");
+            
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
             Application.Run(new MainForm());

+ 13 - 0
Fork.Net/Test/Y.Test/Views/MainForm.Designer.cs

@@ -31,6 +31,7 @@
             this.ChineseCalendarForm = new System.Windows.Forms.Button();
             this.TestComputerInfoForm = new System.Windows.Forms.Button();
             this.TestUpdateForm = new System.Windows.Forms.Button();
+            this.TestPackForm = new System.Windows.Forms.Button();
             this.SuspendLayout();
             // 
             // ChineseCalendarForm
@@ -63,11 +64,22 @@
             this.TestUpdateForm.UseVisualStyleBackColor = true;
             this.TestUpdateForm.Click += new System.EventHandler(this.TestUpdateForm_Click);
             // 
+            // TestPackForm
+            // 
+            this.TestPackForm.Location = new System.Drawing.Point(70, 267);
+            this.TestPackForm.Name = "TestPackForm";
+            this.TestPackForm.Size = new System.Drawing.Size(262, 23);
+            this.TestPackForm.TabIndex = 3;
+            this.TestPackForm.Text = "TestPackForm";
+            this.TestPackForm.UseVisualStyleBackColor = true;
+            this.TestPackForm.Click += new System.EventHandler(this.TestPackForm_Click);
+            // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(564, 427);
+            this.Controls.Add(this.TestPackForm);
             this.Controls.Add(this.TestUpdateForm);
             this.Controls.Add(this.TestComputerInfoForm);
             this.Controls.Add(this.ChineseCalendarForm);
@@ -82,5 +94,6 @@
         private System.Windows.Forms.Button ChineseCalendarForm;
         private System.Windows.Forms.Button TestComputerInfoForm;
         private System.Windows.Forms.Button TestUpdateForm;
+        private System.Windows.Forms.Button TestPackForm;
     }
 }

+ 5 - 0
Fork.Net/Test/Y.Test/Views/MainForm.cs

@@ -31,5 +31,10 @@ namespace Y.Test.Views
         {
             R.Forms.GetUnique<TestUpdateForm>().Show();
         }
+
+        private void TestPackForm_Click(object sender, EventArgs e)
+        {
+            R.Forms.GetUnique<TestPackForm>().Show();
+        }
     }
 }

+ 118 - 0
Fork.Net/Test/Y.Test/Views/TestPackForm.Designer.cs

@@ -0,0 +1,118 @@
+namespace Y.Test.Views
+{
+    partial class TestPackForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.BTPack = new System.Windows.Forms.Button();
+            this.progressBar1 = new System.Windows.Forms.ProgressBar();
+            this.label1 = new System.Windows.Forms.Label();
+            this.TBFrom = new System.Windows.Forms.TextBox();
+            this.TBTo = new System.Windows.Forms.TextBox();
+            this.BTUnpack = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // BTPack
+            // 
+            this.BTPack.Location = new System.Drawing.Point(263, 235);
+            this.BTPack.Name = "BTPack";
+            this.BTPack.Size = new System.Drawing.Size(75, 23);
+            this.BTPack.TabIndex = 0;
+            this.BTPack.Text = "Pack";
+            this.BTPack.UseVisualStyleBackColor = true;
+            this.BTPack.Click += new System.EventHandler(this.BTPack_Click);
+            // 
+            // progressBar1
+            // 
+            this.progressBar1.Location = new System.Drawing.Point(12, 150);
+            this.progressBar1.Name = "progressBar1";
+            this.progressBar1.Size = new System.Drawing.Size(454, 23);
+            this.progressBar1.TabIndex = 1;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(12, 176);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(41, 12);
+            this.label1.TabIndex = 2;
+            this.label1.Text = "label1";
+            // 
+            // TBFrom
+            // 
+            this.TBFrom.Location = new System.Drawing.Point(15, 45);
+            this.TBFrom.Name = "TBFrom";
+            this.TBFrom.Size = new System.Drawing.Size(452, 21);
+            this.TBFrom.TabIndex = 3;
+            this.TBFrom.Text = "D:\\Temp\\测试打包\\bag1.bag";
+            // 
+            // TBTo
+            // 
+            this.TBTo.Location = new System.Drawing.Point(15, 87);
+            this.TBTo.Name = "TBTo";
+            this.TBTo.Size = new System.Drawing.Size(452, 21);
+            this.TBTo.TabIndex = 4;
+            this.TBTo.Text = "D:\\Temp\\测试打包\\unpack";
+            // 
+            // BTUnpack
+            // 
+            this.BTUnpack.Location = new System.Drawing.Point(391, 235);
+            this.BTUnpack.Name = "BTUnpack";
+            this.BTUnpack.Size = new System.Drawing.Size(75, 23);
+            this.BTUnpack.TabIndex = 5;
+            this.BTUnpack.Text = "Unpack";
+            this.BTUnpack.UseVisualStyleBackColor = true;
+            this.BTUnpack.Click += new System.EventHandler(this.BTUnpack_Click);
+            // 
+            // TestPackForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(479, 270);
+            this.Controls.Add(this.BTUnpack);
+            this.Controls.Add(this.TBTo);
+            this.Controls.Add(this.TBFrom);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.progressBar1);
+            this.Controls.Add(this.BTPack);
+            this.Name = "TestPackForm";
+            this.Text = "TestPackForm";
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button BTPack;
+        private System.Windows.Forms.ProgressBar progressBar1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox TBFrom;
+        private System.Windows.Forms.TextBox TBTo;
+        private System.Windows.Forms.Button BTUnpack;
+    }
+}

+ 39 - 0
Fork.Net/Test/Y.Test/Views/TestPackForm.cs

@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using Y.Utils.DelegateUtils;
+using Y.Utils.IOUtils.FileUtils;
+
+namespace Y.Test.Views
+{
+    public partial class TestPackForm : Form
+    {
+        public TestPackForm()
+        {
+            InitializeComponent();
+        }
+        private void BTPack_Click(object sender, EventArgs e)
+        {
+            FilePackageTool.Pack(TBFrom.Text, TBTo.Text, UIProgress);
+        }
+        private void BTUnpack_Click(object sender, EventArgs e)
+        {
+            FilePackageTool.Unpack(TBFrom.Text, TBTo.Text, UIProgress);
+        }
+        private void UIProgress(object sender, ProgressEventArgs e)
+        {
+            BeginInvoke(new Action(() =>
+            {
+                progressBar1.Value = (int)(e.Current * 100 / e.Total);
+                label1.Text = string.Format("{0} / {1}", e.Current, e.Total);
+            }));
+        }
+
+
+    }
+}

+ 120 - 0
Fork.Net/Test/Y.Test/Views/TestPackForm.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>

+ 9 - 0
Fork.Net/Test/Y.Test/Y.Test.csproj

@@ -124,6 +124,12 @@
     <Compile Include="Views\TestMove.Designer.cs">
       <DependentUpon>TestMove.cs</DependentUpon>
     </Compile>
+    <Compile Include="Views\TestPackForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Views\TestPackForm.Designer.cs">
+      <DependentUpon>TestPackForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="Views\TestSimpleTitle.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -170,6 +176,9 @@
     <EmbeddedResource Include="Views\TestMove.resx">
       <DependentUpon>TestMove.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Views\TestPackForm.resx">
+      <DependentUpon>TestPackForm.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Views\TestSimpleTitle.resx">
       <DependentUpon>TestSimpleTitle.cs</DependentUpon>
     </EmbeddedResource>

+ 3 - 1
Fork.Net/Y.Skin/Y.Skin.csproj

@@ -110,7 +110,9 @@
       <DependentUpon>FlexiblePanel.cs</DependentUpon>
     </Compile>
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <Folder Include="YoTextBox\" />
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Y.Utils\Y.Utils.csproj">
       <Project>{5b8eeec7-aeb5-407d-9dc1-1c59e53f78d5}</Project>

+ 39 - 0
Fork.Net/Y.Utils/AppUtils/AppLaunchTool.cs

@@ -56,5 +56,44 @@ namespace Y.Utils.AppUtils
             }
             return false;
         }
+        public static bool StartNewVersion(string appPath, string startfilename)
+        {
+            if (Directory.Exists(appPath))
+            {
+                //获取运行目录下所有文件
+                List<string> paths = DirTool.GetPath(appPath);
+                if (ListTool.HasElements(paths))
+                {
+                    //解析属于版本号的文件
+                    Version version = null;
+                    string startfile = null;
+                    foreach (var path in paths)
+                    {
+                        //只解析文件名带三个点的文件夹
+                        string filename = Path.GetFileName(path);
+                        if (StringTool.SubStringCount(filename, ".") == 3)
+                        {
+                            try
+                            {
+                                Version tempVersion = new Version(filename);
+                                string tempFile = DirTool.Combine(path, startfilename);
+                                if ((version == null || tempVersion > version) && File.Exists(tempFile))
+                                {
+                                    version = tempVersion;
+                                    startfile = tempFile;
+                                }
+                            }
+                            catch { }
+                        }
+                    }
+                    //准备启动
+                    if (startfile != null)
+                    {
+                        return ProcessTool.Start(startfile);
+                    }
+                }
+            }
+            return false;
+        }
     }
 }

+ 29 - 19
Fork.Net/Y.Utils/IOUtils/FileUtils/FilePackageTool.cs

@@ -83,7 +83,8 @@ namespace Y.Utils.IOUtils.FileUtils
                         //循环写入文件
                         files.ForEach(x =>
                         {
-                            using (FileStream fsRead = new FileStream(DirTool.Combine(srcPath, x.Path, x.Name), FileMode.Open))
+                            //读取文件(可访问被打开的exe文件)
+                            using (FileStream fsRead = new FileStream(DirTool.Combine(srcPath, x.Path, x.Name), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
                             {
                                 int readCount = 0;
                                 byte[] buffer = new byte[FileBuffer];
@@ -157,28 +158,37 @@ namespace Y.Utils.IOUtils.FileUtils
                             {
                                 if (DirTool.Create(DirTool.Combine(dstPath, x.Path)))
                                 {
-                                    using (FileStream fsWrite = new FileStream(DirTool.Combine(dstPath, x.Path, x.Name), FileMode.Create))
+                                    try
                                     {
-                                        long size = x.Size;
-                                        int readCount = 0;
-                                        byte[] buffer = new byte[FileBuffer];
-
-                                        while (size > FileBuffer)
-                                        {
-                                            readCount = fsRead.Read(buffer, 0, buffer.Length);
-                                            fsWrite.Write(buffer, 0, readCount);
-                                            size -= readCount;
-                                            current += readCount;
-                                            progress?.Invoke(sender, new ProgressEventArgs(current, allfilesize));
-                                        }
-                                        if (size <= FileBuffer)
+                                        using (FileStream fsWrite = new FileStream(DirTool.Combine(dstPath, x.Path, x.Name), FileMode.Create))
                                         {
-                                            readCount = fsRead.Read(buffer, 0, (int)size);
-                                            fsWrite.Write(buffer, 0, readCount);
-                                            current += readCount;
-                                            progress?.Invoke(sender, new ProgressEventArgs(current, allfilesize));
+                                            long size = x.Size;
+                                            int readCount = 0;
+                                            byte[] buffer = new byte[FileBuffer];
+
+                                            while (size > FileBuffer)
+                                            {
+                                                readCount = fsRead.Read(buffer, 0, buffer.Length);
+                                                fsWrite.Write(buffer, 0, readCount);
+                                                size -= readCount;
+                                                current += readCount;
+                                                progress?.Invoke(sender, new ProgressEventArgs(current, allfilesize));
+                                            }
+                                            if (size <= FileBuffer)
+                                            {
+                                                readCount = fsRead.Read(buffer, 0, (int)size);
+                                                fsWrite.Write(buffer, 0, readCount);
+                                                current += readCount;
+                                                progress?.Invoke(sender, new ProgressEventArgs(current, allfilesize));
+                                            }
                                         }
                                     }
+                                    catch (Exception e)
+                                    {
+                                        fsRead.Seek(x.Size, SeekOrigin.Current);
+                                        current += x.Size;
+                                        progress?.Invoke(sender, new ProgressEventArgs(current, allfilesize));
+                                    }
                                 }
                             });
                             //验证文件列表

+ 23 - 17
Fork.Net/Y.Utils/NetUtils/NetInfoUtils/NetflowTool.cs

@@ -39,7 +39,7 @@ namespace Y.Utils.NetUtils.NetInfoUtils
 
         private List<PerformanceCounter> UploadCounter, DownloadCounter;//上行、下行流量计数器
         private int DataCounterInterval = 1000;//数据流量计数器计数周期
-        private bool DataMonitorSwitch = false;
+        private bool IsStart = false;
 
         public delegate void MonitorEvent(NetFlowTool n);
         public MonitorEvent DataMonitorEvent;
@@ -79,14 +79,14 @@ namespace Y.Utils.NetUtils.NetInfoUtils
         }
         public bool Start(int interval = 1000)
         {
-            if (Init() && !DataMonitorSwitch)
+            if (Init() && !IsStart)
             {
                 DataCounterInterval = interval;
-                DataMonitorSwitch = true;
+                IsStart = true;
 
                 Task.Factory.StartNew(() =>
                 {
-                    while (DataMonitorSwitch)
+                    while (IsStart)
                     {
                         DataMonitorEvent?.Invoke(this);
                         try
@@ -117,27 +117,33 @@ namespace Y.Utils.NetUtils.NetInfoUtils
         }
         public void Restart()
         {
-            foreach (var uc in UploadCounter)
+            if (IsStart)
             {
-                uc?.Close();
-            }
-            foreach (var dc in DownloadCounter)
-            {
-                dc?.Close();
+                foreach (var uc in UploadCounter)
+                {
+                    uc?.Close();
+                }
+                foreach (var dc in DownloadCounter)
+                {
+                    dc?.Close();
+                }
             }
 
             Init();
         }
         public void Stop()
         {
-            DataMonitorSwitch = false;
-            foreach (var uc in UploadCounter)
+            if (IsStart)
             {
-                uc?.Close();
-            }
-            foreach (var dc in DownloadCounter)
-            {
-                dc?.Close();
+                IsStart = false;
+                foreach (var uc in UploadCounter)
+                {
+                    uc?.Close();
+                }
+                foreach (var dc in DownloadCounter)
+                {
+                    dc?.Close();
+                }
             }
         }
         /// <summary>

+ 4 - 0
Fork.Net/Y.Utils/UpdateUtils/AppUpdateInfo.cs

@@ -26,6 +26,10 @@ namespace Y.Utils.UpdateUtils
         /// </summary>
         public string Version { get; set; }
         /// <summary>
+        /// 必要更新
+        /// </summary>
+        public bool Necessary { get; set; }
+        /// <summary>
         /// 新版本描述(Readme)
         /// </summary>
         public string Desc { get; set; }

+ 2 - 2
Fork.Net/Y.Utils/UpdateUtils/AppUpdateTool.cs

@@ -35,12 +35,12 @@ namespace Y.Utils.UpdateUtils
         /// -10;//请求版本失败
         /// -20;//没有更新的版本
         /// </returns>
-        public int GetNewVersion(string url, string name, Version version, out AppUpdateInfo info)
+        public int GetNewVersion(string url, Version version, out AppUpdateInfo info)
         {
             Stopwatch stopwatch = new Stopwatch();
             stopwatch.Start();
 
-            info = HttpTool.Get<AppUpdateInfo>(string.Format("{0}?name={1}", url, name));
+            info = HttpTool.Get<AppUpdateInfo>(url);
             if (info != null)
             {
                 Version newVersion = FormatVersion(info.Version);