Система самообслуговування закладів громадського харчування

Проектування автоматизованої системи вибору та замовлення страви користувачем. Надання інформації на сервер кухаря, для приготування. Аналіз структури бази даних. Розробка програмного забезпечення. Розрахунок трудомісткості, кошторису та собівартості.

Рубрика Программирование, компьютеры и кибернетика
Вид дипломная работа
Язык украинский
Дата добавления 30.05.2015
Размер файла 5,9 M

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

this.label3 = new System.Windows.Forms.Label();

this.buttonContinue = new System.Windows.Forms.Button();

this.labelRest = new System.Windows.Forms.Label();

this.timer = new System.Windows.Forms.Timer(this.components);

this.statusStrip1 = new System.Windows.Forms.StatusStrip();

this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();

this.progressBarClose = new System.Windows.Forms.ToolStripProgressBar();

this.statusStrip1.SuspendLayout();

this.SuspendLayout();

//

// label1

//

this.label1.AutoSize = true;

this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.label1.Location = new System.Drawing.Point(12, 21);

this.label1.Name = "label1";

this.label1.Size = new System.Drawing.Size(554, 46);

this.label1.TabIndex = 0;

this.label1.Text = "Вашезамволенняприйняте.";

//

// label3

//

this.label3.AutoSize = true;

this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.label3.Location = new System.Drawing.Point(134, 149);

this.label3.Name = "label3";

this.label3.Size = new System.Drawing.Size(281, 31);

this.label3.TabIndex = 2;

this.label3.Text = "Приємногоапетиту!!!";

//

// buttonContinue

//

this.buttonContinue.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.buttonContinue.Location = new System.Drawing.Point(457, 165);

this.buttonContinue.Name = "buttonContinue";

this.buttonContinue.Size = new System.Drawing.Size(98, 29);

this.buttonContinue.TabIndex = 3;

this.buttonContinue.Text = "Продовжити";

this.buttonContinue.UseVisualStyleBackColor = true;

//

// labelRest

//

this.labelRest.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.labelRest.Location = new System.Drawing.Point(20, 74);

this.labelRest.Name = "labelRest";

this.labelRest.Size = new System.Drawing.Size(535, 42);

this.labelRest.TabIndex = 4;

this.labelRest.Text = "------------";

this.labelRest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

//

// timer

//

this.timer.Interval = 1000;

this.timer.Tick += new System.EventHandler(this.timer_Tick);

//

// statusStrip1

//

this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {

this.toolStripStatusLabel1,

this.progressBarClose});

this.statusStrip1.Location = new System.Drawing.Point(0, 201);

this.statusStrip1.Name = "statusStrip1";

this.statusStrip1.Size = new System.Drawing.Size(567, 22);

this.statusStrip1.TabIndex = 5;

this.statusStrip1.Text = "statusStrip1";

//

// toolStripStatusLabel1

//

this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";

this.toolStripStatusLabel1.Size = new System.Drawing.Size(121, 17);

this.toolStripStatusLabel1.Text = "Процесавтозакриття:";

//

// progressBarClose

//

this.progressBarClose.Maximum = 20;

this.progressBarClose.Name = "progressBarClose";

this.progressBarClose.Size = new System.Drawing.Size(100, 16);

this.progressBarClose.Step = 1;

//

// ResaltForm

//

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.BackColor = System.Drawing.Color.Snow;

this.ClientSize = new System.Drawing.Size(567, 223);

this.ControlBox = false;

this.Controls.Add(this.statusStrip1);

this.Controls.Add(this.labelRest);

this.Controls.Add(this.buttonContinue);

this.Controls.Add(this.label3);

this.Controls.Add(this.label1);

this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

this.Name = "ResaltForm";

this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

this.Text = "ResaltForm";

this.TopMost = true;

this.statusStrip1.ResumeLayout(false);

this.statusStrip1.PerformLayout();

this.ResumeLayout(false);

this.PerformLayout();

}

#endregion

private System.Windows.Forms.Label label1;

private System.Windows.Forms.Label label3;

public System.Windows.Forms.Button buttonContinue;

private System.Windows.Forms.Label labelRest;

private System.Windows.Forms.StatusStrip statusStrip1;

private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;

private System.Windows.Forms.ToolStripProgressBar progressBarClose;

public System.Windows.Forms.Timer timer;

}

}

1.3 Елементи керування

