Удаление картинок учитывает имя переменной

This commit is contained in:
RKQl 2018-03-20 17:13:55 +04:00 committed by GitHub
parent 65fe8cbf46
commit 4a7290aa6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,8 +80,25 @@ namespace WindowsFormsApplication1
}
private string PersonName(int nomer)
{
return "per" + nomer.ToString();
}
private void delete_pics2(string filename, int nomer)
{
File.AppendAllText(filename, Environment.NewLine);
//Стало
for (int n1 = 0; n1 <= 5; n1++)
{
File.AppendAllText(filename, " txDeleteDC(" + PersonName(n1) + ".texture);" + Environment.NewLine);
}
}
private void button4_Click(object sender, EventArgs e)
{
MessageBox.Show(PersonName(1));
//Ñïèñîê âñåõ ôàéëîâ ïàïêè
//Ñîçäàåøü èç íèõ ìàññèâ (èëè ñïèñîê)
//Âûáèðàåøü ðàíäîìíûé íîìåð
@ -195,7 +212,7 @@ namespace WindowsFormsApplication1
open_while(filename);
sinus3(filename);
close_while(filename);
delete_pics(filename);
delete_pics2(filename, 5);
}
else if (ComboBoxMove.Text == "Кругами")
{