Add files via upload
DataGridView Error
This commit is contained in:
parent
7f0e5e135f
commit
539927bb20
9 changed files with 50 additions and 7 deletions
|
@ -33,6 +33,7 @@ namespace Tariffs
|
||||||
|
|
||||||
private void Form1_Load(object sender, EventArgs e)
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
int arrlenght = 50;
|
||||||
WebClient client = new WebClient();
|
WebClient client = new WebClient();
|
||||||
String remoteFile = "https://tariffslist.000webhostapp.com/list.txt";
|
String remoteFile = "https://tariffslist.000webhostapp.com/list.txt";
|
||||||
|
|
||||||
|
@ -120,8 +121,8 @@ namespace Tariffs
|
||||||
|
|
||||||
StreamReader listfile = new StreamReader("list.txt");
|
StreamReader listfile = new StreamReader("list.txt");
|
||||||
String firststr = listfile.ReadLine();
|
String firststr = listfile.ReadLine();
|
||||||
String[][] tariffsArr = new String[50, 7];
|
String[,] tariffsArr = new String[arrlenght, 8];
|
||||||
String line = "";
|
String line;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (!(firststr == "Tariffs"))
|
if (!(firststr == "Tariffs"))
|
||||||
|
@ -136,17 +137,36 @@ namespace Tariffs
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((line = listfile.ReadLine()) != null)
|
line = listfile.ReadLine();
|
||||||
|
|
||||||
|
while (line != "End")
|
||||||
{
|
{
|
||||||
if (!line.StartsWith("#"))
|
if (!(line.StartsWith("#")) && line != "" && line != null)
|
||||||
{
|
{
|
||||||
tariffsArr[i] = line.Split(new char[] {','});
|
for (int ind = 1; ind < 7; ind++)
|
||||||
|
{
|
||||||
|
tariffsArr[i, ind] = line.Split(new char[] { ',' })[ind];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
line = listfile.ReadLine();
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int rowind = 0; rowind < 50; rowind++)
|
||||||
|
{
|
||||||
|
tariffsArr[rowind, 0] = "false";
|
||||||
|
}
|
||||||
|
|
||||||
listfile.Close();
|
listfile.Close();
|
||||||
|
|
||||||
|
for (int j = 0; j < arrlenght; j++)
|
||||||
|
{
|
||||||
|
for (int k = 0; k < 8; k++)
|
||||||
|
{
|
||||||
|
_ = dataGridView1.Rows.Add(tariffsArr[j, k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,16 @@
|
||||||
Tariffs
|
Tariffs
|
||||||
#Operator,Tariff, MINS,SMS,MMS, GB,pay
|
#Operator, Tariff, MINS, SMS, MMS, GB, pay
|
||||||
MegaFon,Включайся!Открывай,250,200,9.9руб,2,280
|
MegaFon,Включайся! Открывай,250,200,9.9руб,2,280
|
||||||
|
MegaFon,Включайся! Пиши,400,300,9.9руб,6,250
|
||||||
|
MegaFon,Переходи на НОЛЬ,1.15руб,3руб,9.9руб,100MB за 5руб,0
|
||||||
|
MTS,Тарифище,500,500,9.9руб,Безлимит,175
|
||||||
|
MTS,Smart,500,500,9.9руб,5,200
|
||||||
|
MTS,Супер МТС,0.95руб,2руб,9.9руб,0,0
|
||||||
|
BeeLine,Анлим,700,2.5руб,0,Безлимит,450
|
||||||
|
BeeLine,Первые гиги,400,2.5руб,0,10,270
|
||||||
|
BeeLine,Первые гиги+,600,2.5руб,0,20,350
|
||||||
|
Tele2,Мой онлайн,350,1.95руб,5.5руб,15,300
|
||||||
|
Tele2,Мой онлайн+,550,1.95руб,5.5руб,25,350
|
||||||
|
Tele2,Мой разговор,150,1.95руб,5.5руб,2,200
|
||||||
|
Tele2,Классический,1.20руб,1.5руб,5.5руб,0,0
|
||||||
|
End
|
||||||
|
|
|
@ -18,3 +18,13 @@ C:\Users\Acer\VisualStudio\source\repos\Tariff\Tariffs\obj\Debug\Tariffs.Propert
|
||||||
C:\Users\Acer\VisualStudio\source\repos\Tariff\Tariffs\obj\Debug\Tariffs.csproj.GenerateResource.cache
|
C:\Users\Acer\VisualStudio\source\repos\Tariff\Tariffs\obj\Debug\Tariffs.csproj.GenerateResource.cache
|
||||||
C:\Users\Acer\VisualStudio\source\repos\Tariff\Tariffs\obj\Debug\Tariffs.exe
|
C:\Users\Acer\VisualStudio\source\repos\Tariff\Tariffs\obj\Debug\Tariffs.exe
|
||||||
C:\Users\Acer\VisualStudio\source\repos\Tariff\Tariffs\obj\Debug\Tariffs.pdb
|
C:\Users\Acer\VisualStudio\source\repos\Tariff\Tariffs\obj\Debug\Tariffs.pdb
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\bin\Debug\Tariffs.exe.config
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\bin\Debug\Tariffs.exe
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\bin\Debug\Tariffs.pdb
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.csprojAssemblyReference.cache
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.Form1.resources
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.ProgramHelp.resources
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.Properties.Resources.resources
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.csproj.GenerateResource.cache
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.exe
|
||||||
|
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.pdb
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue