diff --git a/A2/Passport/Passport.v12.suo b/A2/Passport/Passport.v12.suo
new file mode 100644
index 0000000..6bd5a52
Binary files /dev/null and b/A2/Passport/Passport.v12.suo differ
diff --git a/A2/Passport/Passport/bin/Debug/Passport.vshost.exe b/A2/Passport/Passport/bin/Debug/Passport.vshost.exe
index c0dfecc..666c0af 100644
Binary files a/A2/Passport/Passport/bin/Debug/Passport.vshost.exe and b/A2/Passport/Passport/bin/Debug/Passport.vshost.exe differ
diff --git a/A2/Passport/Passport/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/A2/Passport/Passport/obj/Debug/DesignTimeResolveAssemblyReferences.cache
new file mode 100644
index 0000000..c200061
Binary files /dev/null and b/A2/Passport/Passport/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/A2/Passport/Passport/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/A2/Passport/Passport/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
new file mode 100644
index 0000000..4106fcb
Binary files /dev/null and b/A2/Passport/Passport/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/A2/Passport/Passport/obj/Debug/Passport.csproj.FileListAbsolute.txt b/A2/Passport/Passport/obj/Debug/Passport.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..3988dc0
--- /dev/null
+++ b/A2/Passport/Passport/obj/Debug/Passport.csproj.FileListAbsolute.txt
@@ -0,0 +1 @@
+E:\Информационная база Владимира Слобцова\Школота\УрФУ 2 курс\prog2015\A2\Passport\Passport\bin\Debug\Passport.exe.config
diff --git a/A2/Passport/Passport/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/A2/Passport/Passport/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100644
index 0000000..e69de29
diff --git a/A2/Passport/Passport/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/A2/Passport/Passport/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100644
index 0000000..e69de29
diff --git a/A2/Passport/Passport/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/A2/Passport/Passport/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/A1/Laba1.sln b/Labs/A1/Laba1.sln
new file mode 100644
index 0000000..9169d85
--- /dev/null
+++ b/Labs/A1/Laba1.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Laba1", "Laba1\Laba1.csproj", "{D1D64E15-7FA7-4BF4-823E-DCDBC56C6873}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D1D64E15-7FA7-4BF4-823E-DCDBC56C6873}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D1D64E15-7FA7-4BF4-823E-DCDBC56C6873}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D1D64E15-7FA7-4BF4-823E-DCDBC56C6873}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D1D64E15-7FA7-4BF4-823E-DCDBC56C6873}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Labs/A1/Laba1.v12.suo b/Labs/A1/Laba1.v12.suo
new file mode 100644
index 0000000..eb64655
Binary files /dev/null and b/Labs/A1/Laba1.v12.suo differ
diff --git a/Labs/A1/Laba1/App.config b/Labs/A1/Laba1/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/A1/Laba1/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/A1/Laba1/Cs.cs b/Labs/A1/Laba1/Cs.cs
new file mode 100644
index 0000000..20cb4d8
--- /dev/null
+++ b/Labs/A1/Laba1/Cs.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Laba1
+{
+ public class Cs
+ {
+
+
+ public int Power { get; set; }
+ public string Name { get; set; }
+
+ public string Surname { get; set; }
+
+ public Aura Type { get; set; }
+
+
+ }
+
+ public enum Aura
+ {
+ green,
+ dark,
+ blue,
+ orange,
+ white,
+ gold
+ }
+}
diff --git a/Labs/A1/Laba1/Form1.Designer.cs b/Labs/A1/Laba1/Form1.Designer.cs
new file mode 100644
index 0000000..0978bb8
--- /dev/null
+++ b/Labs/A1/Laba1/Form1.Designer.cs
@@ -0,0 +1,296 @@
+namespace Laba1
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.radioButton1 = new System.Windows.Forms.RadioButton();
+ this.radioButton2 = new System.Windows.Forms.RadioButton();
+ this.radioButton3 = new System.Windows.Forms.RadioButton();
+ this.radioButton5 = new System.Windows.Forms.RadioButton();
+ this.radioButton6 = new System.Windows.Forms.RadioButton();
+ this.listBox1 = new System.Windows.Forms.ListBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label5 = new System.Windows.Forms.Label();
+ this.Save = new System.Windows.Forms.Button();
+ this.Load = new System.Windows.Forms.Button();
+ this.textBox3 = new System.Windows.Forms.TextBox();
+ this.label6 = new System.Windows.Forms.Label();
+ this.button3 = new System.Windows.Forms.Button();
+ this.radioButton4 = new System.Windows.Forms.RadioButton();
+ this.listBox2 = new System.Windows.Forms.ListBox();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(19, 42);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(100, 20);
+ this.textBox1.TabIndex = 0;
+ this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(146, 42);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(100, 20);
+ this.textBox2.TabIndex = 0;
+ //
+ // radioButton1
+ //
+ this.radioButton1.AutoSize = true;
+ this.radioButton1.Location = new System.Drawing.Point(19, 111);
+ this.radioButton1.Name = "radioButton1";
+ this.radioButton1.Size = new System.Drawing.Size(107, 17);
+ this.radioButton1.TabIndex = 2;
+ this.radioButton1.TabStop = true;
+ this.radioButton1.Text = "Green Might aura";
+ this.radioButton1.UseVisualStyleBackColor = true;
+ this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
+ //
+ // radioButton2
+ //
+ this.radioButton2.AutoSize = true;
+ this.radioButton2.Location = new System.Drawing.Point(19, 134);
+ this.radioButton2.Name = "radioButton2";
+ this.radioButton2.Size = new System.Drawing.Size(100, 17);
+ this.radioButton2.TabIndex = 2;
+ this.radioButton2.TabStop = true;
+ this.radioButton2.Text = "Dark might aura";
+ this.radioButton2.UseVisualStyleBackColor = true;
+ this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
+ //
+ // radioButton3
+ //
+ this.radioButton3.AutoSize = true;
+ this.radioButton3.Location = new System.Drawing.Point(19, 157);
+ this.radioButton3.Name = "radioButton3";
+ this.radioButton3.Size = new System.Drawing.Size(98, 17);
+ this.radioButton3.TabIndex = 2;
+ this.radioButton3.TabStop = true;
+ this.radioButton3.Text = "Blue might aura";
+ this.radioButton3.UseVisualStyleBackColor = true;
+ this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
+ //
+ // radioButton5
+ //
+ this.radioButton5.AutoSize = true;
+ this.radioButton5.Location = new System.Drawing.Point(19, 206);
+ this.radioButton5.Name = "radioButton5";
+ this.radioButton5.Size = new System.Drawing.Size(105, 17);
+ this.radioButton5.TabIndex = 2;
+ this.radioButton5.TabStop = true;
+ this.radioButton5.Text = "White might aura";
+ this.radioButton5.UseVisualStyleBackColor = true;
+ this.radioButton5.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged);
+ //
+ // radioButton6
+ //
+ this.radioButton6.AutoSize = true;
+ this.radioButton6.Location = new System.Drawing.Point(19, 230);
+ this.radioButton6.Name = "radioButton6";
+ this.radioButton6.Size = new System.Drawing.Size(111, 17);
+ this.radioButton6.TabIndex = 2;
+ this.radioButton6.TabStop = true;
+ this.radioButton6.Text = "Golden might aura";
+ this.radioButton6.UseVisualStyleBackColor = true;
+ this.radioButton6.CheckedChanged += new System.EventHandler(this.radioButton6_CheckedChanged);
+ //
+ // listBox1
+ //
+ this.listBox1.FormattingEnabled = true;
+ this.listBox1.Location = new System.Drawing.Point(146, 112);
+ this.listBox1.Name = "listBox1";
+ this.listBox1.Size = new System.Drawing.Size(120, 95);
+ this.listBox1.TabIndex = 3;
+ this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(19, 23);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(55, 13);
+ this.label1.TabIndex = 4;
+ this.label1.Text = "First name";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(143, 26);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(75, 13);
+ this.label2.TabIndex = 4;
+ this.label2.Text = "Second Name";
+ this.label2.Click += new System.EventHandler(this.label2_Click);
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(16, 94);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(49, 13);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "Aura tipe";
+ //
+ // label5
+ //
+ this.label5.AutoSize = true;
+ this.label5.Location = new System.Drawing.Point(143, 94);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(64, 13);
+ this.label5.TabIndex = 4;
+ this.label5.Text = "Superpower";
+ //
+ // Save
+ //
+ this.Save.Location = new System.Drawing.Point(19, 409);
+ this.Save.Name = "Save";
+ this.Save.Size = new System.Drawing.Size(75, 23);
+ this.Save.TabIndex = 5;
+ this.Save.Text = "Save";
+ this.Save.UseVisualStyleBackColor = true;
+ this.Save.Click += new System.EventHandler(this.Save_Click);
+ //
+ // Load
+ //
+ this.Load.Location = new System.Drawing.Point(191, 409);
+ this.Load.Name = "Load";
+ this.Load.Size = new System.Drawing.Size(75, 23);
+ this.Load.TabIndex = 5;
+ this.Load.Text = "Load";
+ this.Load.UseVisualStyleBackColor = true;
+ this.Load.Click += new System.EventHandler(this.Load_Click);
+ //
+ // textBox3
+ //
+ this.textBox3.Location = new System.Drawing.Point(146, 227);
+ this.textBox3.Name = "textBox3";
+ this.textBox3.Size = new System.Drawing.Size(120, 20);
+ this.textBox3.TabIndex = 0;
+ this.textBox3.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
+ //
+ // label6
+ //
+ this.label6.AutoSize = true;
+ this.label6.Location = new System.Drawing.Point(165, 210);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(84, 13);
+ this.label6.TabIndex = 4;
+ this.label6.Text = "Add superpower";
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(168, 253);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(75, 23);
+ this.button3.TabIndex = 6;
+ this.button3.Text = "Add";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // radioButton4
+ //
+ this.radioButton4.AutoSize = true;
+ this.radioButton4.Location = new System.Drawing.Point(19, 181);
+ this.radioButton4.Name = "radioButton4";
+ this.radioButton4.Size = new System.Drawing.Size(112, 17);
+ this.radioButton4.TabIndex = 2;
+ this.radioButton4.TabStop = true;
+ this.radioButton4.Text = "Orange might aura";
+ this.radioButton4.UseVisualStyleBackColor = true;
+ this.radioButton4.CheckedChanged += new System.EventHandler(this.radioButton5_CheckedChanged);
+ //
+ // listBox2
+ //
+ this.listBox2.FormattingEnabled = true;
+ this.listBox2.Location = new System.Drawing.Point(22, 292);
+ this.listBox2.Name = "listBox2";
+ this.listBox2.Size = new System.Drawing.Size(244, 95);
+ this.listBox2.TabIndex = 7;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(283, 444);
+ this.Controls.Add(this.listBox2);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.Load);
+ this.Controls.Add(this.Save);
+ this.Controls.Add(this.label5);
+ this.Controls.Add(this.label6);
+ this.Controls.Add(this.label3);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.listBox1);
+ this.Controls.Add(this.radioButton6);
+ this.Controls.Add(this.radioButton4);
+ this.Controls.Add(this.radioButton5);
+ this.Controls.Add(this.radioButton3);
+ this.Controls.Add(this.radioButton2);
+ this.Controls.Add(this.radioButton1);
+ this.Controls.Add(this.textBox2);
+ this.Controls.Add(this.textBox3);
+ this.Controls.Add(this.textBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.RadioButton radioButton1;
+ private System.Windows.Forms.RadioButton radioButton2;
+ private System.Windows.Forms.RadioButton radioButton3;
+ private System.Windows.Forms.RadioButton radioButton5;
+ private System.Windows.Forms.RadioButton radioButton6;
+ private System.Windows.Forms.ListBox listBox1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label5;
+ private System.Windows.Forms.Button Save;
+ private System.Windows.Forms.Button Load;
+ private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.Label label6;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.RadioButton radioButton4;
+ private System.Windows.Forms.ListBox listBox2;
+ }
+}
+
diff --git a/Labs/A1/Laba1/Form1.cs b/Labs/A1/Laba1/Form1.cs
new file mode 100644
index 0000000..ba2f9b1
--- /dev/null
+++ b/Labs/A1/Laba1/Form1.cs
@@ -0,0 +1,260 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.IO;
+using System.Xml.Serialization;
+
+namespace Laba1
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitDefaultes();
+ InitializeComponent();
+ }
+
+ public Cs Sp()
+ {
+ var Inf = new Cs();
+
+ Inf.Name = textBox1.Text;
+ Inf.Surname = textBox2.Text;
+
+ if (radioButton1.Checked)
+ Inf.Type = Aura.green;
+ else if (radioButton2.Checked)
+ Inf.Type = Aura.dark;
+ else if (radioButton3.Checked)
+ Inf.Type = Aura.blue;
+ else if (radioButton4.Checked)
+ Inf.Type = Aura.orange;
+ else if (radioButton5.Checked)
+ Inf.Type = Aura.white;
+ else if (radioButton6.Checked)
+ Inf.Type = Aura.gold;
+
+ Inf.Power = listBox1.SelectedIndex;
+
+ return Inf;
+ }
+
+ void InitDefaultes()
+ {
+ radioButton1Items = new List { "Hyperkinesthesia", "Levetation", "Fitokinesis" };
+ radioButton2Items = new List { "Abilitiabsorbtion", "Vitakinesis", "Hypersupression" };
+ radioButton3Items = new List { "Aprior", "Hyperdynamia", "Regeneration" };
+ radioButton4Items = new List { "Pyrocinesis", "Byocurrentia", "Absorbtion" };
+ radioButton5Items = new List { "Cryokinesis", "Umrakinesis", "Invisibility" };
+ radioButton6Items = new List { "Chronokinesis", "Second sight", "Desintegrity" };
+ }
+
+ List radioButton1Items;
+ List radioButton2Items;
+ List radioButton3Items;
+ List radioButton4Items;
+ List radioButton5Items;
+ List radioButton6Items;
+
+
+
+ private void textBox1_TextChanged(object sender, EventArgs e)
+ {
+
+ }
+
+ private void label2_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void radioButton1_CheckedChanged(object sender, EventArgs e)
+ {
+ listBox1.Items.Clear();
+ foreach (var Item in radioButton1Items)
+ {
+ listBox1.Items.Add(Item);
+ }
+ }
+
+ private void radioButton2_CheckedChanged(object sender, EventArgs e)
+ {
+ listBox1.Items.Clear();
+ foreach (var Item in radioButton2Items)
+ {
+ listBox1.Items.Add(Item);
+ }
+ }
+
+ private void radioButton3_CheckedChanged(object sender, EventArgs e)
+ {
+ listBox1.Items.Clear();
+ foreach (var Item in radioButton3Items)
+ {
+ listBox1.Items.Add(Item);
+ }
+ }
+
+ private void radioButton5_CheckedChanged(object sender, EventArgs e)
+ {
+ if (radioButton5.Checked)
+ {
+ listBox1.Items.Clear();
+ foreach (var Item in radioButton5Items)
+ {
+ listBox1.Items.Add(Item);
+ }
+ }
+ if (radioButton4.Checked)
+ {
+ listBox1.Items.Clear();
+ foreach (var Item in radioButton4Items)
+ {
+ listBox1.Items.Add(Item);
+ }
+ }
+ }
+
+ private void radioButton6_CheckedChanged(object sender, EventArgs e)
+ {
+ listBox1.Items.Clear();
+ foreach (var Item in radioButton6Items)
+ {
+ listBox1.Items.Add(Item);
+ }
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ if (radioButton1.Checked)
+ {
+ radioButton1Items.Add(textBox3.Text);
+
+ listBox1.Items.Clear();
+ foreach (var item in radioButton1Items)
+ {
+ listBox1.Items.Add(item);
+ }
+ textBox3.Clear();
+ }
+
+ if (radioButton2.Checked)
+ {
+ radioButton2Items.Add(textBox3.Text);
+
+ listBox1.Items.Clear();
+ foreach (var item in radioButton2Items)
+ {
+ listBox1.Items.Add(item);
+ }
+ textBox3.Clear();
+ }
+
+ if (radioButton3.Checked)
+ {
+ radioButton3Items.Add(textBox3.Text);
+
+ listBox1.Items.Clear();
+ foreach (var item in radioButton3Items)
+ {
+ listBox1.Items.Add(item);
+ }
+ textBox3.Clear();
+ }
+
+ if (radioButton4.Checked)
+ {
+ radioButton4Items.Add(textBox3.Text);
+
+ listBox1.Items.Clear();
+ foreach (var item in radioButton4Items)
+ {
+ listBox1.Items.Add(item);
+ }
+ textBox3.Clear();
+ }
+
+ if (radioButton5.Checked)
+ {
+ radioButton5Items.Add(textBox3.Text);
+
+ listBox1.Items.Clear();
+ foreach (var item in radioButton5Items)
+ {
+ listBox1.Items.Add(item);
+ }
+ textBox3.Clear();
+ }
+
+ if (radioButton6.Checked)
+ {
+ radioButton6Items.Add(textBox3.Text);
+
+ listBox1.Items.Clear();
+ foreach (var item in radioButton6Items)
+ {
+ listBox1.Items.Add(item);
+ }
+ textBox3.Clear();
+ }
+ }
+
+ private void Save_Click(object sender, EventArgs e)
+ {
+ var sfd = new SaveFileDialog() { Title = "Сохранение данных", Filter = "PandoraBox|*.PBF" };
+ var result = sfd.ShowDialog(this);
+ if (result != DialogResult.OK)
+ return;
+
+
+ var xs = new XmlSerializer(typeof(Cs));
+ var file = File.Create(sfd.FileName);
+ xs.Serialize(file, Sp());
+ file.Close();
+ }
+
+ private void Load_Click(object sender, EventArgs e)
+ {
+ var ofd = new OpenFileDialog() { Title = "Сохранение данных", Filter = "PandoraBox|*.PBF" };
+ var result = ofd.ShowDialog(this);
+ if (result != DialogResult.OK)
+ return;
+
+ var xs = new XmlSerializer(typeof(Cs));
+ var file = File.OpenRead(ofd.FileName);
+ Cs Inf = (Cs)xs.Deserialize(file);
+ file.Close();
+
+ textBox1.Text = Inf.Name;
+ textBox2.Text = Inf.Surname;
+
+ if (Inf.Type == Aura.green)
+ radioButton1.Checked = true;
+ else if (Inf.Type == Aura.dark)
+ radioButton2.Checked = true;
+ else if (Inf.Type == Aura.blue)
+ radioButton3.Checked = true;
+ else if (Inf.Type == Aura.orange)
+ radioButton4.Checked = true;
+ else if (Inf.Type == Aura.white)
+ radioButton5.Checked = true;
+ else if (Inf.Type == Aura.gold)
+ radioButton6.Checked = true;
+
+ listBox1.SelectedIndex = Inf.Power;
+
+ }
+
+ private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ listBox2.Items.Add("Выбран элемент " + listBox1.SelectedItem);
+
+ }
+ }
+}
diff --git a/Labs/A1/Laba1/Form1.resx b/Labs/A1/Laba1/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Labs/A1/Laba1/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Labs/A1/Laba1/Laba1.csproj b/Labs/A1/Laba1/Laba1.csproj
new file mode 100644
index 0000000..323ea22
--- /dev/null
+++ b/Labs/A1/Laba1/Laba1.csproj
@@ -0,0 +1,90 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {D1D64E15-7FA7-4BF4-823E-DCDBC56C6873}
+ WinExe
+ Properties
+ Laba1
+ Laba1
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/A1/Laba1/Program.cs b/Labs/A1/Laba1/Program.cs
new file mode 100644
index 0000000..d30521d
--- /dev/null
+++ b/Labs/A1/Laba1/Program.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Laba1
+{
+ static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git a/Labs/A1/Laba1/Properties/AssemblyInfo.cs b/Labs/A1/Laba1/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8017a90
--- /dev/null
+++ b/Labs/A1/Laba1/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Laba1")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Laba1")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("dbb970a5-509c-4e49-a569-cc2800f708ce")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Labs/A1/Laba1/Properties/Resources.Designer.cs b/Labs/A1/Laba1/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..8a4cb48
--- /dev/null
+++ b/Labs/A1/Laba1/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.18408
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Laba1.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Laba1.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Labs/A1/Laba1/Properties/Resources.resx b/Labs/A1/Laba1/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/Labs/A1/Laba1/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Labs/A1/Laba1/Properties/Settings.Designer.cs b/Labs/A1/Laba1/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..0250a3e
--- /dev/null
+++ b/Labs/A1/Laba1/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.18408
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace Laba1.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Labs/A1/Laba1/Properties/Settings.settings b/Labs/A1/Laba1/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/Labs/A1/Laba1/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Labs/A1/Laba1/Sup.cs b/Labs/A1/Laba1/Sup.cs
new file mode 100644
index 0000000..e5af6d7
--- /dev/null
+++ b/Labs/A1/Laba1/Sup.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Laba1
+{
+ public class Sup
+ {
+
+ }
+}
diff --git a/Labs/A1/Laba1/bin/Debug/Laba1.exe b/Labs/A1/Laba1/bin/Debug/Laba1.exe
new file mode 100644
index 0000000..cb091de
Binary files /dev/null and b/Labs/A1/Laba1/bin/Debug/Laba1.exe differ
diff --git a/Labs/A1/Laba1/bin/Debug/Laba1.exe.config b/Labs/A1/Laba1/bin/Debug/Laba1.exe.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/A1/Laba1/bin/Debug/Laba1.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/A1/Laba1/bin/Debug/Laba1.pdb b/Labs/A1/Laba1/bin/Debug/Laba1.pdb
new file mode 100644
index 0000000..46120df
Binary files /dev/null and b/Labs/A1/Laba1/bin/Debug/Laba1.pdb differ
diff --git a/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe b/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe
new file mode 100644
index 0000000..666c0af
Binary files /dev/null and b/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe differ
diff --git a/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe.config b/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe.manifest b/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe.manifest
new file mode 100644
index 0000000..061c9ca
--- /dev/null
+++ b/Labs/A1/Laba1/bin/Debug/Laba1.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Labs/A1/Laba1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Labs/A1/Laba1/obj/Debug/DesignTimeResolveAssemblyReferences.cache
new file mode 100644
index 0000000..e11c99f
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/Labs/A1/Laba1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Labs/A1/Laba1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
new file mode 100644
index 0000000..6d3e175
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/Labs/A1/Laba1/obj/Debug/Laba1.Form1.resources b/Labs/A1/Laba1/obj/Debug/Laba1.Form1.resources
new file mode 100644
index 0000000..6c05a97
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/Laba1.Form1.resources differ
diff --git a/Labs/A1/Laba1/obj/Debug/Laba1.Properties.Resources.resources b/Labs/A1/Laba1/obj/Debug/Laba1.Properties.Resources.resources
new file mode 100644
index 0000000..6c05a97
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/Laba1.Properties.Resources.resources differ
diff --git a/Labs/A1/Laba1/obj/Debug/Laba1.csproj.FileListAbsolute.txt b/Labs/A1/Laba1/obj/Debug/Laba1.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..886e339
--- /dev/null
+++ b/Labs/A1/Laba1/obj/Debug/Laba1.csproj.FileListAbsolute.txt
@@ -0,0 +1,21 @@
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\bin\Debug\Laba1.exe.config
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\bin\Debug\Laba1.exe
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\bin\Debug\Laba1.pdb
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\obj\Debug\Laba1.csprojResolveAssemblyReference.cache
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\obj\Debug\Laba1.Form1.resources
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\obj\Debug\Laba1.Properties.Resources.resources
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\obj\Debug\Laba1.csproj.GenerateResource.Cache
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\obj\Debug\Laba1.exe
+c:\users\user\documents\visual studio 2013\Projects\Laba1\Laba1\obj\Debug\Laba1.pdb
+D:\Laba1\Laba1\bin\Debug\Laba1.exe.config
+D:\Laba1\Laba1\obj\Debug\Laba1.exe
+D:\Laba1\Laba1\obj\Debug\Laba1.pdb
+D:\Laba1\Laba1\bin\Debug\Laba1.exe
+D:\Laba1\Laba1\bin\Debug\Laba1.pdb
+D:\Laba1\Laba1\obj\Debug\Laba1.csprojResolveAssemblyReference.cache
+D:\Laba1\Laba1\obj\Debug\Laba1.Form1.resources
+D:\Laba1\Laba1\obj\Debug\Laba1.Properties.Resources.resources
+D:\Laba1\Laba1\obj\Debug\Laba1.csproj.GenerateResource.Cache
+F:\Laba1\Laba1\bin\Debug\Laba1.exe.config
+F:\Laba1\Laba1\obj\Debug\Laba1.exe
+F:\Laba1\Laba1\obj\Debug\Laba1.pdb
diff --git a/Labs/A1/Laba1/obj/Debug/Laba1.csproj.GenerateResource.Cache b/Labs/A1/Laba1/obj/Debug/Laba1.csproj.GenerateResource.Cache
new file mode 100644
index 0000000..8699971
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/Laba1.csproj.GenerateResource.Cache differ
diff --git a/Labs/A1/Laba1/obj/Debug/Laba1.csprojResolveAssemblyReference.cache b/Labs/A1/Laba1/obj/Debug/Laba1.csprojResolveAssemblyReference.cache
new file mode 100644
index 0000000..d9fb387
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/Laba1.csprojResolveAssemblyReference.cache differ
diff --git a/Labs/A1/Laba1/obj/Debug/Laba1.exe b/Labs/A1/Laba1/obj/Debug/Laba1.exe
new file mode 100644
index 0000000..cb091de
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/Laba1.exe differ
diff --git a/Labs/A1/Laba1/obj/Debug/Laba1.pdb b/Labs/A1/Laba1/obj/Debug/Laba1.pdb
new file mode 100644
index 0000000..46120df
Binary files /dev/null and b/Labs/A1/Laba1/obj/Debug/Laba1.pdb differ
diff --git a/Labs/A1/Laba1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Labs/A1/Laba1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/A1/Laba1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Labs/A1/Laba1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/A1/Laba1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Labs/A1/Laba1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/C1/ConsoleApplication1.sln b/Labs/C1/ConsoleApplication1.sln
new file mode 100644
index 0000000..8fde2c1
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication1", "ConsoleApplication1\ConsoleApplication1.csproj", "{77B27D84-798B-4295-B4AB-AE70CA524413}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {77B27D84-798B-4295-B4AB-AE70CA524413}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {77B27D84-798B-4295-B4AB-AE70CA524413}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {77B27D84-798B-4295-B4AB-AE70CA524413}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {77B27D84-798B-4295-B4AB-AE70CA524413}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Labs/C1/ConsoleApplication1.v12.suo b/Labs/C1/ConsoleApplication1.v12.suo
new file mode 100644
index 0000000..d65dde2
Binary files /dev/null and b/Labs/C1/ConsoleApplication1.v12.suo differ
diff --git a/Labs/C1/ConsoleApplication1/App.config b/Labs/C1/ConsoleApplication1/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/C1/ConsoleApplication1/ConsoleApplication1.csproj b/Labs/C1/ConsoleApplication1/ConsoleApplication1.csproj
new file mode 100644
index 0000000..95773d4
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/ConsoleApplication1.csproj
@@ -0,0 +1,58 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {77B27D84-798B-4295-B4AB-AE70CA524413}
+ Exe
+ Properties
+ ConsoleApplication1
+ ConsoleApplication1
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/C1/ConsoleApplication1/Program.cs b/Labs/C1/ConsoleApplication1/Program.cs
new file mode 100644
index 0000000..4473e89
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/Program.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ConsoleApplication1
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Int64 min = 0, max = 10000, sredn;
+ sredn = ((min + max) / 2);
+ while (true)
+ {
+ Console.WriteLine("Ваше число меньше " + sredn + "?");
+ if (Console.ReadLine()[0] == 'y')
+ max = sredn;
+ else
+ min = sredn;
+ sredn = ((min + max) / 2);
+ if (sredn == min)
+ {
+ break;
+ }
+ }
+ Console.WriteLine("Это число " + min + "?");
+ if (Console.ReadLine()[0] == 'y')
+ {
+ Console.WriteLine("Ура, я угадал!");
+ }
+ else
+ {
+ Console.WriteLine("Пичалька :с");
+ }
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/Labs/C1/ConsoleApplication1/Properties/AssemblyInfo.cs b/Labs/C1/ConsoleApplication1/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..f9d9f7c
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ConsoleApplication1")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("ConsoleApplication1")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("42fdb6ee-f693-49ec-9401-b4208566dc15")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe
new file mode 100644
index 0000000..8a9118c
Binary files /dev/null and b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe differ
diff --git a/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe.config b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.pdb b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.pdb
new file mode 100644
index 0000000..e3d0874
Binary files /dev/null and b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.pdb differ
diff --git a/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe
new file mode 100644
index 0000000..666c0af
Binary files /dev/null and b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe differ
diff --git a/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.config b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.manifest b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.manifest
new file mode 100644
index 0000000..061c9ca
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/bin/Debug/ConsoleApplication1.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.csproj.FileListAbsolute.txt b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..25628da
--- /dev/null
+++ b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.csproj.FileListAbsolute.txt
@@ -0,0 +1,6 @@
+c:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe.config
+c:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe
+c:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\bin\Debug\ConsoleApplication1.pdb
+c:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\obj\Debug\ConsoleApplication1.csprojResolveAssemblyReference.cache
+c:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\obj\Debug\ConsoleApplication1.exe
+c:\users\user\documents\visual studio 2013\Projects\ConsoleApplication1\ConsoleApplication1\obj\Debug\ConsoleApplication1.pdb
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.csprojResolveAssemblyReference.cache b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.csprojResolveAssemblyReference.cache
new file mode 100644
index 0000000..d701938
Binary files /dev/null and b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.csprojResolveAssemblyReference.cache differ
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.exe b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.exe
new file mode 100644
index 0000000..8a9118c
Binary files /dev/null and b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.exe differ
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.pdb b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.pdb
new file mode 100644
index 0000000..e3d0874
Binary files /dev/null and b/Labs/C1/ConsoleApplication1/obj/Debug/ConsoleApplication1.pdb differ
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Labs/C1/ConsoleApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
new file mode 100644
index 0000000..ea7455b
Binary files /dev/null and b/Labs/C1/ConsoleApplication1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Labs/C1/ConsoleApplication1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Labs/C1/ConsoleApplication1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/C1/ConsoleApplication1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Labs/C1/ConsoleApplication1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/D1/D1.sln b/Labs/D1/D1.sln
new file mode 100644
index 0000000..f0312be
--- /dev/null
+++ b/Labs/D1/D1.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "D1", "D1\D1.csproj", "{5E3545B6-1D3D-44A8-916C-88D7AED368F4}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5E3545B6-1D3D-44A8-916C-88D7AED368F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5E3545B6-1D3D-44A8-916C-88D7AED368F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5E3545B6-1D3D-44A8-916C-88D7AED368F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5E3545B6-1D3D-44A8-916C-88D7AED368F4}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Labs/D1/D1.v12.suo b/Labs/D1/D1.v12.suo
new file mode 100644
index 0000000..0c4e00f
Binary files /dev/null and b/Labs/D1/D1.v12.suo differ
diff --git a/Labs/D1/D1/App.config b/Labs/D1/D1/App.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/D1/D1/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/D1/D1/BitmapImager.cs b/Labs/D1/D1/BitmapImager.cs
new file mode 100644
index 0000000..189ee2d
--- /dev/null
+++ b/Labs/D1/D1/BitmapImager.cs
@@ -0,0 +1,1018 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Drawing.Drawing2D;
+using System.IO;
+
+namespace D1
+{
+ ///
+ /// This class provides methods to Resize and Apply Filters to bitmap images.
+ ///
+ /// ideas from
+ /// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp11152001.asp
+ /// http://www.msnewsgroups.net/group/microsoft.public.dotnet.languages.csharp/topic9351.aspx
+ ///
+ public unsafe class ImagerBitmap : IDisposable
+ {
+ ///
+ /// This struct is used to hold the RGB values when we find a pixel using the pointer
+ ///
+ private struct PixelData
+ {
+ public byte Blue;
+ public byte Green;
+ public byte Red;
+ }
+ ///
+ /// This object contains pointer addressable information about the bitmap
+ ///
+ private BitmapData _bitmapData = null;
+ ///
+ /// The pointer to the upper left corner of the bitmap
+ ///
+ private byte* pBase = null;
+ private Bitmap _bitmap = null;
+ ///
+ /// Get the Image we are working with
+ ///
+ public Bitmap Bitmap
+ {
+ get
+ {
+ return _bitmap;
+ }
+ }
+ ///
+ /// Constructor
+ ///
+ /// Bitmap to use as the basis of the Imager
+ public ImagerBitmap(Bitmap b)
+ {
+ if (b.PixelFormat != PixelFormat.Format24bppRgb)
+ {
+ //Convert the image into Format24bppRgb since our unmanaged code
+ //can walk that image type
+ Bitmap b2 = new Bitmap(b.Size.Width, b.Size.Height, PixelFormat.Format24bppRgb);
+ Graphics g = Graphics.FromImage(b2);
+ g.DrawImage(b, new Point(0, 0));
+ _bitmap = b2;
+ g.Dispose();
+ }
+ else
+ {
+ _bitmap = b;
+ }
+ Width = b.Width;
+ Height = b.Height;
+ LockBitmap();
+ }
+ ///
+ /// Load a pixel with color
+ ///
+ /// Column
+ /// Row
+ /// Color
+ public void SetPixel(int x, int y, Color c)
+ {
+ if (x < 0 || y < 0 || x >= Width || y >= Height)
+ return;
+ PixelData* p = PixelAt(x, y);
+ p->Red = c.R;
+ p->Green = c.G;
+ p->Blue = c.B;
+ }
+
+ public int Height { get; set; }
+
+ public int Width { get; set; }
+
+ public void SetPixel(float x, float y, Color c)
+ {
+ SetPixel((int)x, (int)y, c);
+ }
+ ///
+ /// Get a pixel
+ ///
+ /// Column
+ /// Row
+ /// Color
+ public Color GetPixel(int x, int y)
+ {
+ PixelData* p = PixelAt(x, y);
+ return Color.FromArgb((int)p->Red, (int)p->Green, (int)p->Blue);
+ }
+ ///
+ /// Get the Grey value for a give pixel
+ ///
+ /// Column
+ /// Row
+ /// Grey value for the pixel
+ private int GetGreyPixel(int column, int row)
+ {
+ return (int)((GetPixel(column, row).R * 0.3) + (GetPixel(column, row).G * 0.59)
+ + (GetPixel(column, row).B * 0.11));
+ }
+ ///
+ /// Use the 2 most signifigant bits from each of the values in the RGB to get an in value
+ /// for the histogram
+ ///
+ /// Column
+ /// Row
+ /// Histogram Value
+ public int GetRGBHistogramValue(int column, int row)
+ {
+ Color c = GetPixel(column, row);
+ int val = 0;
+ int tmp = 0;
+ tmp = c.R;
+ if (tmp - 128 > 0)
+ {
+ tmp -= 128;
+ val += 32;
+ }
+ if (tmp - 64 > 0)
+ {
+ val += 16;
+ }
+ tmp = c.G;
+ if (tmp - 128 > 0)
+ {
+ tmp -= 128;
+ val += 8;
+ }
+ if (tmp - 64 > 0)
+ {
+ val += 4;
+ }
+ tmp = c.B;
+ if (tmp - 128 > 0)
+ {
+ tmp -= 128;
+ val += 2;
+ }
+ if (tmp - 64 > 0)
+ {
+ val += 1;
+ }
+ return val;
+ }
+ ///
+ /// Lock the bitmap so we can use the pointers to access it
+ ///
+ private void LockBitmap()
+ {
+ _bitmapData = _bitmap.LockBits(new Rectangle(0, 0, _bitmap.Width, _bitmap.Height),
+ ImageLockMode.ReadWrite, _bitmap.PixelFormat);
+ pBase = (Byte*)_bitmapData.Scan0.ToPointer();
+ }
+ ///
+ /// Get a pointer to a pixel
+ ///
+ /// Column
+ /// Row
+ ///
+ private unsafe PixelData* PixelAt(int x, int y)
+ {
+ return (PixelData*)(pBase + y * _bitmapData.Stride + x * sizeof(PixelData));
+ }
+ ///
+ /// Unlock the bitmap to end the pointer access session
+ ///
+ private void UnlockBitmap()
+ {
+ _bitmap.UnlockBits(_bitmapData);
+ _bitmapData = null;
+ pBase = null;
+ }
+ ///
+ /// Get a 3x3 matrix of the pixles around the center
+ ///
+ /// Center Row
+ /// Center Column
+ /// 3x3 matrix of the pixles around the center
+ private Color[,] Get3x3(int row, int column)
+ {
+ Color[,] c = new Color[3, 3];
+ c[0, 0] = this.GetPixel(column - 1, row - 1);
+ c[0, 1] = this.GetPixel(column - 1, row);
+ c[0, 2] = this.GetPixel(column - 1, row + 1);
+ c[1, 0] = this.GetPixel(column, row - 1);
+ c[1, 1] = this.GetPixel(column, row);
+ c[1, 2] = this.GetPixel(column, row + 1);
+ c[2, 0] = this.GetPixel(column + 1, row - 1);
+ c[2, 1] = this.GetPixel(column + 1, row);
+ c[2, 2] = this.GetPixel(column + 1, row + 1);
+ return c;
+ }
+ private int[,] GetGrey3x3(int row, int column)
+ {
+ int[,] c = new int[3, 3];
+ c[0, 0] = this.GetGreyPixel(column - 1, row - 1);
+ c[0, 1] = this.GetGreyPixel(column - 1, row);
+ c[0, 2] = this.GetGreyPixel(column - 1, row + 1);
+ c[1, 0] = this.GetGreyPixel(column, row - 1);
+ c[1, 1] = this.GetGreyPixel(column, row);
+ c[1, 2] = this.GetGreyPixel(column, row + 1);
+ c[2, 0] = this.GetGreyPixel(column + 1, row - 1);
+ c[2, 1] = this.GetGreyPixel(column + 1, row);
+ c[2, 2] = this.GetGreyPixel(column + 1, row + 1);
+ return c;
+ }
+ ///
+ /// Get at 5x5 matrix of the pixels around the center
+ ///
+ /// Center Row
+ /// Center Column
+ /// 5x5 matrix of pixles around center
+ private Color[,] Get5x5(int row, int column)
+ {
+ Color[,] c = new Color[5, 5];
+ c[0, 0] = this.GetPixel(column - 2, row - 2);
+ c[0, 1] = this.GetPixel(column - 2, row - 1);
+ c[0, 2] = this.GetPixel(column - 2, row);
+ c[0, 3] = this.GetPixel(column - 2, row + 1);
+ c[0, 4] = this.GetPixel(column - 2, row + 2);
+ c[1, 0] = this.GetPixel(column - 1, row - 2);
+ c[1, 1] = this.GetPixel(column - 1, row - 1);
+ c[1, 2] = this.GetPixel(column - 1, row);
+ c[1, 3] = this.GetPixel(column - 1, row + 1);
+ c[1, 4] = this.GetPixel(column - 1, row + 2);
+ c[2, 0] = this.GetPixel(column, row - 2);
+ c[2, 1] = this.GetPixel(column, row - 1);
+ c[2, 2] = this.GetPixel(column, row);
+ c[2, 3] = this.GetPixel(column, row + 1);
+ c[2, 4] = this.GetPixel(column, row + 2);
+ c[3, 0] = this.GetPixel(column + 1, row - 2);
+ c[3, 1] = this.GetPixel(column + 1, row - 1);
+ c[3, 2] = this.GetPixel(column + 1, row);
+ c[3, 3] = this.GetPixel(column + 1, row + 1);
+ c[3, 4] = this.GetPixel(column + 1, row + 2);
+ c[4, 0] = this.GetPixel(column + 2, row - 2);
+ c[4, 1] = this.GetPixel(column + 2, row - 1);
+ c[4, 2] = this.GetPixel(column + 2, row);
+ c[4, 3] = this.GetPixel(column + 2, row + 1);
+ c[4, 4] = this.GetPixel(column + 2, row + 2);
+ return c;
+ }
+ ///
+ /// Perform laplace edge detection on the image
+ ///
+ /// Source Image
+ /// Edges
+ public static Bitmap Laplace(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 1; column < i.Bitmap.Width - 1; column++)
+ {
+ for (int row = 1; row < i.Bitmap.Height - 1; row++)
+ {
+ Color[,] c = i.Get3x3(row, column);
+ int red = (((c[0, 0].R + c[0, 1].R + c[0, 2].R + c[1, 0].R + c[1, 2].R + c[2, 0].R
+ + c[2, 1].R + c[2, 2].R) * -1) + (c[1, 1].R * 8)) + 128;
+ int green = (((c[0, 0].G + c[0, 1].G + c[0, 2].G + c[1, 0].G + c[1, 2].G
+ + c[2, 0].G + c[2, 1].G + c[2, 2].G) * -1) + (c[1, 1].G * 8)) + 128;
+ int blue = (((c[0, 0].B + c[0, 1].B + c[0, 2].B + c[1, 0].B + c[1, 2].B + c[2, 0].B
+ + c[2, 1].B + c[2, 2].B) * -1) + (c[1, 1].B * 8)) + 128;
+ if (red >= 128) red = 0; else red = 255;
+ if (green >= 128) green = 0; else green = 255;
+ if (blue >= 128) blue = 0; else blue = 255;
+ i2.SetPixel(column, row, Color.FromArgb(red, green, blue));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ public static Bitmap LaplaceGreyscale(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 1; column < i.Bitmap.Width - 1; column++)
+ {
+ for (int row = 1; row < i.Bitmap.Height - 1; row++)
+ {
+ int[,] c = i.GetGrey3x3(row, column);
+ int val = (((c[0, 0] + c[0, 1] + c[0, 2] + c[1, 0] + c[1, 2] + c[2, 0] + c[2, 1]
+ + c[2, 2]) * -1) + (c[1, 1] * 8)) + 128;
+ if (val >= 128) val = 0; else val = 255;
+ i2.SetPixel(column, row, Color.FromArgb(val, val, val));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+
+ ///
+ /// Subtract b2 from b1 and normalize the image
+ ///
+ /// Image
+ /// Image
+ /// Normalized Image
+ public static Bitmap Subtract(Bitmap b1, Bitmap b2)
+ {
+ if (b1.Width != b2.Width || b1.Height != b2.Height)
+ throw new Exception("Images not the same size cannot subtract");
+ ImagerBitmap i = new ImagerBitmap(b1.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b2.Clone() as Bitmap);
+ int[,] red = new int[i.Bitmap.Width, i.Bitmap.Height];
+ int[,] blue = new int[i.Bitmap.Width, i.Bitmap.Height];
+ int[,] green = new int[i.Bitmap.Width, i.Bitmap.Height];
+ int redMax = 0;
+ int redMin = 0;
+ int redRange = 0;
+ int blueMax = 0;
+ int blueMin = 0;
+ int blueRange = 0;
+ int greenMax = 0;
+ int greenMin = 0;
+ int greenRange = 0;
+ //fill the arrays with the subtracted values
+ //Keep track of the min and max values for later
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ Color c1 = i.GetPixel(column, row);
+ Color c2 = i2.GetPixel(column, row);
+ red[column, row] = c2.R - c1.R;
+ blue[column, row] = c2.B - c1.B;
+ green[column, row] = c2.G - c1.G;
+ if (red[column, row] > redMax) redMax = red[column, row];
+ if (red[column, row] < redMin) redMin = red[column, row];
+ if (blue[column, row] > blueMax) blueMax = blue[column, row];
+ if (blue[column, row] < blueMin) blueMin = blue[column, row];
+ if (green[column, row] > greenMax) greenMax = green[column, row];
+ if (green[column, row] < greenMin) greenMin = green[column, row];
+ }
+ }
+ //find the range of the min an max
+ redRange = Math.Abs(redMax - redMin);
+ blueRange = Math.Abs(blueMax - blueMin);
+ greenRange = Math.Abs(greenRange - greenMin);
+ //Normalize the values in the arrays and load the result image
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ if (redRange != 0)
+ red[column, row] = 255 - (((redMax - red[column, row]) * 255) / redRange);
+ if (blueRange != 0)
+ blue[column, row] = 255 - (((blueMax - blue[column, row]) * 255) / blueRange);
+ if (greenRange != 0)
+ green[column, row] = 255 - (((greenMax - green[column, row]) * 255) / greenRange);
+ if (red[column, row] < 0)
+ red[column, row] = 0;
+ if (blue[column, row] < 0)
+ blue[column, row] = 0;
+ if (green[column, row] < 0)
+ green[column, row] = 0;
+ i2.SetPixel(column, row, Color.FromArgb(red[column, row], green[column, row],
+ blue[column, row]));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Get the red pixels from the bitmap
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap GetRedBitmap(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ i.SetPixel(column, row, Color.FromArgb(i.GetPixel(column, row).R, 0, 0));
+ }
+ }
+ i.UnlockBitmap();
+ return i.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Get the Blue Pixes from the bitmap
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap GetBlueBitmap(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ i.SetPixel(column, row, Color.FromArgb(0, 0, i.GetPixel(column, row).B));
+ }
+ }
+ i.UnlockBitmap();
+ return i.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Get the green pixels from the image
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap GetGreenBitmap(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ i.SetPixel(column, row, Color.FromArgb(0, i.GetPixel(column, row).G, 0));
+ }
+ }
+ i.UnlockBitmap();
+ return i.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Make the image Grey scale
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap GetGreyScaleBitmap(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ int val = i.GetGreyPixel(column, row);
+ i.SetPixel(column, row, Color.FromArgb(val, val, val));
+ }
+ }
+ i.UnlockBitmap();
+ return i.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Make the image black and white
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap GetBlackAndWhiteBitmap(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ double[] histogram = new double[256];
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ histogram[i.GetGreyPixel(column, row)]++;
+ }
+ }
+ //find the position of the max value on the left
+ int leftK = 0;
+ for (int k = 0; k < 128; k++)
+ {
+ if (histogram[k] > histogram[leftK]) leftK = k;
+ }
+ //find the position of the max value on the right
+ int rightK = 0;
+ for (int k = 128; k < 256; k++)
+ {
+ if (histogram[k] > histogram[rightK]) rightK = k;
+ }
+ //find the min value between the 2 local maxes
+ int localMin = rightK;
+ for (int k = leftK; k < rightK; k++)
+ {
+ if (histogram[k] < histogram[localMin]) localMin = k;
+ }
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ int val = (i.GetPixel(column, row).R + i.GetPixel(column, row).G
+ + i.GetPixel(column, row).B) / 3;
+ if (val > localMin)
+ val = 255;
+ else
+ val = 0;
+ i.SetPixel(column, row, Color.FromArgb(val, val, val));
+ }
+ }
+ i.UnlockBitmap();
+ return i.Bitmap.Clone() as Bitmap;
+ }
+ public static Bitmap GetBlackAndWhiteBitmap2(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ double[] histogram = new double[256];
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ histogram[i.GetGreyPixel(column, row)]++;
+ }
+ }
+ double k = b.Width * b.Height;
+ double half = k / 2;
+ int middle = 0;
+ while (k > half)
+ {
+ k = k - histogram[middle];
+ middle++;
+ }
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ int val = (i.GetPixel(column, row).R + i.GetPixel(column, row).G
+ + i.GetPixel(column, row).B) / 3;
+ if (val > middle)
+ val = 255;
+ else
+ val = 0;
+ i.SetPixel(column, row, Color.FromArgb(val, val, val));
+ }
+ }
+ i.UnlockBitmap();
+ return i.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Perform a Box filter using a 3x3 Mask
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap Box3x3(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 1; column < i.Bitmap.Width - 1; column++)
+ {
+ for (int row = 1; row < i.Bitmap.Height - 1; row++)
+ {
+ Color[,] c = i.Get3x3(row, column);
+ int red = (c[0, 0].R + c[0, 1].R + c[0, 2].R + c[1, 0].R + c[1, 2].R + c[2, 0].R
+ + c[2, 1].R + c[2, 2].R + c[1, 1].R) / 9;
+ int green = (c[0, 0].G + c[0, 1].G + c[0, 2].G + c[1, 0].G + c[1, 2].G + c[2, 0].G
+ + c[2, 1].G + c[2, 2].G + c[1, 1].G) / 9;
+ int blue = (c[0, 0].B + c[0, 1].B + c[0, 2].B + c[1, 0].B + c[1, 2].B + c[2, 0].B
+ + c[2, 1].B + c[2, 2].B + c[1, 1].B) / 9;
+ i2.SetPixel(column, row, Color.FromArgb(red, green, blue));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Perform a Bionomial filter using a 3x3 Mask
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap Binomial3x3(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 1; column < i.Bitmap.Width - 1; column++)
+ {
+ for (int row = 1; row < i.Bitmap.Height - 1; row++)
+ {
+ Color[,] c = i.Get3x3(row, column);
+ int red = ((c[0, 0].R * 1) + (c[0, 1].R * 2) + (c[0, 2].R * 1) + (c[1, 0].R * 2)
+ + (c[1, 1].R * 4) + (c[1, 2].R * 2) + (c[2, 0].R * 1) + (c[2, 1].R * 2)
+ + (c[2, 2].R * 1)) / 16;
+ int green = ((c[0, 0].G * 1) + (c[0, 1].G * 2) + (c[0, 2].G * 1) + (c[1, 0].G * 2)
+ + (c[1, 1].G * 4) + (c[1, 2].G * 2) + (c[2, 0].G * 1) + (c[2, 1].G * 2)
+ + (c[2, 2].G * 1)) / 16;
+ int blue = ((c[0, 0].B * 1) + (c[0, 1].B * 2) + (c[0, 2].B * 1) + (c[1, 0].B * 2)
+ + (c[1, 1].B * 4) + (c[1, 2].B * 2) + (c[2, 0].B * 1) + (c[2, 1].B * 2)
+ + (c[2, 2].B * 1)) / 16;
+ i2.SetPixel(column, row, Color.FromArgb(red, green, blue));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Perform a Median filter using a 3x3 mask
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap Median3x3(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 1; column < i.Bitmap.Width - 1; column++)
+ {
+ for (int row = 1; row < i.Bitmap.Height - 1; row++)
+ {
+ Color[,] c = i.Get3x3(row, column);
+ int red = Median(c[0, 0].R, c[0, 1].R, c[0, 2].R, c[1, 0].R, c[1, 1].R, c[1, 2].R,
+ c[2, 0].R, c[2, 1].R, c[2, 2].R);
+ int green = Median(c[0, 0].G, c[0, 1].G, c[0, 2].G, c[1, 0].G, c[1, 1].G,
+ c[1, 2].G, c[2, 0].G, c[2, 1].G, c[2, 2].G);
+ int blue = Median(c[0, 0].B, c[0, 1].B, c[0, 2].B, c[1, 0].B, c[1, 1].B, c[1, 2].B,
+ c[2, 0].B, c[2, 1].B, c[2, 2].B);
+ i2.SetPixel(column, row, Color.FromArgb(red, green, blue));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Perform a Box filter using a 5x5 Mask
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap Box5x5(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 2; column < i.Bitmap.Width - 2; column++)
+ {
+ for (int row = 2; row < i.Bitmap.Height - 2; row++)
+ {
+ Color[,] c = i.Get5x5(row, column);
+ int red = (c[0, 0].R + c[0, 1].R + c[0, 2].R + c[0, 3].R + c[0, 4].R + c[1, 0].R
+ + c[1, 1].R + c[1, 2].R + c[1, 3].R + c[1, 4].R + c[2, 0].R + c[2, 1].R
+ + c[2, 2].R + c[2, 3].R + c[2, 4].R + c[3, 0].R + c[3, 1].R + c[3, 2].R
+ + c[3, 3].R + c[3, 4].R + c[4, 0].R + c[4, 1].R + c[4, 2].R + c[4, 3].R
+ + c[4, 4].R) / 25;
+ int green = (c[0, 0].G + c[0, 1].G + c[0, 2].G + c[0, 3].G + c[0, 4].G + c[1, 0].G
+ + c[1, 1].G + c[1, 2].G + c[1, 3].G + c[1, 4].G + c[2, 0].G + c[2, 1].G
+ + c[2, 2].G + c[2, 3].G + c[2, 4].G + c[3, 0].G + c[3, 1].G + c[3, 2].G
+ + c[3, 3].G + c[3, 4].G + c[4, 0].G + c[4, 1].G + c[4, 2].G + c[4, 3].G
+ + c[4, 4].G) / 25;
+ int blue = (c[0, 0].B + c[0, 1].B + c[0, 2].B + c[0, 3].B + c[0, 4].B + c[1, 0].B
+ + c[1, 1].B + c[1, 2].B + c[1, 3].B + c[1, 4].B + c[2, 0].B + c[2, 1].B
+ + c[2, 2].B + c[2, 3].B + c[2, 4].B + c[3, 0].B + c[3, 1].B + c[3, 2].B
+ + c[3, 3].B + c[3, 4].B + c[4, 0].B + c[4, 1].B + c[4, 2].B + c[4, 3].B
+ + c[4, 4].B) / 25;
+ i2.SetPixel(column, row, Color.FromArgb(red, green, blue));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Perform a Binomial filter using a 5x5 Mask
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap Binomial5x5(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 2; column < i.Bitmap.Width - 2; column++)
+ {
+ for (int row = 2; row < i.Bitmap.Height - 2; row++)
+ {
+ Color[,] c = i.Get5x5(row, column);
+ int red = ((c[0, 0].R * 1) + (c[0, 1].R * 4) + (c[0, 2].R * 6) + (c[0, 3].R * 4)
+ + (c[0, 4].R * 1) + (c[1, 0].R * 4) + (c[1, 1].R * 16) + (c[1, 2].R * 24)
+ + (c[1, 3].R * 16) + (c[1, 4].R * 4) + (c[2, 0].R * 6) + (c[2, 1].R * 24)
+ + (c[2, 2].R * 36) + (c[2, 3].R * 24) + (c[2, 4].R * 6) + (c[3, 0].R * 4)
+ + (c[3, 1].R * 16) + (c[3, 2].R * 24) + (c[3, 3].R * 16) + (c[3, 4].R * 4)
+ + (c[4, 0].R * 1) + (c[4, 1].R * 4) + (c[4, 2].R * 6) + (c[4, 3].R * 4)
+ + (c[4, 4].R * 1)) / 256;
+ int green = ((c[0, 0].G * 1) + (c[0, 1].G * 4) + (c[0, 2].G * 6) + (c[0, 3].G * 4)
+ + (c[0, 4].G * 1) + (c[1, 0].G * 4) + (c[1, 1].G * 16) + (c[1, 2].G * 24)
+ + (c[1, 3].G * 16) + (c[1, 4].G * 4) + (c[2, 0].G * 6) + (c[2, 1].G * 24)
+ + (c[2, 2].G * 36) + (c[2, 3].G * 24) + (c[2, 4].G * 6) + (c[3, 0].G * 4)
+ + (c[3, 1].G * 16) + (c[3, 2].G * 24) + (c[3, 3].G * 16) + (c[3, 4].G * 4)
+ + (c[4, 0].G * 1) + (c[4, 1].G * 4) + (c[4, 2].G * 6) + (c[4, 3].G * 4)
+ + (c[4, 4].G * 1)) / 256;
+ int blue = ((c[0, 0].B * 1) + (c[0, 1].B * 4) + (c[0, 2].B * 6) + (c[0, 3].B * 4)
+ + (c[0, 4].B * 1) + (c[1, 0].B * 4) + (c[1, 1].B * 16) + (c[1, 2].B * 24)
+ + (c[1, 3].B * 16) + (c[1, 4].B * 4) + (c[2, 0].B * 6) + (c[2, 1].B * 24)
+ + (c[2, 2].B * 36) + (c[2, 3].B * 24) + (c[2, 4].B * 6) + (c[3, 0].B * 4)
+ + (c[3, 1].B * 16) + (c[3, 2].B * 24) + (c[3, 3].B * 16) + (c[3, 4].B * 4)
+ + (c[4, 0].B * 1) + (c[4, 1].B * 4) + (c[4, 2].B * 6) + (c[4, 3].B * 4)
+ + (c[4, 4].B * 1)) / 256;
+ i2.SetPixel(column, row, Color.FromArgb(red, green, blue));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Perform a Median fiter using a 5x5 Mask
+ ///
+ /// Image to Process
+ /// Filtered Image
+ public static Bitmap Median5x5(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ ImagerBitmap i2 = new ImagerBitmap(b.Clone() as Bitmap);
+ for (int column = 2; column < i.Bitmap.Width - 2; column++)
+ {
+ for (int row = 2; row < i.Bitmap.Height - 2; row++)
+ {
+ Color[,] c = i.Get5x5(row, column);
+ int red = Median(c[0, 0].R, c[0, 1].R, c[0, 2].R, c[0, 3].R, c[0, 4].R, c[1, 0].R,
+ c[1, 1].R, c[1, 2].R, c[1, 3].R, c[1, 4].R, c[2, 0].R, c[2, 1].R, c[2, 2].R,
+ c[2, 3].R, c[2, 4].R, c[3, 0].R, c[3, 1].R, c[3, 2].R, c[3, 3].R, c[3, 4].R,
+ c[4, 0].R, c[4, 1].R, c[4, 2].R, c[4, 3].R, c[4, 4].R);
+ int green = Median(c[0, 0].G, c[0, 1].G, c[0, 2].G, c[0, 3].G, c[0, 4].G, c[1, 0].G,
+ c[1, 1].G, c[1, 2].G, c[1, 3].G, c[1, 4].G, c[2, 0].G, c[2, 1].G, c[2, 2].G,
+ c[2, 3].G, c[2, 4].G, c[3, 0].G, c[3, 1].G, c[3, 2].G, c[3, 3].G, c[3, 4].G,
+ c[4, 0].G, c[4, 1].G, c[4, 2].G, c[4, 3].G, c[4, 4].G);
+ int blue = Median(c[0, 0].B, c[0, 1].B, c[0, 2].B, c[0, 3].B, c[0, 4].B, c[1, 0].B,
+ c[1, 1].B, c[1, 2].B, c[1, 3].B, c[1, 4].B, c[2, 0].B, c[2, 1].B, c[2, 2].B,
+ c[2, 3].B, c[2, 4].B, c[3, 0].B, c[3, 1].B, c[3, 2].B, c[3, 3].B, c[3, 4].B,
+ c[4, 0].B, c[4, 1].B, c[4, 2].B, c[4, 3].B, c[4, 4].B);
+ i2.SetPixel(column, row, Color.FromArgb(red, green, blue));
+ }
+ }
+ i.UnlockBitmap();
+ i2.UnlockBitmap();
+ return i2.Bitmap.Clone() as Bitmap;
+ }
+ ///
+ /// Find the Median value in an array of int's
+ ///
+ /// Array of values
+ /// Median value
+ private static int Median(params int[] values)
+ {
+ Array.Sort(values);
+ return values[((values.Length - 1) / 2) + 1];
+ }
+ ///
+ /// Resize an image
+ ///
+ /// Image to resize
+ /// Width in pixels
+ /// Height in pixels
+ /// New Image
+ public static Bitmap Resize(Bitmap b, int width, int height)
+ {
+ Bitmap b2 = new Bitmap(width, height, PixelFormat.Format24bppRgb);
+ Graphics g = Graphics.FromImage(b2);
+ g.DrawImage(b, new Rectangle(0, 0, width, height), 0, 0, b.Width, b.Height,
+ GraphicsUnit.Pixel);
+ g.Dispose();
+ return b2;
+ }
+ ///
+ /// Generate a greyscale histogram chart from the bitmap
+ ///
+ /// Image to use
+ /// Histogram chart
+ /*public static Bitmap GenerateGreyscaleHistogram(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ double[] histogram = new double[256];
+ string[] lbls = new string[256];
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ histogram[i.GetGreyPixel(column, row)]++;
+ }
+ }
+ i.UnlockBitmap();
+ for (int j = 0; j < 256; j++)
+ {
+ if ((j % 30) == 0)
+ {
+ lbls[j] = j.ToString();
+ }
+ else
+ {
+ lbls[j] = string.Empty;
+ }
+ }
+ XYChart c = new XYChart(b.Width + 60, b.Height + 60);
+ c.setPlotArea(40, 40, b.Width - 20, b.Height - 20);
+ c.addTitle("Greyscale Historgram", "Arial Bold", 10).setBackground(
+ Chart.metalColor(0x9999ff), -1, 1);
+ c.addBarLayer(histogram);
+ c.xAxis().setLabels(lbls);
+ return c.makeImage() as Bitmap;
+ }*/
+ ///
+ /// Generate a histogram chart from the bitmap
+ ///
+ /// Image to use
+ /// Histogram chart
+ /* public static Bitmap GenerateHistogram(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ double[] histogram = new double[64];
+ string[] lbls = new string[64];
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ histogram[i.GetRGBHistogramValue(column, row)]++;
+ }
+ }
+ i.UnlockBitmap();
+ for (int j = 0; j < 64; j++)
+ {
+ if ((j % 10) == 0)
+ {
+ lbls[j] = j.ToString();
+ }
+ else
+ {
+ lbls[j] = string.Empty;
+ }
+ }
+ XYChart c = new XYChart(b.Width + 60, b.Height + 60);
+ c.setPlotArea(40, 40, b.Width - 20, b.Height - 20);
+ c.addTitle("Color Historgram", "Arial Bold", 10).setBackground(
+ Chart.metalColor(0x9999ff), -1, 1);
+ c.addBarLayer(histogram);
+ c.xAxis().setLabels(lbls);
+ return c.makeImage() as Bitmap;
+ }*/
+ ///
+ /// Generate a Chart of a Scan line
+ ///
+ /// Image to use
+ /// Row to use
+ /// Scan Line Chart
+ /*public static Bitmap GenerateScanLineChart(Bitmap b, int row)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ double[] luminance = new double[b.Width];
+ string[] lbls = new string[b.Width];
+ double max = double.MinValue;
+ double min = double.MaxValue;
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ luminance[column] = i.GetGreyPixel(column, row);
+ if (luminance[column] > max) max = luminance[column];
+ if (luminance[column] < min) min = luminance[column];
+ if ((column % 40) == 0)
+ {
+ lbls[column] = column.ToString();
+ }
+ else
+ {
+ lbls[column] = string.Empty;
+ }
+ }
+ i.UnlockBitmap();
+ XYChart c = new XYChart(b.Width + 60, b.Height + 60);
+ c.setPlotArea(40, 40, b.Width - 20, b.Height - 20);
+ c.addTitle(string.Format("Pixel Luminance for Scan Line {0}, STF {1:0.00}",
+ row.ToString(),
+ (max - min) / (max + min)), "Arial Bold", 10).setBackground(
+ Chart.metalColor(0x9999ff), -1, 1);
+ c.addLineLayer(luminance);
+ c.xAxis().setLabels(lbls);
+ return c.makeImage() as Bitmap;
+ }*/
+ ///
+ /// Generate a Chart of a Vertical Scan line
+ ///
+ /// Image to use
+ /// Column to use
+ /// Scan Line Chart
+ /*public static Bitmap GenerateVerticalScanLineChart(Bitmap b, int col)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ double[] luminance = new double[b.Height];
+ string[] lbls = new string[b.Height];
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ luminance[row] = i.GetGreyPixel(col, row);
+ if ((row % 40) == 0)
+ {
+ lbls[row] = row.ToString();
+ }
+ else
+ {
+ lbls[row] = string.Empty;
+ }
+ }
+ i.UnlockBitmap();
+ XYChart c = new XYChart(b.Width + 60, b.Height + 60);
+ c.setPlotArea(40, 40, b.Width - 20, b.Height - 20);
+ c.addTitle("Pixel Luminance for Vertical Scan Line " + col.ToString(),
+ "Arial Bold", 10).setBackground(
+ Chart.metalColor(0x9999ff), -1, 1);
+ c.addLineLayer(luminance);
+ c.xAxis().setLabels(lbls);
+ return c.makeImage() as Bitmap;
+ }*/
+ public static void GenerateExcelFile(Bitmap b)
+ {
+ ImagerBitmap i = new ImagerBitmap(b.Clone() as Bitmap);
+ string fileName = "output.txt";
+ int f = 0;
+ using (StreamWriter sw = new StreamWriter(fileName, false))
+ {
+ sw.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}", "Index", "Row", "Column", "Red",
+ "Green", "Blue", "Gray");
+ for (int column = 0; column < i.Bitmap.Width; column++)
+ {
+ for (int row = 0; row < i.Bitmap.Height; row++)
+ {
+ f++;
+ Color c = i.GetPixel(column, row);
+ int g = i.GetGreyPixel(column, row);
+ sw.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}", f,
+ row, column, c.R, c.G, c.B, g);
+ }
+ }
+ }
+ i.UnlockBitmap();
+ System.Diagnostics.Process.Start(fileName);
+ }
+
+ public void Dispose()
+ {
+ UnlockBitmap();
+ }
+
+ public void Line(float x, float y, float x2, float y2, Color color)
+ {
+ Line((int)x, (int)y, (int)x2, (int)y2, color);
+ }
+ public void Line(int x, int y, int x2, int y2, Color color)
+ {
+ int w = x2 - x;
+ int h = y2 - y;
+ int dx1 = 0, dy1 = 0, dx2 = 0, dy2 = 0;
+ if (w < 0) dx1 = -1; else if (w > 0) dx1 = 1;
+ if (h < 0) dy1 = -1; else if (h > 0) dy1 = 1;
+ if (w < 0) dx2 = -1; else if (w > 0) dx2 = 1;
+ int longest = Math.Abs(w);
+ int shortest = Math.Abs(h);
+ if (!(longest > shortest))
+ {
+ longest = Math.Abs(h);
+ shortest = Math.Abs(w);
+ if (h < 0) dy2 = -1; else if (h > 0) dy2 = 1;
+ dx2 = 0;
+ }
+ int numerator = longest >> 1;
+ for (int i = 0; i <= longest; i++)
+ {
+ SetPixel(x, y, color);
+ numerator += shortest;
+ if (!(numerator < longest))
+ {
+ numerator -= longest;
+ x += dx1;
+ y += dy1;
+ }
+ else
+ {
+ x += dx2;
+ y += dy2;
+ }
+ }
+ }
+
+ public void PolyClosed(List path, Color c)
+ {
+ if (path.Count == 0) return;
+ if (path.Count == 1)
+ {
+ SetPixel(path[0].X, path[0].Y, c);
+ return;
+ }
+
+ Poly(path, c);
+
+ var from1 = path[0];
+ var to1 = path.Last();
+ Line(from1.X, from1.Y, to1.X, to1.Y, c);
+ }
+
+ public void Poly(List path, Color c)
+ {
+ if (path.Count == 0) return;
+ if (path.Count == 1)
+ {
+ SetPixel(path[0].X, path[0].Y, c);
+ return;
+ }
+
+ for (int i = 1; i < path.Count; i++)
+ {
+ var from = path[i];
+ var to = path[i - 1];
+ Line(from.X, from.Y, to.X, to.Y, c);
+ }
+ }
+
+ public void Cross(float x, float y, float width, Color green)
+ {
+ Line(x - width, y - width, x + width, y + width, green);
+ Line(x - width, y + width, x + width, y - width, green);
+ }
+ }
+
+}
diff --git a/Labs/D1/D1/D1.csproj b/Labs/D1/D1/D1.csproj
new file mode 100644
index 0000000..d0bd7cf
--- /dev/null
+++ b/Labs/D1/D1/D1.csproj
@@ -0,0 +1,94 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {5E3545B6-1D3D-44A8-916C-88D7AED368F4}
+ WinExe
+ Properties
+ D1
+ D1
+ v4.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+ true
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Form1.cs
+
+
+
+
+ Form1.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/D1/D1/Form1.Designer.cs b/Labs/D1/D1/Form1.Designer.cs
new file mode 100644
index 0000000..30302dc
--- /dev/null
+++ b/Labs/D1/D1/Form1.Designer.cs
@@ -0,0 +1,141 @@
+namespace D1
+{
+ partial class Form1
+ {
+ ///
+ /// Требуется переменная конструктора.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Освободить все используемые ресурсы.
+ ///
+ /// истинно, если управляемый ресурс должен быть удален; иначе ложно.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Код, автоматически созданный конструктором форм Windows
+
+ ///
+ /// Обязательный метод для поддержки конструктора - не изменяйте
+ /// содержимое данного метода при помощи редактора кода.
+ ///
+ private void InitializeComponent()
+ {
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.button5 = new System.Windows.Forms.Button();
+ this.button6 = new System.Windows.Forms.Button();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Image = global::D1.Properties.Resources.Lenna;
+ this.pictureBox1.Location = new System.Drawing.Point(12, 12);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(529, 518);
+ this.pictureBox1.TabIndex = 0;
+ this.pictureBox1.TabStop = false;
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(556, 12);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(114, 23);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "Graysacale (Not real)";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(556, 41);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(114, 23);
+ this.button2.TabIndex = 2;
+ this.button2.Text = "Gauss";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(556, 283);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(114, 23);
+ this.button3.TabIndex = 3;
+ this.button3.Text = "Back to origin";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(556, 70);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(114, 23);
+ this.button4.TabIndex = 4;
+ this.button4.Text = "Median";
+ this.button4.UseVisualStyleBackColor = true;
+ this.button4.Click += new System.EventHandler(this.button4_Click);
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(556, 99);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(114, 23);
+ this.button5.TabIndex = 5;
+ this.button5.Text = "Noise";
+ this.button5.UseVisualStyleBackColor = true;
+ this.button5.Click += new System.EventHandler(this.button5_Click);
+ //
+ // button6
+ //
+ this.button6.Location = new System.Drawing.Point(556, 175);
+ this.button6.Name = "button6";
+ this.button6.Size = new System.Drawing.Size(114, 23);
+ this.button6.TabIndex = 6;
+ this.button6.Text = "MakeBeautiful";
+ this.button6.UseVisualStyleBackColor = true;
+ this.button6.Click += new System.EventHandler(this.button6_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(692, 586);
+ this.Controls.Add(this.button6);
+ this.Controls.Add(this.button5);
+ this.Controls.Add(this.button4);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.pictureBox1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.Load += new System.EventHandler(this.Form1_Load);
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.PictureBox pictureBox1;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button4;
+ private System.Windows.Forms.Button button5;
+ private System.Windows.Forms.Button button6;
+ }
+}
+
diff --git a/Labs/D1/D1/Form1.cs b/Labs/D1/D1/Form1.cs
new file mode 100644
index 0000000..ab368e5
--- /dev/null
+++ b/Labs/D1/D1/Form1.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using System.Threading;
+
+namespace D1
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ var bmp = pictureBox1.Image as Bitmap;
+
+ using(var img = new ImagerBitmap(bmp))
+ {
+ for (int x = 0; x < img.Width; x++)
+ for (int y = 0; y < img.Height; y++)
+ {
+ var px = img.GetPixel(x, y);
+ var intensity = px.R + px.B + px.G;
+ intensity /= 3;
+ Color newColor = Color.FromArgb(intensity, intensity, intensity);
+ img.SetPixel(x,y,newColor);
+ }
+
+ pictureBox1.Image = img.Bitmap;
+ }
+ }
+
+ private void gauss()
+ {
+ var bmp = pictureBox1.Image as Bitmap;
+
+ using (var img = new ImagerBitmap(bmp))
+ {
+ int gaussWidth = 5;
+ for (int x = gaussWidth; x < img.Width - 5; x++)
+ for (int y = gaussWidth; y < img.Height - 5; y++)
+ {
+ int R = 0, G = 0, B = 0, count = 0;
+
+ for (int x1 = x - gaussWidth; x1 <= x + gaussWidth; x1++)
+ for (int y1 = y - gaussWidth; y1 <= y + gaussWidth; y1++)
+ {
+ var c = img.GetPixel(x1, y1);
+ count++;
+ R += c.R;
+ G += c.G;
+ B += c.B;
+ }
+ img.SetPixel(x, y, Color.FromArgb(R / count, G / count, B / count));
+ }
+
+ pictureBox1.Image = img.Bitmap;
+ }
+ }
+ private void button2_Click(object sender, EventArgs e)
+ {
+ new Thread(gauss).Start();
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ pictureBox1.Image = origin.Clone() as Bitmap;
+ }
+
+ Bitmap origin;
+ private void Form1_Load(object sender, EventArgs e)
+ {
+ origin = pictureBox1.Image.Clone() as Bitmap;
+ }
+
+ private void button4_Click(object sender, EventArgs e)
+ {
+ var bmp = pictureBox1.Image as Bitmap;
+ var dst = bmp.Clone() as Bitmap;
+
+ using (var img = new ImagerBitmap(bmp))
+ using (var imgDst = new ImagerBitmap(dst))
+ {
+ int gaussWidth = 1;
+ for (int x = gaussWidth; x < img.Width - 5; x++)
+ for (int y = gaussWidth; y < img.Height - 5; y++)
+ {
+ List neibourghs = new List();
+
+ for (int x1 = x - gaussWidth; x1 <= x + gaussWidth; x1++)
+ for (int y1 = y - gaussWidth; y1 <= y + gaussWidth; y1++)
+ {
+ var c = img.GetPixel(x1, y1);
+ neibourghs.Add(new MedianPixel(c));
+ }
+
+ var newColor = neibourghs.OrderBy(n => n.Intensity).Skip(neibourghs.Count / 2).First().Color;
+
+ imgDst.SetPixel(x, y, newColor);
+ }
+
+ pictureBox1.Image = imgDst.Bitmap;
+ }
+ }
+
+ private void button5_Click(object sender, EventArgs e)
+ {
+ var bmp = pictureBox1.Image as Bitmap;
+
+ Random rnd = new Random();
+
+ using (var img = new ImagerBitmap(bmp))
+ {
+ for (int x = 0; x < img.Width; x++)
+ for (int y = 0; y < img.Height; y++)
+ {
+ if (rnd.Next(6000) == 555)
+ img.SetPixel(x, y, Color.Red);
+ if (rnd.Next(6000) == 556)
+ img.SetPixel(x, y, Color.Blue);
+ if (rnd.Next(6000) == 557)
+ img.SetPixel(x, y, Color.Green);
+ if (rnd.Next(6000) == 556)
+ img.SetPixel(x, y, Color.Black);
+ if (rnd.Next(6000) == 557)
+ img.SetPixel(x, y, Color.White);
+ }
+
+ pictureBox1.Image = img.Bitmap;
+ }
+ }
+ static int cl(double a)
+ {
+ int aa = (int)a;
+ if (aa <= 0)
+ return 0;
+ if (aa >= 255)
+ return 255;
+ return aa;
+ }
+ private void button6_Click(object sender, EventArgs e)
+ {
+ var bmp = pictureBox1.Image as Bitmap;
+
+ using (var img = new ImagerBitmap(bmp))
+ {
+ for (int x = 0; x < img.Width; x++)
+ for (int y = 0; y < img.Height; y++)
+ {
+ Color c = img.GetPixel(x,y);
+ img.SetPixel(x, y, Color.FromArgb(c.R, 0, c.B));
+ }
+
+ pictureBox1.Image = img.Bitmap;
+ }
+
+ }
+ }
+
+ class MedianPixel
+ {
+ public MedianPixel(Color c)
+ {
+ Color = c;
+ Intensity = (c.R + c.B + c.G) / 3.0;
+ }
+ public double Intensity { get; set; }
+ public Color Color { get; set; }
+ }
+}
diff --git a/Labs/D1/D1/Form1.resx b/Labs/D1/D1/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Labs/D1/D1/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Labs/D1/D1/Program.cs b/Labs/D1/D1/Program.cs
new file mode 100644
index 0000000..10def35
--- /dev/null
+++ b/Labs/D1/D1/Program.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace D1
+{
+ static class Program
+ {
+ ///
+ /// Главная точка входа для приложения.
+ ///
+ [STAThread]
+ static void Main()
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ }
+ }
+}
diff --git a/Labs/D1/D1/Properties/AssemblyInfo.cs b/Labs/D1/D1/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..e3b628c
--- /dev/null
+++ b/Labs/D1/D1/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Управление общими сведениями о сборке осуществляется с помощью
+// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
+// связанные со сборкой.
+[assembly: AssemblyTitle("D1")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("D1")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми
+// для COM-компонентов. Если требуется обратиться к типу в этой сборке через
+// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
+[assembly: ComVisible(false)]
+
+// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
+[assembly: Guid("4b9cb919-b208-46f3-bd3d-20c758ffd9d3")]
+
+// Сведения о версии сборки состоят из следующих четырех значений:
+//
+// Основной номер версии
+// Дополнительный номер версии
+// Номер сборки
+// Редакция
+//
+// Можно задать все значения или принять номера сборки и редакции по умолчанию
+// используя "*", как показано ниже:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Labs/D1/D1/Properties/Resources.Designer.cs b/Labs/D1/D1/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..b6f5fa9
--- /dev/null
+++ b/Labs/D1/D1/Properties/Resources.Designer.cs
@@ -0,0 +1,73 @@
+//------------------------------------------------------------------------------
+//
+// Этот код создан программой.
+// Исполняемая версия:4.0.30319.34014
+//
+// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+// повторной генерации кода.
+//
+//------------------------------------------------------------------------------
+
+namespace D1.Properties {
+ using System;
+
+
+ ///
+ /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д.
+ ///
+ // Этот класс создан автоматически классом StronglyTypedResourceBuilder
+ // с помощью такого средства, как ResGen или Visual Studio.
+ // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen
+ // с параметром /str или перестройте свой проект VS.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("D1.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Перезаписывает свойство CurrentUICulture текущего потока для всех
+ /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Поиск локализованного ресурса типа System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap Lenna {
+ get {
+ object obj = ResourceManager.GetObject("Lenna", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/Labs/D1/D1/Properties/Resources.resx b/Labs/D1/D1/Properties/Resources.resx
new file mode 100644
index 0000000..923cbc6
--- /dev/null
+++ b/Labs/D1/D1/Properties/Resources.resx
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ ..\Resources\Lenna.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
\ No newline at end of file
diff --git a/Labs/D1/D1/Properties/Settings.Designer.cs b/Labs/D1/D1/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..a0d687c
--- /dev/null
+++ b/Labs/D1/D1/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.34014
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace D1.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Labs/D1/D1/Properties/Settings.settings b/Labs/D1/D1/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/Labs/D1/D1/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Labs/D1/D1/Resources/Lenna.png b/Labs/D1/D1/Resources/Lenna.png
new file mode 100644
index 0000000..59ef68a
Binary files /dev/null and b/Labs/D1/D1/Resources/Lenna.png differ
diff --git a/Labs/D1/D1/bin/Debug/D1.exe b/Labs/D1/D1/bin/Debug/D1.exe
new file mode 100644
index 0000000..97ad913
Binary files /dev/null and b/Labs/D1/D1/bin/Debug/D1.exe differ
diff --git a/Labs/D1/D1/bin/Debug/D1.exe.config b/Labs/D1/D1/bin/Debug/D1.exe.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/D1/D1/bin/Debug/D1.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/D1/D1/bin/Debug/D1.pdb b/Labs/D1/D1/bin/Debug/D1.pdb
new file mode 100644
index 0000000..88b6657
Binary files /dev/null and b/Labs/D1/D1/bin/Debug/D1.pdb differ
diff --git a/Labs/D1/D1/bin/Debug/D1.vshost.exe b/Labs/D1/D1/bin/Debug/D1.vshost.exe
new file mode 100644
index 0000000..666c0af
Binary files /dev/null and b/Labs/D1/D1/bin/Debug/D1.vshost.exe differ
diff --git a/Labs/D1/D1/bin/Debug/D1.vshost.exe.config b/Labs/D1/D1/bin/Debug/D1.vshost.exe.config
new file mode 100644
index 0000000..8e15646
--- /dev/null
+++ b/Labs/D1/D1/bin/Debug/D1.vshost.exe.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Labs/D1/D1/bin/Debug/D1.vshost.exe.manifest b/Labs/D1/D1/bin/Debug/D1.vshost.exe.manifest
new file mode 100644
index 0000000..061c9ca
--- /dev/null
+++ b/Labs/D1/D1/bin/Debug/D1.vshost.exe.manifest
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Labs/D1/D1/obj/Debug/D1.Form1.resources b/Labs/D1/D1/obj/Debug/D1.Form1.resources
new file mode 100644
index 0000000..6c05a97
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/D1.Form1.resources differ
diff --git a/Labs/D1/D1/obj/Debug/D1.Properties.Resources.resources b/Labs/D1/D1/obj/Debug/D1.Properties.Resources.resources
new file mode 100644
index 0000000..d62c476
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/D1.Properties.Resources.resources differ
diff --git a/Labs/D1/D1/obj/Debug/D1.csproj.FileListAbsolute.txt b/Labs/D1/D1/obj/Debug/D1.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000..6b4451e
--- /dev/null
+++ b/Labs/D1/D1/obj/Debug/D1.csproj.FileListAbsolute.txt
@@ -0,0 +1,45 @@
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\bin\Debug\D1.exe.config
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\obj\Debug\D1.csprojResolveAssemblyReference.cache
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\obj\Debug\D1.Properties.Resources.resources
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\obj\Debug\D1.csproj.GenerateResource.Cache
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\bin\Debug\D1.exe
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\bin\Debug\D1.pdb
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\obj\Debug\D1.exe
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\obj\Debug\D1.pdb
+c:\users\student\documents\visual studio 2013\Projects\D1\D1\obj\Debug\D1.Form1.resources
+C:\Users\student\Desktop\D1\D1\bin\Debug\D1.exe.config
+C:\Users\student\Desktop\D1\D1\obj\Debug\D1.exe
+C:\Users\student\Desktop\D1\D1\obj\Debug\D1.pdb
+C:\Users\student\Desktop\D1\D1\bin\Debug\D1.exe
+C:\Users\student\Desktop\D1\D1\bin\Debug\D1.pdb
+C:\Users\student\Desktop\D1\D1\obj\Debug\D1.csprojResolveAssemblyReference.cache
+C:\Users\student\Desktop\D1\D1\obj\Debug\D1.Form1.resources
+C:\Users\student\Desktop\D1\D1\obj\Debug\D1.Properties.Resources.resources
+C:\Users\student\Desktop\D1\D1\obj\Debug\D1.csproj.GenerateResource.Cache
+C:\Users\Лёха\Desktop\D1\D1\bin\Debug\D1.exe.config
+C:\Users\Лёха\Desktop\D1\D1\obj\Debug\D1.exe
+C:\Users\Лёха\Desktop\D1\D1\obj\Debug\D1.pdb
+C:\Users\Лёха\Desktop\D1\D1\bin\Debug\D1.exe
+C:\Users\Лёха\Desktop\D1\D1\bin\Debug\D1.pdb
+C:\Users\Лёха\Desktop\D1\D1\obj\Debug\D1.csprojResolveAssemblyReference.cache
+C:\Users\Лёха\Desktop\D1\D1\obj\Debug\D1.Form1.resources
+C:\Users\Лёха\Desktop\D1\D1\obj\Debug\D1.Properties.Resources.resources
+C:\Users\Лёха\Desktop\D1\D1\obj\Debug\D1.csproj.GenerateResource.Cache
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\bin\Debug\D1.exe.config
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\obj\Debug\D1.exe
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\obj\Debug\D1.pdb
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\bin\Debug\D1.exe
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\bin\Debug\D1.pdb
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\obj\Debug\D1.csprojResolveAssemblyReference.cache
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\obj\Debug\D1.Form1.resources
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\obj\Debug\D1.Properties.Resources.resources
+C:\Users\Лёха\Desktop\prog2015\LYOSHINI LABI\D1\D1\obj\Debug\D1.csproj.GenerateResource.Cache
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\bin\Debug\D1.exe.config
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\obj\Debug\D1.exe
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\obj\Debug\D1.pdb
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\bin\Debug\D1.exe
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\bin\Debug\D1.pdb
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\obj\Debug\D1.csprojResolveAssemblyReference.cache
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\obj\Debug\D1.Form1.resources
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\obj\Debug\D1.Properties.Resources.resources
+C:\Users\user\Desktop\prog2015-master\LYOSHINI LABI\D1\D1\obj\Debug\D1.csproj.GenerateResource.Cache
diff --git a/Labs/D1/D1/obj/Debug/D1.csproj.GenerateResource.Cache b/Labs/D1/D1/obj/Debug/D1.csproj.GenerateResource.Cache
new file mode 100644
index 0000000..cc23c6d
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/D1.csproj.GenerateResource.Cache differ
diff --git a/Labs/D1/D1/obj/Debug/D1.csprojResolveAssemblyReference.cache b/Labs/D1/D1/obj/Debug/D1.csprojResolveAssemblyReference.cache
new file mode 100644
index 0000000..92aeda2
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/D1.csprojResolveAssemblyReference.cache differ
diff --git a/Labs/D1/D1/obj/Debug/D1.exe b/Labs/D1/D1/obj/Debug/D1.exe
new file mode 100644
index 0000000..97ad913
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/D1.exe differ
diff --git a/Labs/D1/D1/obj/Debug/D1.pdb b/Labs/D1/D1/obj/Debug/D1.pdb
new file mode 100644
index 0000000..88b6657
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/D1.pdb differ
diff --git a/Labs/D1/D1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Labs/D1/D1/obj/Debug/DesignTimeResolveAssemblyReferences.cache
new file mode 100644
index 0000000..3ba8ec4
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
diff --git a/Labs/D1/D1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Labs/D1/D1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
new file mode 100644
index 0000000..31a5ade
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ
diff --git a/Labs/D1/D1/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/Labs/D1/D1/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
new file mode 100644
index 0000000..e565ac4
Binary files /dev/null and b/Labs/D1/D1/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll differ
diff --git a/Labs/D1/D1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/Labs/D1/D1/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/D1/D1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/Labs/D1/D1/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
new file mode 100644
index 0000000..e69de29
diff --git a/Labs/D1/D1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/Labs/D1/D1/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
new file mode 100644
index 0000000..e69de29
diff --git a/List/Ti-Rex.txt b/List/Ti-Rex.txt
new file mode 100644
index 0000000..75a7457
--- /dev/null
+++ b/List/Ti-Rex.txt
@@ -0,0 +1,9 @@
+
+-230401
+
+1 -
+2 -
+1 -
+D1 -
+
+ : 4
\ No newline at end of file