namespace FastOrder

{

partialclassCategoryItem

{

private System.ComponentModel.IContainer components = null;

protectedoverridevoid Dispose(bool disposing)

{

if (disposing && (components != null))

{

components.Dispose();

}

base.Dispose(disposing);

}

#region

privatevoid InitializeComponent()

{

this.nameLabel = new System.Windows.Forms.Label();

this.picture = new System.Windows.Forms.PictureBox();

((System.ComponentModel.ISupportInitialize)(this.picture)).BeginInit();

this.SuspendLayout();

//

// nameLabel

//

this.nameLabel.Dock = System.Windows.Forms.DockStyle.Bottom;

this.nameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.nameLabel.Location = new System.Drawing.Point(0, 128);

this.nameLabel.Name = "nameLabel";

this.nameLabel.Size = new System.Drawing.Size(148, 20);

this.nameLabel.TabIndex = 0;

this.nameLabel.Text = "name";

this.nameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

//

// picture

//

this.picture.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;

this.picture.Dock = System.Windows.Forms.DockStyle.Fill;

this.picture.Location = new System.Drawing.Point(0, 0);

this.picture.Name = "picture";

this.picture.Size = new System.Drawing.Size(148, 128);

this.picture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;

this.picture.TabIndex = 1;

this.picture.TabStop = false;

//

// CategoryItem

//

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

this.Controls.Add(this.picture);

this.Controls.Add(this.nameLabel);

this.Name = "CategoryItem";

this.Size = new System.Drawing.Size(148, 148);

((System.ComponentModel.ISupportInitialize)(this.picture)).EndInit();

this.ResumeLayout(false);

}

#endregion

public System.Windows.Forms.Label nameLabel;

public System.Windows.Forms.PictureBox picture;

}

}

namespace FastOrder

{

partialclassOrderItem

{

private System.ComponentModel.IContainer components = null;

protectedoverridevoid Dispose(bool disposing)

{

if (disposing && (components != null))

{

components.Dispose();

}

base.Dispose(disposing);

}

#region

privatevoid InitializeComponent()

{

this.picture = new System.Windows.Forms.PictureBox();

this.nameLabel = new System.Windows.Forms.Label();

this.panel1 = new System.Windows.Forms.Panel();

this.buttonDelete = new System.Windows.Forms.Button();

this.panel2 = new System.Windows.Forms.Panel();

this.buttonMinus = new System.Windows.Forms.Button();

this.buttonPlus = new System.Windows.Forms.Button();

this.countLabel = new System.Windows.Forms.Label();

this.label2 = new System.Windows.Forms.Label();

this.priceLabel = new System.Windows.Forms.Label();

this.label1 = new System.Windows.Forms.Label();

this.textBoxDes = new System.Windows.Forms.TextBox();

((System.ComponentModel.ISupportInitialize)(this.picture)).BeginInit();

this.panel1.SuspendLayout();

this.panel2.SuspendLayout();

this.SuspendLayout();

//

// picture

//

this.picture.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;

this.picture.Dock = System.Windows.Forms.DockStyle.Left;

this.picture.Location = new System.Drawing.Point(0, 0);

this.picture.Name = "picture";

this.picture.Size = new System.Drawing.Size(112, 112);

this.picture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;

this.picture.TabIndex = 3;

this.picture.TabStop = false;

//

// nameLabel

//

this.nameLabel.Dock = System.Windows.Forms.DockStyle.Top;

this.nameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.nameLabel.Location = new System.Drawing.Point(0, 0);

this.nameLabel.Name = "nameLabel";

this.nameLabel.Size = new System.Drawing.Size(305, 31);

this.nameLabel.TabIndex = 2;

this.nameLabel.Text = "name";

this.nameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

//

// panel1

//

this.panel1.Controls.Add(this.buttonDelete);

this.panel1.Controls.Add(this.panel2);

this.panel1.Controls.Add(this.textBoxDes);

this.panel1.Controls.Add(this.nameLabel);

this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;

this.panel1.Location = new System.Drawing.Point(112, 0);

this.panel1.Name = "panel1";

this.panel1.Size = new System.Drawing.Size(305, 112);

this.panel1.TabIndex = 4;

//

// buttonDelete

//

this.buttonDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));

this.buttonDelete.Location = new System.Drawing.Point(275, 0);

this.buttonDelete.Name = "buttonDelete";

this.buttonDelete.Size = new System.Drawing.Size(30, 30);

this.buttonDelete.TabIndex = 9;

this.buttonDelete.Text = "X";

this.buttonDelete.UseVisualStyleBackColor = true;

this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click);

