Ejemplo n.º 1
0
            public _Pointer(Robot r, string strname, IPointable p, int arrowOffset = 1, int nameOffset = 1)
            {
                this.r           = r;
                this.p           = p;
                this.strname     = strname;
                this.arrowOffset = arrowOffset;
                this.nameOffset  = nameOffset;

                arrow          = new Label();
                arrow.AutoSize = true;
                arrow.Text     = "è"; //Arrow character
                arrow.Font     = new Font("Wingdings", 10, FontStyle.Bold);
                r.positionOnTop(p.key, arrow, arrowOffset);

                name          = new Label();
                name.AutoSize = true;
                name.Text     = strname;
                name.Font     = new Font("Times New Roman", 10, FontStyle.Bold);
                r.positionOnTop(arrow, name, nameOffset);
                r.container.Invoke(new Action(delegate() //Invoke is used to access the UI thread from the sort thread
                {
                    r.container.Controls.Add(arrow);
                    r.container.Controls.Add(name);
                }));
            }
Ejemplo n.º 2
0
 public void setIndex(IPointable p)
 {
     this.p = p;
     r.container.Invoke(new Action(delegate()
     {
         r.positionOnTop(p.key, arrow, arrowOffset);
         r.positionOnTop(arrow, name, nameOffset);
     }));
     r.suspend(r.delay);
 }
Ejemplo n.º 3
0
            public Temp(Robot r, string strkey, object objvalue)
            {
                this.r = r;


                key = new Label();

                key.AutoSize = true;
                key.Text     = strkey;

                value          = new Label();
                value.Font     = new Font("Arial", 12, FontStyle.Bold);
                value.AutoSize = true;
                value.Text     = objvalue.ToString();

                if (r.Temps.Count == 0)
                {
                    Label seperator = new Label();
                    seperator.AutoSize = true;
                    seperator.Text     = "|";
                    seperator.Font     = new Font("Arial", 12, FontStyle.Bold);
                    r.positionNextTo(r.Elements[r.Elements.Count - 1].value, seperator);


                    r.positionNextTo(seperator, value);


                    r.positionOnTop(value, key);

                    r.container.Invoke(new Action(delegate()
                    {
                        r.container.Controls.Add(seperator);
                        r.container.Controls.Add(value);
                        r.container.Controls.Add(key);
                    }));
                }
                else
                {
                    r.positionNextTo(r.Temps[r.Temps.Count - 1].value, value);


                    r.positionOnTop(value, key);


                    r.container.Invoke(new Action(delegate()
                    {
                        r.container.Controls.Add(value);
                        r.container.Controls.Add(key);
                    }));
                }
            }
Ejemplo n.º 4
0
            public Element(Robot r, string strkey, object objvalue)
            {
                this.r = r;

                value          = new Label();
                value.Font     = new Font("Arial", 12, FontStyle.Bold);
                value.AutoSize = true;
                value.Text     = objvalue.ToString();
                if (r.Elements.Count == 0)
                {
                    r.positionInside(r.container, value, r.values.Length);
                }
                else
                {
                    r.positionNextTo(r.Elements[r.Elements.Count - 1].value, value);
                }

                key          = new Label();
                key.AutoSize = true;
                key.Text     = strkey;
                r.positionOnTop(value, key);


                r.container.Controls.Add(key);
                r.container.Controls.Add(value);
            }