Exemplo n.º 1
0
        public override void Select(List <Congratulations> List, CongratulationTransaction @object, int indexOfSelect)
        {
            int Y = @object.Y;

            try
            {
                Label SQLLabel;
                List = List.FindAll(p => p.GetThematicId() == indexOfSelect);

                foreach (var i in List)
                {
                    SQLLabel = new Label
                    {
                        AutoSize  = true,
                        TextAlign = System.Drawing.ContentAlignment.MiddleCenter,
                        Location  = new Point(@object.X, Y),
                        Font      = @object.Font,
                        Text      = i.GetText() + "\n\n" + i.GetAuthor(),
                        Tag       = i
                    };
                    MainForm.Controls.Add(SQLLabel);
                    Y += SQLLabel.Size.Height + 20;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString(), ex.Source.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
 public virtual void Select(List <Congratulations> List, CongratulationTransaction @object, int indexOfSelect)
 {
     Console.WriteLine("Performing base class selecting all info from Events by loading form");
 }