示例#1
0
        private void ProcessJSON()
        {
            if (json.Count > 0 && json[index] != null)
            {
                labelStatus.Text = string.Format(status, index + 1, json.Count);

                var pic = imgFolder + json[index].ID + FileUtility.ReplaceInvalidChar(json[index].Title) + ".jpg";
                if (File.Exists(pic))
                {
                    pictureBox1.Image = Image.FromFile(pic);
                }

                var comments = JavDataBaseManager.GetComment(json[index].ID, FileUtility.ReplaceInvalidChar(json[index].Title));

                if (ScanDataBaseManager.HasMatch(json[index].ID))
                {
                    labelMark.BackColor = Color.Green;
                }
                else
                {
                    labelMark.BackColor = Color.Red;
                }

                ShowContent(comments);
            }
        }