//

// panel2

//

this.panel2.Controls.Add(this.buttonMinus);

this.panel2.Controls.Add(this.buttonPlus);

this.panel2.Controls.Add(this.countLabel);

this.panel2.Controls.Add(this.label2);

this.panel2.Controls.Add(this.priceLabel);

this.panel2.Controls.Add(this.label1);

this.panel2.Dock = System.Windows.Forms.DockStyle.Right;

this.panel2.Location = new System.Drawing.Point(183, 31);

this.panel2.Name = "panel2";

this.panel2.Size = new System.Drawing.Size(122, 81);

this.panel2.TabIndex = 5;

//

// buttonMinus

//

this.buttonMinus.Location = new System.Drawing.Point(31, 45);

this.buttonMinus.Name = "buttonMinus";

this.buttonMinus.Size = new System.Drawing.Size(30, 30);

this.buttonMinus.TabIndex = 9;

this.buttonMinus.Text = "-";

this.buttonMinus.UseVisualStyleBackColor = true;

this.buttonMinus.Click += new System.EventHandler(this.buttonMinus_Click);

//

// buttonPlus

//

this.buttonPlus.Location = new System.Drawing.Point(62, 45);

this.buttonPlus.Name = "buttonPlus";

this.buttonPlus.Size = new System.Drawing.Size(30, 30);

this.buttonPlus.TabIndex = 8;

this.buttonPlus.Text = "+";

this.buttonPlus.UseVisualStyleBackColor = true;

this.buttonPlus.Click += new System.EventHandler(this.buttonPlus_Click);

//

// countLabel

//

this.countLabel.AutoSize = true;

this.countLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.countLabel.Location = new System.Drawing.Point(71, 24);

this.countLabel.Name = "countLabel";

this.countLabel.Size = new System.Drawing.Size(48, 17);

this.countLabel.TabIndex = 7;

this.countLabel.Text = "count";

//

// label2

//

this.label2.AutoSize = true;

this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.label2.Location = new System.Drawing.Point(3, 23);

this.label2.Name = "label2";

this.label2.Size = new System.Drawing.Size(70, 17);

this.label2.TabIndex = 6;

this.label2.Text = "Кількість:";

//

// priceLabel

//

this.priceLabel.AutoSize = true;

this.priceLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.priceLabel.Location = new System.Drawing.Point(44, 3);

this.priceLabel.Name = "priceLabel";

this.priceLabel.Size = new System.Drawing.Size(44, 17);

this.priceLabel.TabIndex = 5;

this.priceLabel.Text = "price";

//

// label1

//

this.label1.AutoSize = true;

this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.label1.Location = new System.Drawing.Point(3, 3);

this.label1.Name = "label1";

this.label1.Size = new System.Drawing.Size(42, 17);

this.label1.TabIndex = 4;

this.label1.Text = "Ціна:";

//

// textBoxDes

//

this.textBoxDes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)

| System.Windows.Forms.AnchorStyles.Left)

| System.Windows.Forms.AnchorStyles.Right)));

this.textBoxDes.BackColor = System.Drawing.SystemColors.GradientActiveCaption;

this.textBoxDes.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

this.textBoxDes.Location = new System.Drawing.Point(1, 30);

this.textBoxDes.Multiline = true;

this.textBoxDes.Name = "textBoxDes";

this.textBoxDes.ReadOnly = true;

this.textBoxDes.Size = new System.Drawing.Size(182, 82);

this.textBoxDes.TabIndex = 3;

//

// OrderItem

//

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;

this.Controls.Add(this.panel1);

this.Controls.Add(this.picture);

this.Name = "OrderItem";

this.Size = new System.Drawing.Size(417, 112);

((System.ComponentModel.ISupportInitialize)(this.picture)).EndInit();

this.panel1.ResumeLayout(false);

this.panel1.PerformLayout();

this.panel2.ResumeLayout(false);

this.panel2.PerformLayout();

this.ResumeLayout(false);

}

#endregion

public System.Windows.Forms.PictureBox picture;

public System.Windows.Forms.Label nameLabel;

private System.Windows.Forms.Panel panel1;

