Fixed DataGridView Error, Added Links to the operators sites. Application is working!
But I don't do working compare function. Coming soon...
This commit is contained in:
Андрей 2020-01-22 17:14:02 +03:00 committed by GitHub
parent 539927bb20
commit adf52f5a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 3876 additions and 4 deletions

62
Tariffs/Browser.Designer.cs generated Normal file
View file

@ -0,0 +1,62 @@
namespace Tariffs
{
partial class Browser
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Browser));
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.SuspendLayout();
//
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size(800, 450);
this.webBrowser1.TabIndex = 0;
//
// Browser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.webBrowser1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Browser";
this.Text = "Browser";
this.Load += new System.EventHandler(this.Browser_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.WebBrowser webBrowser1;
}
}

34
Tariffs/Browser.cs Normal file
View file

@ -0,0 +1,34 @@
using System;
using System.Diagnostics;
using System.Windows.Forms;
namespace Tariffs
{
public partial class Browser : Form
{
private Uri weburi;
public Browser(String url)
{
InitializeComponent();
weburi = new Uri(url);
webBrowser1.Url = weburi;
webBrowser1.ScriptErrorsSuppressed = true;
}
private void Browser_Load(object sender, EventArgs e)
{
String openInBrowser = MessageBox.Show("Открыть ссылку в браузере?",
"Вопрос",
MessageBoxButtons.YesNo,
MessageBoxIcon.Information).ToString();
if (openInBrowser == "Yes")
{
_ = Process.Start(weburi.ToString());
Close();
}
}
}
}

3622
Tariffs/Browser.resx Normal file

File diff suppressed because it is too large Load diff

View file

@ -302,56 +302,85 @@
//
// button1
//
this.button1.BackgroundImage = global::Tariffs.Properties.Resources.logotip_megafon;
this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.button1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button1.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
this.button1.Location = new System.Drawing.Point(3, 3);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(228, 139);
this.button1.TabIndex = 0;
this.button1.Text = "MegaFon";
this.button1.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.BackgroundImage = global::Tariffs.Properties.Resources.logotip_mts;
this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.button2.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button2.Location = new System.Drawing.Point(237, 3);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(251, 139);
this.button2.TabIndex = 1;
this.button2.Text = "MTS";
this.button2.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.BackgroundImage = global::Tariffs.Properties.Resources.logotip_beeline;
this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.button3.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
this.button3.Location = new System.Drawing.Point(494, 3);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(233, 139);
this.button3.TabIndex = 2;
this.button3.Text = "BeeLine";
this.button3.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.BackgroundImage = global::Tariffs.Properties.Resources.logotip_tele2;
this.button4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.button4.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button4.Location = new System.Drawing.Point(3, 148);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(228, 136);
this.button4.TabIndex = 3;
this.button4.Text = "Tele2";
this.button4.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
this.button5.BackgroundImage = global::Tariffs.Properties.Resources.logotip_tinkoff_mobile;
this.button5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.button5.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button5.Location = new System.Drawing.Point(237, 148);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(251, 136);
this.button5.TabIndex = 4;
this.button5.Text = "Tinkoff Mobile";
this.button5.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
this.button6.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.button6.Location = new System.Drawing.Point(494, 148);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(233, 136);
this.button6.TabIndex = 5;
this.button6.Text = "GitHub - Страница проекта";
this.button6.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
this.button6.UseVisualStyleBackColor = true;
//
// Form1

View file

@ -145,7 +145,7 @@ namespace Tariffs
{
for (int ind = 1; ind < 7; ind++)
{
tariffsArr[i, ind] = line.Split(new char[] { ',' })[ind];
tariffsArr[i, ind] = line.Split(new char[] { ',' })[ind-1];
}
}
@ -160,13 +160,47 @@ namespace Tariffs
listfile.Close();
for (int j = 0; j < arrlenght; j++)
String[] rowsArray = new String[8];
for (int elind = 0; elind < 50; elind++)
{
for (int k = 0; k < 8; k++)
for (int propind = 0; propind < 8; propind++)
{
_ = dataGridView1.Rows.Add(tariffsArr[j, k]);
}
}
rowsArray[propind] = tariffsArr[elind, propind];
}
_ = dataGridView1.Rows.Add(rowsArray);
}
}
private void openBrowser(String operatorsUrl)
{
Browser b = new Browser(operatorsUrl);
b.Show();
}
private void button1_Click(object sender, EventArgs e)
{
openBrowser("https://www.megafon.ru/");
}
private void button2_Click(object sender, EventArgs e)
{
openBrowser("https://www.mts.ru/");
}
private void button3_Click(object sender, EventArgs e)
{
openBrowser("https://www.beeline.ru/");
}
private void button4_Click(object sender, EventArgs e)
{
openBrowser("https://www.tele2.ru/");
}
private void button5_Click(object sender, EventArgs e)
{
openBrowser("https://www.tinkoff.ru/mobile-operator/");
}
}
}

View file

@ -68,5 +68,55 @@ namespace Tariffs.Properties {
return ResourceManager.GetString("helpAboutUsNotReady", resourceCulture);
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap logotip_beeline {
get {
object obj = ResourceManager.GetObject("logotip_beeline", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap logotip_megafon {
get {
object obj = ResourceManager.GetObject("logotip_megafon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap logotip_mts {
get {
object obj = ResourceManager.GetObject("logotip_mts", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap logotip_tele2 {
get {
object obj = ResourceManager.GetObject("logotip_tele2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Поиск локализованного ресурса типа System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap logotip_tinkoff_mobile {
get {
object obj = ResourceManager.GetObject("logotip_tinkoff_mobile", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View file

@ -121,4 +121,20 @@
<value>Справка "О нас" ещё не готова!</value>
<comment>Help "About Us" Is Not Ready Yet</comment>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="logotip_beeline" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logotip-beeline.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logotip_megafon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logotip-megafon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logotip_mts" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logotip-mts.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logotip_tele2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logotip-tele2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="logotip_tinkoff_mobile" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logotip-tinkoff_mobile_removedbg.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View file

@ -46,6 +46,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Browser.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Browser.Designer.cs">
<DependentUpon>Browser.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
@ -60,6 +66,9 @@
<DependentUpon>ProgramHelp.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Browser.resx">
<DependentUpon>Browser.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
@ -89,5 +98,20 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\logotip-beeline.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\logotip-megafon.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\logotip-mts.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\logotip-tele2.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\logotip-tinkoff_mobile_removedbg.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -28,3 +28,4 @@ C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.Proper
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
C:\Users\Acer\VisualStudio\source\repos\Tariffs\Tariffs\obj\Debug\Tariffs.Browser.resources

Binary file not shown.

Binary file not shown.