Esempio n. 1
0
        private void pictureBox3_Paint(object sender, PaintEventArgs e)
        {
            TagDrawer d = new TagDrawer();

            this.tagLocations = d.Draw(this.last,
                                       e.Graphics,
                                       new Rectangle(0, 0, this.pictureBoxFix.Width, this.pictureBoxFix.Height),
                                       20,
                                       this.selected,
                                       this.marked);
            UpdateClipboard();
        }
Esempio n. 2
0
        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            int mid = pictureBox1.Width / 2;

            if (comp != null)
            {
                TagDrawer d = new TagDrawer();

                int i = 1;

                var tags2 = comp.Fix2.Tags.ToList();

                foreach (int tag_number in comp.GetAllFixTagNumbers())
                {
                    Color c = Color.LightBlue;

                    if (comp.Fix1[tag_number] != null)
                    {
                        var    search = tags2.Where(x => x.Tag == tag_number);
                        FixTag tag2   = search.Count() == 0 ? null : search.First();
                        tags2.Remove(tag2);

                        if (tag2 == null)
                        {
                            c = Color.LightPink;
                        }
                        else
                        {
                            if (comp.Fix1[tag_number].Value != tag2.Value)
                            {
                                c = Color.LightSalmon;
                            }
                        }
                        d.Draw(comp.Fix1[tag_number], e.Graphics, new Point(mid - 10, i * 22), 18, c, false);
                    }
                    else
                    {
                        c = Color.LightPink;
                    }

                    if (comp.Fix2[tag_number] != null)
                    {
                        d.Draw(comp.Fix2[tag_number], e.Graphics, new Point(mid + 10, i * 22), 18, c);
                    }
                    i++;
                }
            }
        }