private System.Windows.Forms.TextBox textBoxDes;

private System.Windows.Forms.Panel panel2;

private System.Windows.Forms.Label label1;

private System.Windows.Forms.Button buttonMinus;

private System.Windows.Forms.Button buttonPlus;

private System.Windows.Forms.Label countLabel;

private System.Windows.Forms.Label label2;

private System.Windows.Forms.Button buttonDelete;

public System.Windows.Forms.Label priceLabel;

}

}

namespace FastOrder

{

partialclassStravuItem

{

private System.ComponentModel.IContainer components = null;

protectedoverridevoid Dispose(bool disposing)

{

if (disposing && (components != null))

{

components.Dispose();

}

base.Dispose(disposing);

}

#region

privatevoid InitializeComponent()

{

this.picture = new System.Windows.Forms.PictureBox();

this.nameLabel = new System.Windows.Forms.Label();

((System.ComponentModel.ISupportInitialize)(this.picture)).BeginInit();

this.SuspendLayout();

//

// picture

//

this.picture.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;

this.picture.Dock = System.Windows.Forms.DockStyle.Fill;

this.picture.Location = new System.Drawing.Point(0, 0);

this.picture.Name = "picture";

this.picture.Size = new System.Drawing.Size(150, 130);

this.picture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;

this.picture.TabIndex = 3;

this.picture.TabStop = false;

//

// nameLabel

//

this.nameLabel.Dock = System.Windows.Forms.DockStyle.Bottom;

this.nameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.nameLabel.Location = new System.Drawing.Point(0, 130);

this.nameLabel.Name = "nameLabel";

this.nameLabel.Size = new System.Drawing.Size(150, 20);

this.nameLabel.TabIndex = 2;

this.nameLabel.Text = "name";

this.nameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

//

// StravuItem

//

this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.Controls.Add(this.picture);

this.Controls.Add(this.nameLabel);

this.Name = "StravuItem";

((System.ComponentModel.ISupportInitialize)(this.picture)).EndInit();

this.ResumeLayout(false);

}

#endregion

public System.Windows.Forms.PictureBox picture;

public System.Windows.Forms.Label nameLabel;

}

}

1.4 Зв'язок з сервером

#region using

using System;

using System.IO;

using System.Text;

using System.Net;

using System.Net.Sockets;

#endregion

namespace FastOrder

{

classNetworkConnection

{

#region Fields

TcpClient client;

Stream stream;

UTF8Encoding asen;

#endregion

public NetworkConnection()

{

client = newTcpClient();

asen = newUTF8Encoding();

}

#region Fields

publicvoid connect(String ip, int port)

{

client.Connect(ip, port);

stream = client.GetStream();

}

publicvoid close()

{

client.Close();

}

#endregion

#region Send

publicString read()

{

byte[] bb = newbyte[1000];

int k = stream.Read(bb, 0, 1000);

return asen.GetString(bb, 0, k);

}

publicvoid write(String str)

{

byte[] ba = asen.GetBytes(str);

stream.Write(ba, 0, ba.Length);

}

#endregion

}

}

2 Cервердля кухарів

2.1 Головна форма

namespace Server

