• Nem Talált Eredményt

2. Melléklet: A mélyinterjú során használt vázlat

4.4.7. FileProvider.cs using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.IO;

namespace Mezogazdasag.Models.Providers {

publicstaticclassFileProvider {

publicstaticvoid LoadImportFile(string _path) {

Providers.RealDataProvider.EmptyDataList();

using (TextReader stream = newStreamReader(_path, Encoding.Default))

{ string line;

while ((line = stream.ReadLine()) != null) {

Providers.RealDataProvider.AddEntity(line);

} } } } }

187 | O l d a l

{privatestaticList<Models.RealData> realList = newList<Models.RealData>();

188 | O l d a l

4.5. User Interface Layer 4.5.1. ManualData.Designer.cs

/// 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>

protectedoverridevoid Dispose(bool disposing) {

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

/// Required method for Designer support - do not modify /// the contents of this method with the code editor.

///</summary>

privatevoid InitializeComponent() {

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

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

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

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

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

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

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

189 | O l d a l this.button1 = new System.Windows.Forms.Button();

this.SuspendLayout();

//

// textBox1 //

this.textBox1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold,

System.Drawing.GraphicsUnit.Point, ((byte)(0)));

this.textBox1.Location = new System.Drawing.Point(115, 136);

this.textBox1.Name = "textBox1";

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

this.textBox1.TabIndex = 0;

//

// textBox2 //

this.textBox2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold,

System.Drawing.GraphicsUnit.Point, ((byte)(0)));

this.textBox2.Location = new System.Drawing.Point(115, 172);

this.textBox2.Name = "textBox2";

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

this.textBox2.TabIndex = 1;

//

// textBox3 //

this.textBox3.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold,

System.Drawing.GraphicsUnit.Point, ((byte)(0)));

this.textBox3.Location = new System.Drawing.Point(115, 208);

this.textBox3.Name = "textBox3";

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

this.textBox3.TabIndex = 2;

//

// label1 //

this.label1.AutoSize = true;

this.label1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);

190 | O l d a l

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

this.label1.Name = "label1";

this.label1.Size = new System.Drawing.Size(84, 23);

this.label1.TabIndex = 3;

this.label2.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);

this.label2.Location = new System.Drawing.Point(12, 175);

this.label2.Name = "label2";

this.label2.Size = new System.Drawing.Size(95, 23);

this.label2.TabIndex = 4;

this.label3.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);

this.label3.Location = new System.Drawing.Point(12, 211);

this.label3.Name = "label3";

this.label3.Size = new System.Drawing.Size(65, 23);

this.label3.TabIndex = 5;

this.label3.Text = "Darab:";

this.label4.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);

this.label4.Location = new System.Drawing.Point(17, 9);

this.label4.Name = "label4";

this.label4.Size = new System.Drawing.Size(290, 113);

this.label4.TabIndex = 6;

191 | O l d a l this.button1.Font = new System.Drawing.Font("Comic Sans MS", 12F, System.Drawing.FontStyle.Bold);

this.button1.Location = new System.Drawing.Point(16, 250);

this.button1.Name = "button1";

this.button1.Size = new System.Drawing.Size(291, 28);

this.button1.TabIndex = 7;

this.button1.Text = "O.K.";

this.button1.UseVisualStyleBackColor = true;

this.button1.Click += new

System.EventHandler(this.button1_Click);

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

this.AutoScaleMode =

System.Windows.Forms.AutoScaleMode.Font;

this.ClientSize = new System.Drawing.Size(324, 286);

this.ControlBox = false;

this.Text = "Manuális adatok";

this.Load += new

192 | O l d a l

private System.Windows.Forms.Label label2;

private System.Windows.Forms.Label label3;

private System.Windows.Forms.Label label4;

private System.Windows.Forms.Button button1;

} }

193 | O l d a l

/// 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>

protectedoverridevoid Dispose(bool disposing) {

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

/// Required method for Designer support - do not modify /// the contents of this method with the code editor.

///</summary>

privatevoid InitializeComponent() {

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

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

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

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

this.SuspendLayout();

//

// label1 //

194 | O l d a l

this.label1.AutoSize = true;

this.label1.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular,

System.Drawing.GraphicsUnit.Point, ((byte)(0)));

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

this.label1.Name = "label1";

this.label1.Size = new System.Drawing.Size(48, 19);

this.label1.TabIndex = 0;

this.label1.Text = "Jelszó:";

//

// textBox1 //

this.textBox1.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Regular,

System.Drawing.GraphicsUnit.Point, ((byte)(0)));

this.textBox1.Location = new System.Drawing.Point(66, 6);

this.textBox1.Name = "textBox1";

this.textBox1.Size = new System.Drawing.Size(206, 26);

this.textBox1.TabIndex = 1;

this.textBox1.UseSystemPasswordChar = true;

//

// button1 //

this.button1.Location = new System.Drawing.Point(12, 50);

this.button1.Name = "button1";

this.button1.Size = new System.Drawing.Size(269, 27);

this.button1.TabIndex = 2;

this.button2.Location = new System.Drawing.Point(12, 83);

this.button2.Name = "button2";

this.button2.Size = new System.Drawing.Size(269, 27);

this.button2.TabIndex = 3;

195 | O l d a l

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

this.AutoScaleMode =

System.Windows.Forms.AutoScaleMode.Font;

this.ClientSize = new System.Drawing.Size(284, 119);

this.Controls.Add(this.button2);

this.Text = "Admin jelszó";

this.ResumeLayout(false);

196 | O l d a l 4.5.3. Program.cs using System;

using System.Collections.Generic;

using System.Windows.Forms;

namespace Mezogazdasag.UI {

staticclassProgram {

///<summary>

/// The main entry point for the application.

///</summary>

[STAThread]

staticvoid Main() {

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Application.Run(newMezogazdasag());

} } }