Визуальное программирование в C#
скачать (14199 kb.)
Доступные файлы (200):
APM.csproj | |||
APM.csproj.user | |||
APM.exe | |||
APM.pdb | |||
APM.vshost.exe | |||
APM.vshost.exe.manifest | |||
APM.exe | |||
APM.pdb | |||
DataSet1.Designer.cs | |||
DataSet1.xsc | |||
DataSet1.xsd | |||
DataSet1.xss | |||
Form1.cs | |||
Form1.Designer.cs | |||
Form1.resx | |||
FormA.cs | |||
FormA.Designer.cs | |||
FormA.resx | |||
FormLunch.cs | |||
FormLunch.Designer.cs | |||
FormLunch.resx | |||
FormSatellite.cs | |||
FormSatellite.Designer.cs | |||
FormSatellite.resx | |||
FormType.cs | |||
FormType.Designer.cs | |||
FormType.resx | |||
APM.csproj.FileListAbsolute.txt | 1kb. | 30.05.2011 21:46 | ![]() |
APM.exe | |||
APM.Form1.resources | |||
APM.FormA.resources | |||
APM.FormLunch.resources | |||
APM.FormSatellite.resources | |||
APM.FormType.resources | |||
APM.pdb | |||
APM.Properties.Resources.resources | |||
DesignTimeResolveAssemblyReferences.cache | |||
DesignTimeResolveAssemblyReferencesInput.cache | |||
GenerateResource.read.1.tlog | |||
GenerateResource.write.1.tlog | |||
ResolveAssemblyReference.cache | |||
DataSet1.Designer.cs.dll | |||
APM.csproj.FileListAbsolute.txt | 1kb. | 17.03.2011 17:44 | ![]() |
APM.exe | |||
APM.Form1.resources | |||
APM.pdb | |||
APM.Properties.Resources.resources | |||
DesignTimeResolveAssemblyReferencesInput.cache | |||
GenerateResource.read.1.tlog | |||
GenerateResource.write.1.tlog | |||
DataSet1.Designer.cs.dll | |||
Program.cs | |||
AssemblyInfo.cs | |||
Resources.Designer.cs | |||
Resources.resx | |||
Settings.Designer.cs | |||
Settings.settings | |||
APM.sln | |||
APM.suo | |||
favicon.ico | |||
Programm1.exe | |||
Programm1.pdb | |||
Programm1.vshost.exe | |||
Programm1.vshost.exe.manifest | |||
Form2.cs | |||
Form2.Designer.cs | |||
Form3.cs | |||
Form3.Designer.cs | |||
Form3.resx | |||
DesignTimeResolveAssemblyReferences.cache | |||
DesignTimeResolveAssemblyReferencesInput.cache | |||
GenerateResource.read.1.tlog | |||
GenerateResource.write.1.tlog | |||
Programm1.csproj.FileListAbsolute.txt | 1kb. | 30.05.2011 21:21 | ![]() |
Programm1.exe | |||
Programm1.Form3.resources | |||
Programm1.pdb | |||
Programm1.Properties.Resources.resources | |||
Programm1.TestForm.resources | |||
ResolveAssemblyReference.cache | |||
Program.cs | |||
Programm1.csproj | |||
Programm1.csproj.user | |||
AssemblyInfo.cs | |||
Resources.Designer.cs | |||
Resources.resx | |||
Settings.Designer.cs | |||
Settings.settings | |||
TestForm.cs | |||
TestForm.Designer.cs | |||
TestForm.resx | |||
Programm1.sln | |||
Programm1.suo | |||
TestMenuToolboxStatus.exe | |||
TestMenuToolboxStatus.pdb | |||
TestMenuToolboxStatus.vshost.exe | |||
TestMenuToolboxStatus.vshost.exe.manifest | |||
Form1.cs | |||
Form1.Designer.cs | |||
Form1.resx | |||
DesignTimeResolveAssemblyReferences.cache | |||
DesignTimeResolveAssemblyReferencesInput.cache | |||
GenerateResource.read.1.tlog | |||
GenerateResource.write.1.tlog | |||
ResolveAssemblyReference.cache | |||
TestMenuToolboxStatus.csproj.FileListAbsolute.txt | 2kb. | 30.05.2011 21:40 | ![]() |
TestMenuToolboxStatus.exe | |||
TestMenuToolboxStatus.Form1.resources | |||
TestMenuToolboxStatus.pdb | |||
TestMenuToolboxStatus.Properties.Resources.resources | |||
Program.cs | |||
AssemblyInfo.cs | |||
Resources.Designer.cs | |||
Resources.resx | |||
Settings.Designer.cs | |||
Settings.settings | |||
TestMenuToolboxStatus.csproj | |||
TestMenuToolboxStatus.csproj.user | |||
TestMenuToolboxStatus.sln | |||
TestMenuToolboxStatus.suo | |||
DataSet.exe | |||
DataSet.pdb | |||
DataSet.vshost.exe | |||
DataSet.vshost.exe.manifest | |||
DataSet1.Designer.cs | |||
DataSet1.xsc | |||
DataSet1.xsd | |||
DataSet1.xss | |||
DataSet.csproj | |||
DataSet.csproj.user | |||
Form1.cs | |||
Form1.Designer.cs | |||
Form1.resx | |||
DataSet.csproj.FileListAbsolute.txt | 1kb. | 30.05.2011 21:43 | ![]() |
DataSet.exe | |||
DataSet.Form1.resources | |||
DataSet.pdb | |||
DataSet.Properties.Resources.resources | |||
DesignTimeResolveAssemblyReferences.cache | |||
DesignTimeResolveAssemblyReferencesInput.cache | |||
GenerateResource.read.1.tlog | |||
GenerateResource.write.1.tlog | |||
ResolveAssemblyReference.cache | |||
DataSet1.Designer.cs.dll | |||
Program.cs | |||
AssemblyInfo.cs | |||
Resources.Designer.cs | |||
Resources.resx | |||
Settings.Designer.cs | |||
Settings.settings | |||
DataSet.sln | |||
DataSet.suo | |||
favicon.ico | |||
WindowsFormsApplication1.exe | |||
WindowsFormsApplication1.pdb | |||
WindowsFormsApplication1.vshost.exe | |||
WindowsFormsApplication1.vshost.exe.manifest | |||
Form1.cs | |||
Form1.Designer.cs | |||
Form1.resx | |||
FormAbout.cs | |||
FormAbout.Designer.cs | |||
FormAbout.resx | |||
DesignTimeResolveAssemblyReferences.cache | |||
DesignTimeResolveAssemblyReferencesInput.cache | |||
GenerateResource.read.1.tlog | |||
GenerateResource.write.1.tlog | |||
ResolveAssemblyReference.cache | |||
WindowsFormsApplication1.csproj.FileListAbsolute.txt | 2kb. | 24.05.2011 13:14 | ![]() |
WindowsFormsApplication1.exe | |||
WindowsFormsApplication1.Form1.resources | |||
WindowsFormsApplication1.pdb | |||
WindowsFormsApplication1.Properties.Resources.resources | |||
Program.cs | |||
AssemblyInfo.cs | |||
Resources.Designer.cs | |||
Resources.resx | |||
Settings.Designer.cs | |||
Settings.settings | |||
WindowsFormsApplication1.csproj | |||
WindowsFormsApplication1.csproj.user | |||
WindowsFormsApplication1.sln | |||
WindowsFormsApplication1.suo | |||
LABS.docx | 416kb. | 03.06.2011 13:29 | ![]() |
IДЗ.doc | 319kb. | 29.11.2009 18:49 | ![]() |
lab_vp1.doc | 678kb. | 01.09.2009 00:07 | ![]() |
lab_vp1.ppt | 555kb. | 14.09.2009 12:40 | ![]() |
lab_vp2.doc | 660kb. | 03.11.2009 14:53 | ![]() |
lab_vp2.ppt | 442kb. | 05.10.2009 15:29 | ![]() |
lab_vp3_ADO_NET.SWF | |||
lab_vp3.doc | 407kb. | 05.10.2009 19:56 | ![]() |
lab_vp3.ppt | 567kb. | 15.10.2009 05:36 | ![]() |
lab_vp4.doc | 4521kb. | 29.11.2009 18:53 | ![]() |
lab_vp4.ppt | 619kb. | 05.10.2010 13:24 | ![]() |
lab_vp5.doc | 1790kb. | 29.11.2009 18:57 | ![]() |
lab_vp5.ppt | 929kb. | 29.11.2009 18:58 | ![]() |
lab_vp6.doc | 8695kb. | 29.11.2009 19:03 | ![]() |
lab_vp6.ppt | 738kb. | 29.11.2009 19:19 | ![]() |
lab_vp7.doc | 7926kb. | 29.11.2009 19:09 | ![]() |
lab_vp7.ppt | 2307kb. | 29.11.2009 19:08 | ![]() |
содержание
- Смотрите также:
- Визуальное моделирование сетей Петри [ документ ]
- Классы задач линейного, нелинейного и стохастического программирования. Вариант 3 [ лабораторная работа ]
- Параллельное программирование [ документ ]
- по технологии программирования [ документ ]
- Алгоритмизация и программирование [ документ ]
- экономико-математическое моделирование [ лекция ]
- Исследование операций. Курс лекций с примерами решения задач [ лекция ]
- Руководство - Программирование с помощью Step 7 V5.3 [ стандарт ]
- Визуальное моделировании в среде IBM Rational Rose 2003 [ лекция ]
- Ахметов И.Г. Программирование на Small Basic [ документ ]
- Немировский В.Б., Стоянов А.К. Программирование для инженеров [ документ ]
- Turbo Pascal [ документ ]
LABS.docx
Міністерство освіти і науки України
Національний технічний університет України
«Київський політехнічний інститут»
Факультет інформатики та обчислювальної техніки
Кафедра технічної кібернетики
Звіт до лабораторних робіт з дисципліни
«ТРПЗ. Візуальне програмування»
Виконав:
Студент ІІІ курсу
Гр. ЗІК-81
Деркач Є. М.
Викладач:
_______________________
Київ – 2011
Лабораторная работа №1. Введение в Windows Forms
Цель: овладеть возможностями использования инструментальных средств программной среды Microsoft Visual C# 2005 Express Edition для проектирования Windows приложений. Научиться создавать и работать с делегатами.
^
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 Programm1
{
public partial class TestForm : Form
{
public TestForm()
{
InitializeComponent();
// программное создание кнопки
Button myBtn = new Button();
myBtn.Text = "Вызов второй формы";
myBtn.Size = new Size(135, 23);
myBtn.Location = new Point(12, 238);
this.Controls.Add(myBtn);
myBtn.Click += new EventHandler(myBtn_Click);
// MDI
//сделаем текущую форму родительской
this.IsMdiContainer = true;
//создаем экземпляр дочерней формы
Form3 f = new Form3();
//передаем ссылку на дочернюю форму, которую показываем
this.ShowMdiChild(f);
}
private void ShowMdiChild(Form3 f)
{
//throw new NotImplementedException();
f.MdiParent = this;
f.Show();
}
void myBtn_Click(object sender, EventArgs e)
{
//throw new NotImplementedException();
textBox1.Text += "b.button1_Click \n";
Form2 f = new Form2();
f.StartPosition = FormStartPosition.CenterScreen;
f.ShowDialog();
}
private void TestForm_Load(object sender, EventArgs e)
{
textBox1.Text = "a.Form_Load \n";
}
private void TestForm_Activated(object sender, EventArgs e)
{
textBox1.Text +="d.Form_Аctivate \n";
}
private void TestForm_Deactivate(object sender, EventArgs e)
{
textBox1.Text +="c.Form_Deactivate \n";
}
}
}
Полученные результаты:
Лабораторная работа №2.
Обзор управляющих элементов и получение навыков работы с ними. Диалоговые окна. OpenFileDialog. SaveFileDialog. OpenFileDialog и SaveFileDialog для SDI-приложений. FontDialog. ColorDialog. Элемент управления NotifyIcon.
^ изучение класса Control, основных свойств и методов стандартных элементов управления, изучение класса CommonDialog.
Текст программы:
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 TestMenuToolboxStatus
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void моеДействиеToolStripMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show("Пункт меню");
}
private void cutToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.Cut();
}
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.Copy();
}
private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.Paste();
}
private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.SelectAll();
}
// в методичке ошибка - MouseEnter вместо MouseHover и нет .Text
private void моеДействиеToolStripMenuItem_MouseHover(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = "Мое действие";
}
private void моеДействиеToolStripMenuItem_MouseLeave(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = "";
}
private void выходToolStripMenuItem_MouseHover(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = "Выход";
}
private void выходToolStripMenuItem_MouseLeave(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = "";
}
private void button1_Click(object sender, EventArgs e)
{
comboBox1.Items.Add(textBox2.Text);
}
private void button2_Click(object sender, EventArgs e) // из комбо в лист
{
comboBox1.SelectAll(); // выбираем все в редактируемой области
string s = comboBox1.SelectedText; // берем выбранное
listBox1.Items.Add(s); // пхаем его в листбокс
int i = comboBox1.SelectedIndex; // смотрим, что у нас выбрано
if (i>-1) {comboBox1.Items.RemoveAt(comboBox1.SelectedIndex);} // если шось есть - удаляем его
//comboBox1.Select(0, 10); // можно взять кусок от редактируемой области
}
private void button3_Click(object sender, EventArgs e) // из лист в комбо
{
int i = listBox1.SelectedIndex; // смотрим, что у нас выбрано
if (i > -1) { // если шось есть
string s = (listBox1.SelectedItem.ToString()); // берем выбранную позицию и преобразуем в строку
comboBox1.Items.Add(s); // добавляем в комбо
listBox1.Items.RemoveAt(i); // удаляем из лист
}
}
private void openToolStripButton_Click(object sender, EventArgs e)
{
OpenFileDialog fd = new OpenFileDialog();
fd.Filter = "Text format (*.txt)|*.txt|Rich Text (*.rtf)|*.rtf";
if (fd.ShowDialog() == DialogResult.OK)
{
// если выбрали текст
if (fd.FilterIndex == 1)
richTextBox1.LoadFile(fd.FileName, RichTextBoxStreamType.PlainText);
else
richTextBox1.LoadFile(fd.FileName, RichTextBoxStreamType.RichText);
}
}
private void saveToolStripButton_Click(object sender, EventArgs e)
{
SaveFileDialog fd = new SaveFileDialog();
fd.Filter = "Text format (*.txt)|*.txt|Rich Text (*.rtf)|*.rtf";
if (fd.ShowDialog() == DialogResult.OK)
{
// если выбрали текст
if (fd.FilterIndex == 1)
richTextBox1.SaveFile(fd.FileName, RichTextBoxStreamType.PlainText);
else
richTextBox1.SaveFile(fd.FileName, RichTextBoxStreamType.RichText);
}
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
ColorDialog d = new ColorDialog();
if (d.ShowDialog() == DialogResult.OK)
{
richTextBox1.SelectionColor = d.Color;
}
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
FontDialog d = new FontDialog();
if (d.ShowDialog() == DialogResult.OK)
{
richTextBox1.SelectionFont = d.Font;
}
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (MessageBox.Show("Вы уверены ?", "Вопрос",
MessageBoxButtons.YesNo
, MessageBoxIcon.Question
, MessageBoxDefaultButton.Button2
)
!= DialogResult.Yes
)
{
e.Cancel = true;
}
}
}
}
Полученные результаты:
Лабораторная работа №3.
Класс DataSet. Таблицы и поля (объекты DataTable и DataColumn). Объекты DataRelation. Строки (объект DataRow). Схемы XML. Работа с XML.
Цель: изучение правил работы с набором классов, которые представляют разъединенную среду, научиться создавать XML-файлы и считывать с них данные и схему.
^
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 DataSet
{
public partial class Form1 : Form
{
//создание таблицы тут для видимости
DataTable t = new DataTable();
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e) // кнопка создать таблицу
{
//создание полей (колонок) с помощью конструктора
DataColumn dc = new DataColumn("teacher_id", System.Type.GetType("System.Int32"));
DataColumn dc1 = new DataColumn("name", System.Type.GetType("System.String"));
//добавление этих полей в таблицу
t.Columns.Add(dc);
t.Columns.Add(dc1);
DataRow dr = t.NewRow(); // получение прототипа строки
// задание первой строки
//dr = t.NewRow();
dr["teacher_id"] = 1;
dr["name"] = "Петр Петрович";
t.Rows.Add(dr);
// второй
dr = t.NewRow();
dr["teacher_id"] = 2;
dr["name"] = "Иван Иваныч";
t.Rows.Add(dr);
dataGridView1.DataSource = t; // отображение таблицы в dataGridView
MyData md = new MyData();
dataGridView2.DataSource = md;
dataGridView2.DataMember = "Order";
dataGridView3.DataSource = md;
dataGridView3.DataMember = "OrderLines";
}
private void button2_Click(object sender, EventArgs e) // кнопка значение ячейки
{
int r = dataGridView1.CurrentCell.RowIndex; // текущий ряд
int c = dataGridView1.CurrentCell.ColumnIndex; // текущая ячейка
MessageBox.Show(t.Rows[r][c].ToString()); // получаем и показываем, что выбрали
}
private void button3_Click(object sender, EventArgs e) // кнопка фильтр
{
//DataView dv = t.DefaultView; // создаем новый DataView
DataView dv = new DataView(t); // или так - создаем новый DataView
dataGridView1.DataSource = dv; // подключаем наш DataView на просмотр
string s = textBox1.Text; // берем текст из текстбокс
//dv.RowFilter = "name='Петр Петрович'"; // фильтруем, то что видим
dv.RowFilter = s; // фильтруем, то что видим
}
private void button4_Click(object sender, EventArgs e) // кнопка сортировка
{
DataView dv = new DataView(t); // создаем новый DataView
dataGridView1.DataSource = dv; // подключаем наш DataView на просмотр
string s = textBox2.Text; // берем текст из текстбокс
dv.Sort = s; // фильтруем
}
}
}
Полученные результаты:
Лабораторна робота №4. Основні правила проектування форм.
Ціль: вивчення задач проектування інтерфейсів, правил щодо проектування форм.
Полученные результаты:
Лабораторна робота №5. Основні правила проектування полів вибору, полів введення. Поняття повідомлень, використання, проектування.
^ вивчення правил проектування полів вибору, полів введення, повідомлень додатку.
Полученные результаты:
Лабораторна робота №6. Основні правила проектування меню дій, спадаючого меню, спливаючого меню, області функціональних клавіш. Типи дій під час проектування діалогу.
^ вивчення правил проектування меню дій, спадаючого меню, області функціональних клавіш, діалогу.
Полученные результаты:
Индивидуальное задание. Проектування і створення бази даних додатка.
Текст программы:
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 APM
{
partial class FormType
{
/// <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(FormType));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Location = new System.Drawing.Point(14, 41);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(214, 121);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Основное";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(14, 60);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(86, 13);
this.label3.TabIndex = 3;
this.label3.Text = "Производитель";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 28);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Название";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(106, 53);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(94, 20);
this.textBox2.TabIndex = 1;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(106, 19);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(94, 20);
this.textBox1.TabIndex = 0;
this.textBox1.Tag = "";
//this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.textBox5);
this.groupBox2.Controls.Add(this.textBox4);
this.groupBox2.Controls.Add(this.textBox3);
this.groupBox2.Location = new System.Drawing.Point(234, 41);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(168, 121);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Дополнительно";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(14, 94);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(81, 13);
this.label6.TabIndex = 5;
this.label6.Text = "Срок гарантии";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(14, 60);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(33, 13);
this.label5.TabIndex = 4;
this.label5.Text = "Цена";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(14, 26);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(26, 13);
this.label4.TabIndex = 3;
this.label4.Text = "Вес";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(103, 87);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(50, 20);
this.textBox5.TabIndex = 2;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(104, 53);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(50, 20);
this.textBox4.TabIndex = 1;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(104, 19);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(50, 20);
this.textBox3.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.label1.Location = new System.Drawing.Point(14, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(147, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Добавить тип спутника";
//
// button1
//
this.button1.Location = new System.Drawing.Point(14, 174);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 3;
this.button1.Text = "Добавить";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(104, 174);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 4;
this.button2.Text = "Отмена";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// FormType
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(414, 214);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FormType";
this.Text = "Тип спутника";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox3;
}
}
namespace APM
{
partial class FormLunch
{
/// <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);
}
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
}
}
namespace APM
{
public partial class FormSatellite : Form
{
public FormSatellite()
{
InitializeComponent();
}
public Int32 c = 1;
//private void label6_Click(object sender, EventArgs e)
//{
//}
private void button1_Click(object sender, EventArgs e)
{
string s = "";
comboBox2.SelectAll(); // дата
s = comboBox2.SelectedText + "/";
comboBox3.SelectAll(); // месяц
s = s + comboBox3.SelectedText + "/";
comboBox1.SelectAll(); // год
s = s + comboBox1.SelectedText + " 0:00:00 AM"; // берем выбранное
((Form1)Application.OpenForms["Form1"]).Date = s; // "5/1/2008 0:00:00 AM";
((Form1)Application.OpenForms["Form1"]).SatelliteCode = textBox1.Text;
((Form1)Application.OpenForms["Form1"]).TypeCode = textBox2.Text;
((Form1)Application.OpenForms["Form1"]).SaveTime = c;
((Form1)Application.OpenForms["Form1"]).OK = 1;
Close();
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
c = 1;
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
c = 2;
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
c = 3;
}
}
}
^
Скачать файл (14199 kb.)