{

partialclassMainForm

{

private System.ComponentModel.IContainer components = null;

protectedoverridevoid Dispose(bool disposing)

{

if (disposing && (components != null))

{

components.Dispose();

}

base.Dispose(disposing);

}

#region

privatevoid InitializeComponent()

{

this.boxSettings = new System.Windows.Forms.GroupBox();

this.label2 = new System.Windows.Forms.Label();

this.textBoxIp = new System.Windows.Forms.TextBox();

this.textBoxPort = new System.Windows.Forms.TextBox();

this.buttonSHSet = new System.Windows.Forms.Button();

this.label1 = new System.Windows.Forms.Label();

this.flowOrders = new System.Windows.Forms.FlowLayoutPanel();

this.backCheckData = new System.ComponentModel.BackgroundWorker();

this.label3 = new System.Windows.Forms.Label();

this.boxSettings.SuspendLayout();

this.SuspendLayout();

//

// boxSettings

//

this.boxSettings.Controls.Add(this.label3);

this.boxSettings.Controls.Add(this.label2);

this.boxSettings.Controls.Add(this.textBoxIp);

this.boxSettings.Controls.Add(this.textBoxPort);

this.boxSettings.Controls.Add(this.buttonSHSet);

this.boxSettings.Dock = System.Windows.Forms.DockStyle.Right;

this.boxSettings.Location = new System.Drawing.Point(647, 0);

this.boxSettings.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.boxSettings.Name = "boxSettings";

this.boxSettings.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.boxSettings.RightToLeft = System.Windows.Forms.RightToLeft.No;

this.boxSettings.Size = new System.Drawing.Size(155, 393);

this.boxSettings.TabIndex = 0;

this.boxSettings.TabStop = false;

this.boxSettings.Text = "Інфо";

//

// label2

//

this.label2.AutoSize = true;

this.label2.Location = new System.Drawing.Point(43, 33);

this.label2.Name = "label2";

this.label2.Size = new System.Drawing.Size(87, 20);

this.label2.TabIndex = 4;

this.label2.Text = "IP адреса:";

this.label2.Click += new System.EventHandler(this.label2_Click);

//

// textBoxIp

//

this.textBoxIp.Location = new System.Drawing.Point(43, 56);

this.textBoxIp.Name = "textBoxIp";

this.textBoxIp.ReadOnly = true;

this.textBoxIp.Size = new System.Drawing.Size(100, 26);

this.textBoxIp.TabIndex = 3;

//

// textBoxPort

//

this.textBoxPort.Location = new System.Drawing.Point(43, 116);

this.textBoxPort.Name = "textBoxPort";

this.textBoxPort.ReadOnly = true;

this.textBoxPort.Size = new System.Drawing.Size(60, 26);

this.textBoxPort.TabIndex = 2;

//

// buttonSHSet

//

this.buttonSHSet.Dock = System.Windows.Forms.DockStyle.Left;

this.buttonSHSet.Location = new System.Drawing.Point(4, 24);

this.buttonSHSet.Name = "buttonSHSet";

this.buttonSHSet.Size = new System.Drawing.Size(18, 364);

this.buttonSHSet.TabIndex = 1;

this.buttonSHSet.Text = "<>";

this.buttonSHSet.UseVisualStyleBackColor = true;

this.buttonSHSet.Click += new System.EventHandler(this.buttonSHSet_Click);

//

// label1

//

this.label1.AutoSize = true;

this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.label1.Location = new System.Drawing.Point(12, 9);

this.label1.Name = "label1";

this.label1.Size = new System.Drawing.Size(135, 25);

this.label1.TabIndex = 1;

this.label1.Text = "Замовлення:";

//

// flowOrders

//

this.flowOrders.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)

| System.Windows.Forms.AnchorStyles.Left)

| System.Windows.Forms.AnchorStyles.Right)));

this.flowOrders.AutoScroll = true;

this.flowOrders.Location = new System.Drawing.Point(12, 37);

this.flowOrders.Name = "flowOrders";

this.flowOrders.Size = new System.Drawing.Size(620, 332);

this.flowOrders.TabIndex = 2;

//

// backCheckData

//

this.backCheckData.WorkerSupportsCancellation = true;

this.backCheckData.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backCheckData_DoWork);

//

// label3

//

this.label3.AutoSize = true;

this.label3.Location = new System.Drawing.Point(43, 93);

this.label3.Name = "label3";

this.label3.Size = new System.Drawing.Size(52, 20);

this.label3.TabIndex = 5;

this.label3.Text = "Порт:";

//

// MainForm

//

this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.ClientSize = new System.Drawing.Size(802, 393);

this.Controls.Add(this.flowOrders);

this.Controls.Add(this.label1);

this.Controls.Add(this.boxSettings);

this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.MinimumSize = new System.Drawing.Size(810, 420);

this.Name = "MainForm";

this.Text = "Сервердлякухарів";

this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);

this.boxSettings.ResumeLayout(false);

this.boxSettings.PerformLayout();

this.ResumeLayout(false);

this.PerformLayout();

}

#endregion

private System.Windows.Forms.GroupBox boxSettings;

private System.Windows.Forms.Button buttonSHSet;

private System.Windows.Forms.Label label1;

private System.Windows.Forms.FlowLayoutPanel flowOrders;

private System.ComponentModel.BackgroundWorker backCheckData;

private System.Windows.Forms.TextBox textBoxIp;

private System.Windows.Forms.TextBox textBoxPort;

private System.Windows.Forms.Label label2;

private System.Windows.Forms.Label label3;

}

}

