ButtonLinia addLabel(gtf.Stops S, gtf.Routes routes) { Rozklad.ButtonLinia L = new Rozklad.ButtonLinia(); L.Name = S.stop_name; L.Text = S.stop_name; L.ForeColor = Color.Black; L.BackColor = Color.Gray; L.Font = new Font("Serif", 8, FontStyle.Bold); L.Width = 270; L.Height = 30; L.TextAlign = ContentAlignment.MiddleCenter; L.Margin = new Padding(5); L.przystanek = S; return(L); }
public FlowLayoutPanel F_DodajLinie(FlowLayoutPanel flow, List <gtf.Stops> przym, gtf.Routes routes) { foreach (gtf.Stops S in przym) { ButtonLinia L = addLabel(S, routes); flow.Controls.Add(L); ButtonLinia K = addZona(S); flow.Controls.Add(K); L.Click += new EventHandler(this.labelClick); } return(flow); }
public MPrzystanki(List <gtf.Stops> przym, gtf.Routes linia) { InitializeComponent(); flowLayoutPanel1 = F_DodajLinie(flowLayoutPanel1, przym, linia); }