Example #1
0
        void wcProductInfo_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            PromptForm prompt = e.UserState as PromptForm;

            prompt.Messages[prompt.Messages.Count - 1].Content = string.Format("正在下载产品信息...{0}%", e.ProgressPercentage);
            prompt.RefreshDisplay();
        }
Example #2
0
        void wcProductInfo_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e)
        {
            PromptForm prompt = e.UserState as PromptForm;

            string xml = Encoding.UTF8.GetString(e.Result);

            BrandInfo.InitializeBrands(xml);
            ProductInfo.InitializeProducts(xml);

            prompt.Messages[prompt.Messages.Count - 1].Content = string.Format("成功下载{0}个产品信息.", ProductInfo.Products.Count);
            prompt.RefreshDisplay();
            prompt.OKEnabled = true;
        }