2.2 Елементи керування

namespace Server

{

partialclassOrderItem

{

private System.ComponentModel.IContainer components = null;

protectedoverridevoid Dispose(bool disposing)

{

if (disposing && (components != null))

{

components.Dispose();

}

base.Dispose(disposing);

}

#region Код, автоматически созданный конструктором компонентов

privatevoid InitializeComponent()

{

this.buttonFinish = new System.Windows.Forms.Button();

this.labelName = new System.Windows.Forms.Label();

this.textInfo = new System.Windows.Forms.TextBox();

this.SuspendLayout();

//

// buttonFinish

//

this.buttonFinish.Dock = System.Windows.Forms.DockStyle.Bottom;

this.buttonFinish.Location = new System.Drawing.Point(0, 117);

this.buttonFinish.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);

this.buttonFinish.Name = "buttonFinish";

this.buttonFinish.Size = new System.Drawing.Size(568, 31);

this.buttonFinish.TabIndex = 0;

this.buttonFinish.Text = "Виконано";

this.buttonFinish.UseVisualStyleBackColor = true;

this.buttonFinish.Click += new System.EventHandler(this.buttonFinish_Click);

//

// labelName

//

this.labelName.Dock = System.Windows.Forms.DockStyle.Top;

this.labelName.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.labelName.Location = new System.Drawing.Point(0, 0);

this.labelName.Name = "labelName";

this.labelName.Size = new System.Drawing.Size(568, 28);

this.labelName.TabIndex = 1;

this.labelName.Text = "name";

this.labelName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;

//

// textInfo

//

this.textInfo.Dock = System.Windows.Forms.DockStyle.Fill;

this.textInfo.Location = new System.Drawing.Point(0, 28);

this.textInfo.Multiline = true;

this.textInfo.Name = "textInfo";

this.textInfo.Size = new System.Drawing.Size(568, 89);

this.textInfo.TabIndex = 2;

//

// OrderItem

//

this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);

this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;

this.Controls.Add(this.textInfo);

this.Controls.Add(this.labelName);

this.Controls.Add(this.buttonFinish);

this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));

this.Margin = new System.Windows.Forms.Padding(4, 15, 4, 15);

this.Name = "OrderItem";

this.Size = new System.Drawing.Size(568, 148);

this.ResumeLayout(false);

this.PerformLayout();

}

#endregion

private System.Windows.Forms.Button buttonFinish;

private System.Windows.Forms.Label labelName;

private System.Windows.Forms.TextBox textInfo;

}

}

2.3 Взаємодія з клієнтами

#region using

using System;

using System.Text;

using System.Net;

using System.Net.Sockets;

#endregion

namespace Server

{

classNetworkLisener

{

#region Fields

IPAddress ip;

TcpListener lisener;

Socket socket;

UTF8Encoding asen;

publicTcpListener Lisener { get { return lisener; } }

publicSocket Socket { get { return socket; } }

#endregion

public NetworkLisener(String _ip, int port)

{

ip = IPAddress.Parse(_ip);

lisener = newTcpListener(ip, port);

lisener.Start();

asen = newUTF8Encoding();

}

#region Launch

publicvoid waitToConnect()

{

socket = lisener.AcceptSocket();

}

publicvoid stop()

{

if (null != socket) socket.Close();

if (null != lisener) lisener.Stop();

}

#endregion

#region Send

publicString read()

{

byte[] b = newbyte[1000];

int k = socket.Receive(b);

return asen.GetString(b, 0, k);

}

publicvoid write(String str)

{

socket.Send(asen.GetBytes(str));

}

#endregion

}

}

2.4 Логування

#region using

using System;

using System.Text;

using System.IO;

using System.Globalization;

#endregion

namespace Server

