示例#1
0
        private static void LaunchDownloadUpdateAppMuteInThread()
        {
            string filename = Application.StartupPath + Path.DirectorySeparatorChar + "ServiceUI.exe";
            string locale   = CultureInfo.CurrentCulture.Name;

            try
            {
                string sourceURL     = UpdateHelper.ActionURL();
                string signatureURL  = UpdateHelper.SignatureURL();
                string sourceFile    = TakaoHelper.GetTempFilePathFromURL(sourceURL);
                string sigantureFile = TakaoHelper.GetTempFilePathFromURL(signatureURL);
                string changeLogURL  = UpdateHelper.LocaleTaggedChangeLogURL();
                if (changeLogURL.Length == 0)
                {
                    changeLogURL = "(null)";
                }

                string  args       = "download " + sourceURL + " " + sourceFile + " " + signatureURL + " " + sigantureFile + " " + changeLogURL + " false";
                Process serviceApp = Process.Start(filename, args);
            }
            catch (Exception)
            { }
        }
示例#2
0
        private static void LaunchDownloadUpdateAppInThread()
        {
            string filename = Application.StartupPath + Path.DirectorySeparatorChar + "ServiceUI.exe";
            string locale   = CultureInfo.CurrentCulture.Name;

            try
            {
                string sourceURL     = UpdateHelper.ActionURL();
                string signatureURL  = UpdateHelper.SignatureURL();
                string sourceFile    = TakaoHelper.GetTempFilePathFromURL(sourceURL);
                string sigantureFile = TakaoHelper.GetTempFilePathFromURL(signatureURL);
                string changeLogURL  = UpdateHelper.LocaleTaggedChangeLogURL();
                if (changeLogURL.Length == 0)
                {
                    changeLogURL = "(null)";
                }

                string  args       = "download " + sourceURL + " " + sourceFile + " " + signatureURL + " " + sigantureFile + " " + changeLogURL + " false";
                Process serviceApp = Process.Start(filename, args);
            }
            catch (Exception)
            {
                if (locale == "zh-TW")
                {
                    MessageBox.Show("\u7121\u6cd5\u4e0b\u8f09\u66f4\u65b0\u6a94\u6848\uff0c\u8acb\u6aa2\u67e5\u60a8\u7684 Yahoo! \u5947\u6469\u8f38\u5165\u6cd5\u662f\u5426\u5b89\u88dd\u6b63\u78ba\u3002", "\u932f\u8aa4\uff01");
                }
                else if (locale == "zh-CN")
                {
                    MessageBox.Show("\u65e0\u6cd5\u4e0b\u8f7d\u66f4\u65b0\u6863\u6848\uff0c\u8bf7\u68c0\u67e5\u60a8\u7684 Yahoo! \u5947\u6469\u8f93\u5165\u6cd5\u662f\u5426\u5b89\u88c5\u6b63\u786e\u3002", "\u9519\u8bef\uff01");
                }
                else
                {
                    MessageBox.Show("Unable to download update! Please check your installation of Yahoo! Keykey. ", "Error!");
                }
            }
        }