예제 #1
0
파일: Fronta.cs 프로젝트: surzo18/Covid
        public static void SendToFront(Person p, object o)
        {
            foreach (var i in personsInFront)
            {
                if (p.id == i.id)
                {
                    MessageBox.Show(p.surname + " " + p.name + " už je vo fronte. Nepodarilo sa pridať.");
                    return;
                }
            }

            personsInFront.Add(p);
            MessageBox.Show(p.surname + " " + p.name + " bol pridaný do fronty.");

            if (btnFronta == null)
            {
                btnFronta = (o as Form).Controls[2].Controls[2] as Guna.UI.WinForms.GunaAdvenceButton; // fronta tlacidlo
            }
            btnFronta.Text = "Fronta (" + personsInFront.Count.ToString() + ")";
        }
예제 #2
0
파일: Fronta.cs 프로젝트: surzo18/Covid
 public Fronta(object obj)
 {
     InitializeComponent();
     btnFronta = (obj as Form).Controls[2].Controls[2] as Guna.UI.WinForms.GunaAdvenceButton; // fronta tlacidlo
     lblInfo   = (obj as Form).Controls[2].Controls[0] as Label;                              // info label
 }