{

structInformationProgram

{

publiclong durationSense;

publicint countSessions;

publicint countEmergencySessions;

publiclong totalDuration;

}

staticclassLogging

{

#region Fields

staticString PATH = "log.txt";

staticString ENTER = "\r\n";

staticEncoding encoding = Encoding.UTF8;

staticCultureInfo provider = CultureInfo.InvariantCulture;

staticstring format = "dd.MM.yyyy HH:mm:ss:ffffff";

staticInformationProgram ip = newInformationProgram();

staticString prefix;

#endregion

#region Methods

publicstaticString getTime()

{

returnDateTime.Now.ToString(format);

}

publicstaticlong getTicks(string datatime)

{

returnDateTime.ParseExact(datatime, format, provider).Ticks;

}

publicstaticbool open()

{

if (!File.Exists(PATH)) returnfalse;

var file = new System.Diagnostics.Process();

file.StartInfo.FileName = PATH;

file.StartInfo.UseShellExecute = true;

return file.Start();

}

publicstaticvoid clear()

{

File.Delete(PATH);

written("start", "Стартпрограми.");

}

#endregion

#region Action Operations

publicstaticvoid written(String code, String text)

{

prefix = "[" + getTime() + "] [" + code + "] ";

File.AppendAllText(PATH, prefix + text + ENTER, encoding);

}

staticInformationProgram counting(string[] lines)

{

InformationProgram tmp = newInformationProgram();

bool isFirst = true, isError = false;

for (int i = lines.Length - 1; i >= 0; i--)

{

if (lines[i] == "") continue;

string[] inf = lines[i].Split(' ');

string datatime = inf[0].TrimStart('[') + " " + inf[1].TrimEnd(']');

if (inf[2].Equals("[action]") && isFirst)

{

tmp.durationSense = getTicks(datatime);

isFirst = false;

isError = true;

}

switch (inf[2])

{

case"[information]":

{

tmp.countSessions = Convert.ToInt32(inf[4].TrimEnd(',')) + 1;

tmp.totalDuration = Convert.ToInt32(inf[10].TrimEnd(',')) + tmp.durationSense; автоматизований система замовлення приготування

tmp.countEmergencySessions = Convert.ToInt32(inf[7].TrimEnd(','));

if (isError) tmp.countEmergencySessions++;

return tmp;

}

case"[end]":

{

tmp.durationSense = getTicks(datatime);

isFirst = false;

} break;

case"[start]":

{

tmp.durationSense = (tmp.durationSense - getTicks(datatime)) / 10000000;

} break;

}

}

return tmp;

}

publicstaticbool information()

{

if (File.Exists(PATH))

ip = counting(File.ReadAllLines(PATH, encoding));

else

ip = newInformationProgram();

String showing = "[" + getTime() + "] [showing] Тривалістьсенсу: " + ip.durationSense + " сек" + ENTER;

File.AppendAllText(PATH, showing, encoding);

prefix = "[" + getTime() + "] [information] ";

String text = "Сеансів: " + ip.countSessions

+ ", Аварійнихсеансів: " + ip.countEmergencySessions

+ ", Загальнатривалість: " + ip.totalDuration + " сек.";

File.AppendAllText(PATH, prefix + text + ENTER + ENTER, encoding);

returntrue;

}

#endregion

}

}

ДОДАТОК В. ІНСТРУКЦІЯ КОРИСТУВАЧЕВІ

СИСТЕМА САМООБСЛУГОВУВАННЯ ЗАКЛАДІВ

ГРОМАДСЬКОГО ХАРЧУВАННЯ

Інструкція користувачеві

482.ЧДТУ.142133-0134-01

Розробник: ____________________ Завалко В. А.

Черкаси, 2014

1 Інструкція для клієнтської програми

1.1 Встановлення та запуск

1. Для встановлення програми на комп'ютер закладу громадського харчування, потрібно скопіювати папку FastOrder_Client, на компютер який буде приймати замовлення (Рис. B.1)

2.

Рисунок B.1 - Структура папки з програмою

3. Для запуску програми необхідно двічі натиснути лівою клавішею миші на іконку програми з назвою "FastOrder". Попередньо встановивши та запустивши сервер. В протилежному випадку ви отримаєте повідомлення про помилку (Рис B.2).

РисунокB.2 - Повідомлення про помилку

4. Після того як ви встановите і запустите сервер можна запускати програму.На екрані з'явиться головне меню.

1.2 Головне меню

1. Після запуску програми ми попадаємо в головне меню (Рис B.3).

Рисунок B.3 - Головне меню програми

2. Головне меню складається з чотирьох окремих полів, та 4 кнопок.

Поля:

"Меню" - в цьому полі вказані категорії страв.

"Обрати страву" - в залежності від вибраної категорії відображаються потрібні страви.

"Замовленно" - в цій частині відображається детальна інформація про страви, їх вагу, ціну, та кількість.

