Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Poyasnyuvalna_zapiska_ВО.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
1.82 Mб
Скачать

Форма“Розпізнавач ip адрес та імені пк”

Группа 569

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

namespace WindowsFormsApplication1

{

public partial class Form3 : Form

{

public Form3()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{

string myHost = System.Net.Dns.GetHostName();

MessageBox.Show(myHost);

string myIP = System.Net.Dns.GetHostByName(myHost).AddressList[0].ToString();

MessageBox.Show(myIP);

}

private void Form3_Load(object sender, EventArgs e)

{

}

private void назадToolStripMenuItem1_Click(object sender, EventArgs e)

{

Close();

}

private void назадToolStripMenuItem_Click(object sender, EventArgs e)

{

Form12 hah = new Form12();

hah.Show();

}

}

}

Группа 569

Форма “перекладач назв фруктів”

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

namespace WindowsFormsApplication1

{

public partial class Form4 : Form

{

public Form4()

{

InitializeComponent();

}

private void groupBox1_Enter(object sender, EventArgs e)

{

}

private void button2_Click(object sender, EventArgs e)

{

if (textBox1.Text == "Apple")

textBox2.Text = "Яблуко";

else if (textBox1.Text == "Orange")

textBox2.Text = "Апельсин";

else if (textBox1.Text == "Banana")

textBox2.Text = "Банан";

else if (textBox1.Text == "Cherry")

textBox2.Text = "Вишня";

else if (textBox1.Text == "Mandarine")

textBox2.Text = "Мандарин";

else if (textBox1.Text == "Peach")

textBox2.Text = "Персик";

else if (textBox1.Text == "Nectarine")

textBox2.Text = "Нектарин";

else if (textBox1.Text == "Lemon")

textBox2.Text = "Лимон";

else if (textBox1.Text == "Melon")

textBox2.Text = "Кавун";

else if (textBox1.Text == "Strawberry")

textBox2.Text = "Полуниця";

else

MessageBox.Show("Ви не правильно ввели назву фрукту, або даного фрукту у словнику не має");

}

private void назадToolStripMenuItem_Click(object sender, EventArgs e)

{

Close();

}

private void button1_Click(object sender, EventArgs e)

{

if (textBox1.Text == "Яблуко")

textBox2.Text = "Apple";

else if (textBox1.Text == "Апельсин")

textBox2.Text = "Orange";

else if (textBox1.Text == "Банан")

textBox2.Text = "Banana";

else if (textBox1.Text == "Вишня")

textBox2.Text = "Cherry";

else if (textBox1.Text == "Мандарин")

textBox2.Text = "Mandarine";

else if (textBox1.Text == "Кавун")

textBox2.Text = "Melon";

else if (textBox1.Text == "Нектарин")

textBox2.Text = "Nectarine";

else if (textBox1.Text == "Лимон")

textBox2.Text = "Lemon";

else if (textBox1.Text == "Персик")

textBox2.Text = "Peach";

else if (textBox1.Text == "Полуниця")

textBox2.Text = "Strawberry";

else

MessageBox.Show("Ви не правильно ввели назву фрукту, або даного фрукту у словнику не має");

}

private void списокДоступнихСлівToolStripMenuItem_Click(object sender, EventArgs e)

{

Form7 ffshka = new Form7();

ffshka.Show();

}Группа 569

private void моніторингToolStripMenuItem_Click(object sender, EventArgs e)

{

Form13 fafa = new Form13();

fafa.Show();

}

private void Form4_Load(object sender, EventArgs e)

{

}

}

}

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]