Beispiel #1
0
        public virtual void CheckUpdate(bool background)
        {
            if (background)
            {
                SACheckUpdate ck = new SACheckUpdate();
                //SALicense lic = new SALicense();
                //string hostid = lic.HostID;

                ck.URLs.Add(this.CheckUpdateURL);
                //ck.Items.Add("sn", hostid);
                //ck.Items.Add("mac", ck.MAC(hostid));
                ck.Items.Add("id", this.ProductID);
                ck.Items.Add("version", this.Version);
                ck.Items.Add("oem", this.OEM.ToString());
                ck.Quiet = true;
                ck.CheckInBackground();
            }
            else
            {
                FileInfo fi = new FileInfo(Application.ExecutablePath);
                string   f  = Path.Combine(fi.DirectoryName, "Update.exe");
                if (File.Exists(f))
                {
                    Process.Start(f);
                }
            }
        }
Beispiel #2
0
        public virtual void CheckUpdate(bool background)
        {
            if (background)
            {
                SACheckUpdate ck = new SACheckUpdate();
                //SALicense lic = new SALicense();
                //string hostid = lic.HostID;

                ck.URLs.Add(this.CheckUpdateURL);
                //ck.Items.Add("sn", hostid);
                //ck.Items.Add("mac", ck.MAC(hostid));
                ck.Items.Add("id", this.ProductID);
                ck.Items.Add("version", this.Version);
                ck.Items.Add("oem", this.OEM.ToString());
                ck.Quiet = true;
                ck.CheckInBackground();
            }
            else
            {
                FileInfo fi = new FileInfo(Application.ExecutablePath);
                string f = Path.Combine(fi.DirectoryName, "Update.exe");
                if (File.Exists(f))
                {
                    Process.Start(f);
                }
            }
        }