"Замовлення" - в останньому блоці але не останньому за значенням відображається послідовність замовлення, а також інформація про ціну замовлення та № вибрного столика.

Кнопки:

"Вибрати столик" - відкриває вікно з вибором "умовного" столика. "Замовити" - після того як користувач повінсю визначився з замовленням, натиснувши цю кнопку замовлення відправляється на сервер.

"Очистити замовлення" - у разі помилки ця кнопка видалить усі обрані страви.

"Історя замовлень" - відображає історію вже виконаних замовлень.

1.3 Вибір страви

1. Для вибору страви або напою спочатку треба обрати категорію. Це робиться з допомогою натискання мишею на потрібну категорію. В лівому блоці програми(Рис B.4).

Рисунок B.4 - Вибір категорії.Гарніри.

2. Після вибору необхідних страв або напоїв ви можете вказати їх кількість, при цьому побачите з чого вони складаються, їхню вагу, та ціну(Рис B.5).

Рисунок B.5 - Інформація про замовлені страви.

1.4 Замовлення

1. Щоб виконати замовлення, для початку потрібно обрати столик. Це робиться шляхом натискання кнопки "Вибрати столик". Ми попадаємо в вікно з планом закладу, там за допомогою миші ми вибираємо відповідний номер столика і натискаємо "Обрати" (Рис B.6).

Рисунок B.6 - Вікно вибору столика.

2. Далі ми повертаємось в головне меню, шляхом переходу по категоріям, вибираємо відповідні страви та вказуємо їх кількість (Рис B.7), у разі помилки кожну страву можна видалити окремо.

Рисунок B.7 - Головне меню.Процес замовлення.

3. Якшо клієнт повнісю визначився з замовленням можна сміливо натискати кнопку "Замовити". Після цього відбувається процес завершення замовлення (Рис B.8), данні відправляються на сервер.

Рисунок B.8 - Процес завершення замовлення.

2 Інструкція для сервера кухаря

2.1 Розгортання

1. Для встановлення серверу на комп'ютер закладу громадського харчування, потрібно скопіювати папку FastOrder_Server, на сервер який буде приймати замовлення з комп'ютера"відправника"(Рис. B.9).

Рисунок B.9 - Структура папки з сервером

2. Після копіювання папки, для запуску серверу необхідно двічі клацнути за допомогою миші на ікрнці з назвою "Server". Після чого програма запуститься(Рис B.10).

Рисунок B.10 - Вигляд головного вікна серверу для кухарів.

2.1 Перегляд замовлень

1. Після розгортання серверу він має вигляд(Рис B.10) і знаходиться в режимі очікування замовлення. Як тільки замовлення надходе це одразу відображається на сервері (Рис B.11), вказується перелік замовлених страв та їх кількість.

Рисунок B.11 - Вигляд головного вікна серверу. З новим замовленням.

2. Якшо замовлення виконане, кухарем, то він повинен натиснути кнопу виконано. Після чого замовлення зникає з серверу, але зберігається в історії замовлень.

ДОДАТОК Г. ГРАФІЧНІ МАТЕРІАЛИ

СИСТЕМА САМООБСЛУГОВУВАННЯ ЗАКЛАДІВ

ГРОМАДСЬКОГО ХАРЧУВАННЯ

Графічні матеріали

Розробник: ____________________ Завалко В. А.

Черкаси, 2014

1. Мета бакалаврської роботи

Рисунок Г.1 - Мета бакалаврської роботи

2. Функції програми

Рисунок Г.2 - Функції програми

3. Засоби реалізації

Рисунок Г.3 - Засоби реалізації

4. Модель системи

Рисунок Г.4 - Модель системи

5. Алгоритм роботи клієнтської частини

Рисунок Г.5 - Алгоритм роботи клієнтської частини

6. Алгоритм роботи серверної частини

Рисунок Г.6 - Алгоритм роботи серверної частини

7. Структура бази даних

Рисунок Г.7- Структура бази даних

8. Вигляд програми "FastOrder"

Рисунок Г.8 - Вигляд програми "FastOrder"

9. Вікно вибору столика

Рисунок Г.9 - Вікно вибору столика

10. Вимоги до інтерфейсів інформаційних систем

Рисунок Г.10 - Вимоги до інтерфейсів інформаційних систем

11. Економічна ефективність

Рисунок Г.11 - Економічна ефективність

Размещено на Allbest.ru


Подобные документы

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.