1
By clicking on the dynamico button of the event click Tiles , it opens several sites loaded from the file Settings.ini ... in case it should open one by one relative to the name and link but open all at the same time.
Note: I am using Metrotiles as buttons (Metroframework Components).
My file Settings.ini
[bot]
b00=Debian
b01=Mineos
b02=Utorrent
b03=Debian Apache Web Server
b04=Debian Mysql Web Server
b05=Ez Monitor
b06=Netdata
[web]
h00=https://debian:10100/
h01=https://debian:8443/
h02=https://debian:8080/gui/
h03=http://ccstudio.zapto.org/
h04=http://debian/phpmyadmin/
h05=http://debian/app/cc/linux/eZ/
h06=http://debian:19999
My code
//TILES ADD
for (int i = 0; i < 15; i++)
{
var a = new IniFile("Settings.ini");
var b = new MetroTile();
var c = new MetroLabel();
b.Height = 50;
b.Width = 100;
b.Margin = new Padding(5, 5, 5, 5);
b.Click += new EventHandler(b_Click);
b.MouseEnter += new EventHandler(b_Move);
b.Text = a.Read("b0" + i . ToString(), "bot");
//c.Text = a.Read("h0" + i . ToString(), "web");
//c.Hide();
b.UseCustomBackColor = true;
b.BackColor = GetRandomColor();
flowLayoutPanel1.Controls.Add(b);
/// flowLayoutPanel1.Controls.Add(c);
}
}
private void b_Click(object sender, EventArgs e)
{
var a = new IniFile("Settings.ini");
for (int i = 1; i < 11; i++)
{
Process.Start(a.Read("h0" + i.ToString(), "web"));
}
}
What error appears ?
– Bruno H.
opens all links by clicking on the 1st button (in this case) and not a link to each button
– carlos coelho