Ejemplo n.º 1
0
 public override Primitive Clone()
 {
     ExamPrimitive exam = new ExamPrimitive(this.rect);
     exam.FillColor = this.FillColor;
     exam.LineWidth = this.LineWidth;
     exam.BorderColor = this.BorderColor;
     return exam;
 }
Ejemplo n.º 2
0
        public ExamPrimitive(ExamPrimitive exam) : base(exam)
        {

        }
Ejemplo n.º 3
0
        public void AddRandomExamPrimitive(int width = 200, int height = 200)
        {
            Random rnd = new Random();
            int x = rnd.Next(5, 1100);
            int y = rnd.Next(5, 600);

            ExamPrimitive exam = new ExamPrimitive(new Rectangle(x, y, width, height));
            exam.FillColor = MainForm.GetRandomColor();
            exam.BorderColor = MainForm.GetRandomBorderColor();

            if (Program.form.TabControl.SelectedTab.Equals(Program.form.TabPage3))
                PrimitiveList3.Add(exam);
            else
                PrimitiveList.Add(exam);
            selection = exam;
        }