commit 1d16eeacb2a19da3dc10bd621b250c2cbbd09e03 Author: user Date: Sun Jul 12 16:06:18 2026 +0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a01d25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Visual Studio +.vs/ +*.suo +*.user +*.userosscache +*.sln.docstates + +# Build results +[Bb]in/ +[Oo]bj/ +Debug/ +Release/ +x64/ +x86/ + +# Visual Studio cache +.vscode/ +.idea/ + +# ReSharper +_ReSharper*/ +*.ReSharper* + +# Logs +*.log + +# Temporary files +*.tmp +*.temp +*.cache + +# Generated files +*.pdb +*.dll +*.exe + +# Test results +TestResults/ +*.trx + +# NuGet packages +packages/ +*.nupkg + +# MS Access temporary files +*.laccdb +*.ldb + +# User-specific settings +*.user +*.suo + +# Database backups +*.bak +*.backup + +# OS files +.DS_Store +Thumbs.db + +# Publish files +Publish/ +*.publish.xml + +# Keep database file +!Database.accdb diff --git a/Database.accdb b/Database.accdb new file mode 100644 index 0000000..43319ac Binary files /dev/null and b/Database.accdb differ diff --git a/Database.sln b/Database.sln new file mode 100644 index 0000000..7fd9a53 --- /dev/null +++ b/Database.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.33130.400 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Database", "Database\Database.csproj", "{BAF17228-60DE-4081-A24F-F6DD8A12C06A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Debug|x64.ActiveCfg = Debug|x64 + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Debug|x64.Build.0 = Debug|x64 + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Release|Any CPU.Build.0 = Release|Any CPU + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Release|x64.ActiveCfg = Release|x64 + {BAF17228-60DE-4081-A24F-F6DD8A12C06A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D5EB1D96-D46B-4FBF-B2F5-859350FD64B0} + EndGlobalSection +EndGlobal diff --git a/Database/App.config b/Database/App.config new file mode 100644 index 0000000..5754728 --- /dev/null +++ b/Database/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Database/Database.csproj b/Database/Database.csproj new file mode 100644 index 0000000..3f21c8c --- /dev/null +++ b/Database/Database.csproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {BAF17228-60DE-4081-A24F-F6DD8A12C06A} + WinExe + Database + Database + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + true + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + true + + + + + + + + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + + + + + + + MainForm.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/Database/FishFood.cs b/Database/FishFood.cs new file mode 100644 index 0000000..292903d --- /dev/null +++ b/Database/FishFood.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Text; +using System.Windows.Forms; + +namespace Database +{ + class FishFood : OleDBDataGridViewHandler + { + public FishFood(DataGridView dataGridView) : base("fish_food", dataGridView) {} + public void Insert(String name) + { + (string, object) pair = ("data", name); + OleDBHandler.Insert(nameTable, pair); + RefreshView(); + } + public void Update(String name) + { + int id = CurrentId(); + if (id < 0) + return; + (string, object) pair = ("data", name); + OleDBHandler.Update(nameTable, id, pair); + RefreshView(); + } + } +} diff --git a/Database/FishRations.cs b/Database/FishRations.cs new file mode 100644 index 0000000..d14671b --- /dev/null +++ b/Database/FishRations.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Data.OleDb; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Database +{ + class FishRations : OleDBDataGridViewHandler + { + static OleDbCommand SelectCommand() + { + string command = "SELECT [FFF].[id], [FT].[data] AS [type], [FF].[data] AS [food]" + + "FROM [fish_types_fish_food] AS [FFF], [fish_types] AS [FT], [fish_food] AS [FF]" + + "WHERE [type_id] = [FT].[id] AND [food_id] = [FF].[id];"; + var result = new OleDbCommand(command, OleDBHandler.Connection); + return result; + } + public FishRations(DataGridView dataGridView) : base(SelectCommand(), "fish_types_fish_food", dataGridView) { } + public void Insert(int typeId, int foodId) + { + string command = "SELECT COUNT(*) FROM [fish_types_fish_food]" + + $"WHERE [type_id] = {typeId} AND [food_id] = {foodId};"; + var result = OleDBHandler.Execute(command, OleDBHandler.ExecuteType.Scalar); + if (Convert.ToInt32(result) > 0) + return; + (string, object) pair1 = ("type_id", typeId); + (string, object) pair2 = ("food_id", foodId); + OleDBHandler.Insert(nameTable, pair1, pair2); + RefreshView(); + } + } +} diff --git a/Database/FishTypes.cs b/Database/FishTypes.cs new file mode 100644 index 0000000..aa9ec02 --- /dev/null +++ b/Database/FishTypes.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Text; +using System.Windows.Forms; + +namespace Database +{ + class FishTypes : OleDBDataGridViewHandler + { + public FishTypes(DataGridView dataGridView) : base("fish_types", dataGridView) { } + public void Insert(String name) + { + (string, object) pair = ("data", name); + OleDBHandler.Insert(nameTable, pair); + RefreshView(); + } + public void Update(String name) + { + int id = CurrentId(); + if (id < 0) + return; + (string, object) pair = ("data", name); + OleDBHandler.Update(nameTable, id, pair); + RefreshView(); + } + } +} diff --git a/Database/Fishes.cs b/Database/Fishes.cs new file mode 100644 index 0000000..4c594b3 --- /dev/null +++ b/Database/Fishes.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Text; +using System.Windows.Forms; + +namespace Database +{ + class Fishes : OleDBDataGridViewHandler + { + static OleDbCommand SelectCommand() { + string command = + "SELECT [F].[id], [FT].[data] AS [type], [L].[data] AS [location], [F].[number]" + + "FROM[fishes] AS[F], [fish_types] AS[FT], [locations] AS[L]" + + "WHERE[type_id] = [FT].[id] AND[location_id] = [L].[id]"; + var result = new OleDbCommand(command, OleDBHandler.Connection); + return result; + } + public Fishes(DataGridView dataGridView) : base(SelectCommand(), "fishes", dataGridView) {} + private bool Exists(int typeId, int locationId) { + string command = "SELECT COUNT(*) FROM [fishes]" + + $"WHERE [type_id] = {typeId} AND [location_id] = {locationId};"; + var result = OleDBHandler.Execute(command, OleDBHandler.ExecuteType.Scalar); + if (Convert.ToInt32(result) > 0) + return true; + return false; + } + public void Insert(int number, int typeId, int locationId) { + if (Exists(typeId, locationId) == true) + return; + (string, object) pair1 = ("type_id", typeId); + (string, object) pair2 = ("location_id", locationId); + (string, object) pair3 = ("number", number); + OleDBHandler.Insert(nameTable, pair1, pair2, pair3); + RefreshView(); + } + public void Update(int number, int typeId, int locationId) { + if (Exists(typeId, locationId) == true) + return; + int id = CurrentId(); + if (id < 0) + return; + (string, object) pair1 = ("type_id", typeId); + (string, object) pair2 = ("location_id", locationId); + (string, object) pair3 = ("number", number); + OleDBHandler.Update(nameTable, id, pair1, pair2, pair3); + RefreshView(); + } + } +} diff --git a/Database/Locations.cs b/Database/Locations.cs new file mode 100644 index 0000000..4721893 --- /dev/null +++ b/Database/Locations.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Text; +using System.Windows.Forms; + +namespace Database +{ + class Locations : OleDBDataGridViewHandler + { + public Locations(DataGridView dataGridView) : base("locations", dataGridView) { } + public void Insert(String name) { + (string, object) pair = ("data", name); + OleDBHandler.Insert(nameTable, pair); + RefreshView(); + } + public void Update(String name) { + int id = CurrentId(); + if (id < 0) + return; + (string, object) pair = ("data", name); + OleDBHandler.Update(nameTable, id, pair); + RefreshView(); + } + } +} diff --git a/Database/MainForm.Designer.cs b/Database/MainForm.Designer.cs new file mode 100644 index 0000000..53c44f4 --- /dev/null +++ b/Database/MainForm.Designer.cs @@ -0,0 +1,1066 @@ + +namespace Database +{ + partial class MainForm + { + /// + /// 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.fishFoodRationsLabel = new System.Windows.Forms.Label(); + this.fishFoodRationsComboBox = new System.Windows.Forms.ComboBox(); + this.fishTypeRationsLabel = new System.Windows.Forms.Label(); + this.fishTypeRationsComboBox = new System.Windows.Forms.ComboBox(); + this.fishRationsDataGridView = new System.Windows.Forms.DataGridView(); + this.plantTypePlantslabel = new System.Windows.Forms.Label(); + this.plantTypePlantsComboBox = new System.Windows.Forms.ComboBox(); + this.deletePlantType = new System.Windows.Forms.Button(); + this.updatePlantType = new System.Windows.Forms.Button(); + this.addPlantType = new System.Windows.Forms.Button(); + this.plantTypeTextBox = new System.Windows.Forms.TextBox(); + this.plantTypelabel = new System.Windows.Forms.Label(); + this.plantTypesDataGridView = new System.Windows.Forms.DataGridView(); + this.numberPlantsNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.deletePlant = new System.Windows.Forms.Button(); + this.updatePlant = new System.Windows.Forms.Button(); + this.addPlant = new System.Windows.Forms.Button(); + this.numberPlantsLabel = new System.Windows.Forms.Label(); + this.locationPlantLabel = new System.Windows.Forms.Label(); + this.locationPlantsComboBox = new System.Windows.Forms.ComboBox(); + this.plantsDataGridView = new System.Windows.Forms.DataGridView(); + this.numberFishLabel = new System.Windows.Forms.Label(); + this.numberFishNumericUpDown = new System.Windows.Forms.NumericUpDown(); + this.deleteFish = new System.Windows.Forms.Button(); + this.updateFish = new System.Windows.Forms.Button(); + this.addFish = new System.Windows.Forms.Button(); + this.locationFishesLabel = new System.Windows.Forms.Label(); + this.locationFishComboBox = new System.Windows.Forms.ComboBox(); + this.deleteLocation = new System.Windows.Forms.Button(); + this.updateLocation = new System.Windows.Forms.Button(); + this.addLocation = new System.Windows.Forms.Button(); + this.locationTextBox = new System.Windows.Forms.TextBox(); + this.locationLabel = new System.Windows.Forms.Label(); + this.deleteFishType = new System.Windows.Forms.Button(); + this.updateFishType = new System.Windows.Forms.Button(); + this.addFishType = new System.Windows.Forms.Button(); + this.updateFishFood = new System.Windows.Forms.Button(); + this.deleteFishFood = new System.Windows.Forms.Button(); + this.addFishFood = new System.Windows.Forms.Button(); + this.fishFoodTextBox = new System.Windows.Forms.TextBox(); + this.fishFoodLabel = new System.Windows.Forms.Label(); + this.fishFoodDataGridView = new System.Windows.Forms.DataGridView(); + this.fishTypeTextBox = new System.Windows.Forms.TextBox(); + this.fishTypeLabel = new System.Windows.Forms.Label(); + this.fishTypeFishesLabel = new System.Windows.Forms.Label(); + this.fishTypeFishesComboBox = new System.Windows.Forms.ComboBox(); + this.locationsDataGridView = new System.Windows.Forms.DataGridView(); + this.fishTypesDataGridView = new System.Windows.Forms.DataGridView(); + this.fishesDataGridView = new System.Windows.Forms.DataGridView(); + this.locationsTopLabel = new System.Windows.Forms.Label(); + this.fishTypesTopLabel = new System.Windows.Forms.Label(); + this.fishFoodTopLabel = new System.Windows.Forms.Label(); + this.plantTypesTopLabel = new System.Windows.Forms.Label(); + this.plantsTopLabel = new System.Windows.Forms.Label(); + this.fishRationsTopLabel = new System.Windows.Forms.Label(); + this.fishesTopLabel = new System.Windows.Forms.Label(); + this.locationsTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.fishTypesTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.fishFoodTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.plantTypesTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.fishesTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.fishRationsTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.deleteFishRation = new System.Windows.Forms.Button(); + this.addFishRation = new System.Windows.Forms.Button(); + this.plantsTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.mainTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + ((System.ComponentModel.ISupportInitialize)(this.fishRationsDataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.plantTypesDataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numberPlantsNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.plantsDataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numberFishNumericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.fishFoodDataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.locationsDataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.fishTypesDataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.fishesDataGridView)).BeginInit(); + this.locationsTableLayoutPanel.SuspendLayout(); + this.fishTypesTableLayoutPanel.SuspendLayout(); + this.fishFoodTableLayoutPanel.SuspendLayout(); + this.plantTypesTableLayoutPanel.SuspendLayout(); + this.fishesTableLayoutPanel.SuspendLayout(); + this.fishRationsTableLayoutPanel.SuspendLayout(); + this.plantsTableLayoutPanel.SuspendLayout(); + this.mainTableLayoutPanel.SuspendLayout(); + this.SuspendLayout(); + // + // fishFoodRationsLabel + // + this.fishFoodRationsLabel.AutoSize = true; + this.fishFoodRationsLabel.Location = new System.Drawing.Point(3, 137); + this.fishFoodRationsLabel.Name = "fishFoodRationsLabel"; + this.fishFoodRationsLabel.Size = new System.Drawing.Size(53, 13); + this.fishFoodRationsLabel.TabIndex = 4; + this.fishFoodRationsLabel.Text = "Fish food:"; + // + // fishFoodRationsComboBox + // + this.fishRationsTableLayoutPanel.SetColumnSpan(this.fishFoodRationsComboBox, 2); + this.fishFoodRationsComboBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishFoodRationsComboBox.FormattingEnabled = true; + this.fishFoodRationsComboBox.Location = new System.Drawing.Point(3, 155); + this.fishFoodRationsComboBox.Name = "fishFoodRationsComboBox"; + this.fishFoodRationsComboBox.Size = new System.Drawing.Size(316, 21); + this.fishFoodRationsComboBox.TabIndex = 3; + // + // fishTypeRationsLabel + // + this.fishTypeRationsLabel.AutoSize = true; + this.fishTypeRationsLabel.Location = new System.Drawing.Point(3, 94); + this.fishTypeRationsLabel.Name = "fishTypeRationsLabel"; + this.fishTypeRationsLabel.Size = new System.Drawing.Size(52, 13); + this.fishTypeRationsLabel.TabIndex = 4; + this.fishTypeRationsLabel.Text = "Fish type:"; + // + // fishTypeRationsComboBox + // + this.fishRationsTableLayoutPanel.SetColumnSpan(this.fishTypeRationsComboBox, 2); + this.fishTypeRationsComboBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishTypeRationsComboBox.FormattingEnabled = true; + this.fishTypeRationsComboBox.Location = new System.Drawing.Point(3, 112); + this.fishTypeRationsComboBox.Name = "fishTypeRationsComboBox"; + this.fishTypeRationsComboBox.Size = new System.Drawing.Size(316, 21); + this.fishTypeRationsComboBox.TabIndex = 3; + // + // fishRationsDataGridView + // + this.fishRationsDataGridView.AllowUserToAddRows = false; + this.fishRationsDataGridView.AllowUserToDeleteRows = false; + this.fishRationsDataGridView.AllowUserToResizeRows = false; + this.fishRationsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.fishRationsTableLayoutPanel.SetColumnSpan(this.fishRationsDataGridView, 2); + this.fishRationsDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishRationsDataGridView.Location = new System.Drawing.Point(3, 18); + this.fishRationsDataGridView.MultiSelect = false; + this.fishRationsDataGridView.Name = "fishRationsDataGridView"; + this.fishRationsDataGridView.ReadOnly = true; + this.fishRationsDataGridView.RowTemplate.Height = 25; + this.fishRationsDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.fishRationsDataGridView.Size = new System.Drawing.Size(316, 73); + this.fishRationsDataGridView.TabIndex = 0; + // + // plantTypePlantslabel + // + this.plantTypePlantslabel.AutoSize = true; + this.plantTypePlantslabel.Location = new System.Drawing.Point(3, 94); + this.plantTypePlantslabel.Name = "plantTypePlantslabel"; + this.plantTypePlantslabel.Size = new System.Drawing.Size(57, 13); + this.plantTypePlantslabel.TabIndex = 4; + this.plantTypePlantslabel.Text = "Plant type:"; + // + // plantTypePlantsComboBox + // + this.plantsTableLayoutPanel.SetColumnSpan(this.plantTypePlantsComboBox, 3); + this.plantTypePlantsComboBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.plantTypePlantsComboBox.FormattingEnabled = true; + this.plantTypePlantsComboBox.Location = new System.Drawing.Point(3, 112); + this.plantTypePlantsComboBox.Name = "plantTypePlantsComboBox"; + this.plantTypePlantsComboBox.Size = new System.Drawing.Size(316, 21); + this.plantTypePlantsComboBox.TabIndex = 3; + // + // deletePlantType + // + this.deletePlantType.Dock = System.Windows.Forms.DockStyle.Fill; + this.deletePlantType.Location = new System.Drawing.Point(217, 182); + this.deletePlantType.Name = "deletePlantType"; + this.deletePlantType.Size = new System.Drawing.Size(102, 24); + this.deletePlantType.TabIndex = 11; + this.deletePlantType.Text = "delete"; + this.deletePlantType.UseVisualStyleBackColor = true; + this.deletePlantType.Click += new System.EventHandler(this.deletePlantType_Click); + // + // updatePlantType + // + this.updatePlantType.Dock = System.Windows.Forms.DockStyle.Fill; + this.updatePlantType.Location = new System.Drawing.Point(110, 182); + this.updatePlantType.Name = "updatePlantType"; + this.updatePlantType.Size = new System.Drawing.Size(101, 24); + this.updatePlantType.TabIndex = 10; + this.updatePlantType.Text = "update"; + this.updatePlantType.UseVisualStyleBackColor = true; + this.updatePlantType.Click += new System.EventHandler(this.updatePlantType_Click); + // + // addPlantType + // + this.addPlantType.Dock = System.Windows.Forms.DockStyle.Fill; + this.addPlantType.Location = new System.Drawing.Point(3, 182); + this.addPlantType.Name = "addPlantType"; + this.addPlantType.Size = new System.Drawing.Size(101, 24); + this.addPlantType.TabIndex = 10; + this.addPlantType.Text = "add"; + this.addPlantType.UseVisualStyleBackColor = true; + this.addPlantType.Click += new System.EventHandler(this.addPlantType_Click); + // + // plantTypeTextBox + // + this.plantTypesTableLayoutPanel.SetColumnSpan(this.plantTypeTextBox, 3); + this.plantTypeTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.plantTypeTextBox.Location = new System.Drawing.Point(3, 154); + this.plantTypeTextBox.Name = "plantTypeTextBox"; + this.plantTypeTextBox.Size = new System.Drawing.Size(316, 20); + this.plantTypeTextBox.TabIndex = 6; + // + // plantTypelabel + // + this.plantTypelabel.AutoSize = true; + this.plantTypelabel.Location = new System.Drawing.Point(3, 136); + this.plantTypelabel.Name = "plantTypelabel"; + this.plantTypelabel.Size = new System.Drawing.Size(57, 13); + this.plantTypelabel.TabIndex = 5; + this.plantTypelabel.Text = "Plant type:"; + // + // plantTypesDataGridView + // + this.plantTypesDataGridView.AllowUserToAddRows = false; + this.plantTypesDataGridView.AllowUserToDeleteRows = false; + this.plantTypesDataGridView.AllowUserToResizeRows = false; + this.plantTypesDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.plantTypesTableLayoutPanel.SetColumnSpan(this.plantTypesDataGridView, 3); + this.plantTypesDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.plantTypesDataGridView.Location = new System.Drawing.Point(3, 18); + this.plantTypesDataGridView.MultiSelect = false; + this.plantTypesDataGridView.Name = "plantTypesDataGridView"; + this.plantTypesDataGridView.ReadOnly = true; + this.plantTypesDataGridView.RowTemplate.Height = 25; + this.plantTypesDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.plantTypesDataGridView.Size = new System.Drawing.Size(316, 115); + this.plantTypesDataGridView.TabIndex = 1; + // + // numberPlantsNumericUpDown + // + this.plantsTableLayoutPanel.SetColumnSpan(this.numberPlantsNumericUpDown, 3); + this.numberPlantsNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill; + this.numberPlantsNumericUpDown.Location = new System.Drawing.Point(3, 69); + this.numberPlantsNumericUpDown.Name = "numberPlantsNumericUpDown"; + this.numberPlantsNumericUpDown.Size = new System.Drawing.Size(316, 20); + this.numberPlantsNumericUpDown.TabIndex = 12; + // + // deletePlant + // + this.deletePlant.Dock = System.Windows.Forms.DockStyle.Fill; + this.deletePlant.Location = new System.Drawing.Point(217, 183); + this.deletePlant.Name = "deletePlant"; + this.deletePlant.Size = new System.Drawing.Size(102, 24); + this.deletePlant.TabIndex = 11; + this.deletePlant.Text = "delete"; + this.deletePlant.UseVisualStyleBackColor = true; + this.deletePlant.Click += new System.EventHandler(this.deletePlant_Click); + // + // updatePlant + // + this.updatePlant.Dock = System.Windows.Forms.DockStyle.Fill; + this.updatePlant.Location = new System.Drawing.Point(110, 183); + this.updatePlant.Name = "updatePlant"; + this.updatePlant.Size = new System.Drawing.Size(101, 24); + this.updatePlant.TabIndex = 10; + this.updatePlant.Text = "update"; + this.updatePlant.UseVisualStyleBackColor = true; + this.updatePlant.Click += new System.EventHandler(this.updatePlant_Click); + // + // addPlant + // + this.addPlant.Dock = System.Windows.Forms.DockStyle.Fill; + this.addPlant.Location = new System.Drawing.Point(3, 183); + this.addPlant.Name = "addPlant"; + this.addPlant.Size = new System.Drawing.Size(101, 24); + this.addPlant.TabIndex = 10; + this.addPlant.Text = "add"; + this.addPlant.UseVisualStyleBackColor = true; + this.addPlant.Click += new System.EventHandler(this.addPlant_Click); + // + // numberPlantsLabel + // + this.numberPlantsLabel.AutoSize = true; + this.numberPlantsLabel.Location = new System.Drawing.Point(3, 51); + this.numberPlantsLabel.Name = "numberPlantsLabel"; + this.numberPlantsLabel.Size = new System.Drawing.Size(90, 13); + this.numberPlantsLabel.TabIndex = 8; + this.numberPlantsLabel.Text = "Number of plants:"; + // + // locationPlantLabel + // + this.locationPlantLabel.AutoSize = true; + this.locationPlantLabel.Location = new System.Drawing.Point(3, 137); + this.locationPlantLabel.Name = "locationPlantLabel"; + this.locationPlantLabel.Size = new System.Drawing.Size(51, 13); + this.locationPlantLabel.TabIndex = 4; + this.locationPlantLabel.Text = "Location:"; + // + // locationPlantsComboBox + // + this.plantsTableLayoutPanel.SetColumnSpan(this.locationPlantsComboBox, 3); + this.locationPlantsComboBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.locationPlantsComboBox.FormattingEnabled = true; + this.locationPlantsComboBox.Location = new System.Drawing.Point(3, 155); + this.locationPlantsComboBox.Name = "locationPlantsComboBox"; + this.locationPlantsComboBox.Size = new System.Drawing.Size(316, 21); + this.locationPlantsComboBox.TabIndex = 3; + // + // plantsDataGridView + // + this.plantsDataGridView.AllowUserToAddRows = false; + this.plantsDataGridView.AllowUserToDeleteRows = false; + this.plantsDataGridView.AllowUserToResizeRows = false; + this.plantsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.plantsTableLayoutPanel.SetColumnSpan(this.plantsDataGridView, 3); + this.plantsDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.plantsDataGridView.Location = new System.Drawing.Point(3, 18); + this.plantsDataGridView.MultiSelect = false; + this.plantsDataGridView.Name = "plantsDataGridView"; + this.plantsDataGridView.ReadOnly = true; + this.plantsDataGridView.RowTemplate.Height = 25; + this.plantsDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.plantsDataGridView.Size = new System.Drawing.Size(316, 30); + this.plantsDataGridView.TabIndex = 0; + // + // numberFishLabel + // + this.numberFishLabel.AutoSize = true; + this.numberFishLabel.Location = new System.Drawing.Point(3, 51); + this.numberFishLabel.Name = "numberFishLabel"; + this.numberFishLabel.Size = new System.Drawing.Size(78, 13); + this.numberFishLabel.TabIndex = 8; + this.numberFishLabel.Text = "Number of fish:"; + // + // numberFishNumericUpDown + // + this.fishesTableLayoutPanel.SetColumnSpan(this.numberFishNumericUpDown, 3); + this.numberFishNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill; + this.numberFishNumericUpDown.Location = new System.Drawing.Point(3, 69); + this.numberFishNumericUpDown.Name = "numberFishNumericUpDown"; + this.numberFishNumericUpDown.Size = new System.Drawing.Size(316, 20); + this.numberFishNumericUpDown.TabIndex = 12; + // + // deleteFish + // + this.deleteFish.Dock = System.Windows.Forms.DockStyle.Fill; + this.deleteFish.Location = new System.Drawing.Point(217, 183); + this.deleteFish.Name = "deleteFish"; + this.deleteFish.Size = new System.Drawing.Size(102, 24); + this.deleteFish.TabIndex = 11; + this.deleteFish.Text = "delete"; + this.deleteFish.UseVisualStyleBackColor = true; + this.deleteFish.Click += new System.EventHandler(this.deleteFish_Click); + // + // updateFish + // + this.updateFish.Dock = System.Windows.Forms.DockStyle.Fill; + this.updateFish.Location = new System.Drawing.Point(110, 183); + this.updateFish.Name = "updateFish"; + this.updateFish.Size = new System.Drawing.Size(101, 24); + this.updateFish.TabIndex = 10; + this.updateFish.Text = "update"; + this.updateFish.UseVisualStyleBackColor = true; + this.updateFish.Click += new System.EventHandler(this.updateFish_Click); + // + // addFish + // + this.addFish.Dock = System.Windows.Forms.DockStyle.Fill; + this.addFish.Location = new System.Drawing.Point(3, 183); + this.addFish.Name = "addFish"; + this.addFish.Size = new System.Drawing.Size(101, 24); + this.addFish.TabIndex = 10; + this.addFish.Text = "add"; + this.addFish.UseVisualStyleBackColor = true; + this.addFish.Click += new System.EventHandler(this.addFish_Click); + // + // locationFishesLabel + // + this.locationFishesLabel.AutoSize = true; + this.locationFishesLabel.Location = new System.Drawing.Point(3, 137); + this.locationFishesLabel.Name = "locationFishesLabel"; + this.locationFishesLabel.Size = new System.Drawing.Size(51, 13); + this.locationFishesLabel.TabIndex = 4; + this.locationFishesLabel.Text = "Location:"; + // + // locationFishComboBox + // + this.fishesTableLayoutPanel.SetColumnSpan(this.locationFishComboBox, 3); + this.locationFishComboBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.locationFishComboBox.FormattingEnabled = true; + this.locationFishComboBox.Location = new System.Drawing.Point(3, 155); + this.locationFishComboBox.Name = "locationFishComboBox"; + this.locationFishComboBox.Size = new System.Drawing.Size(316, 21); + this.locationFishComboBox.TabIndex = 3; + // + // deleteLocation + // + this.deleteLocation.Dock = System.Windows.Forms.DockStyle.Fill; + this.deleteLocation.Location = new System.Drawing.Point(654, 182); + this.deleteLocation.Name = "deleteLocation"; + this.deleteLocation.Size = new System.Drawing.Size(321, 24); + this.deleteLocation.TabIndex = 11; + this.deleteLocation.Text = "delete"; + this.deleteLocation.UseVisualStyleBackColor = true; + this.deleteLocation.Click += new System.EventHandler(this.deleteLocation_Click); + // + // updateLocation + // + this.updateLocation.Dock = System.Windows.Forms.DockStyle.Fill; + this.updateLocation.Location = new System.Drawing.Point(328, 182); + this.updateLocation.Name = "updateLocation"; + this.updateLocation.Size = new System.Drawing.Size(320, 24); + this.updateLocation.TabIndex = 10; + this.updateLocation.Text = "update"; + this.updateLocation.UseVisualStyleBackColor = true; + this.updateLocation.Click += new System.EventHandler(this.updateLocation_Click); + // + // addLocation + // + this.addLocation.Dock = System.Windows.Forms.DockStyle.Fill; + this.addLocation.Location = new System.Drawing.Point(3, 182); + this.addLocation.Name = "addLocation"; + this.addLocation.Size = new System.Drawing.Size(319, 24); + this.addLocation.TabIndex = 10; + this.addLocation.Text = "add"; + this.addLocation.UseVisualStyleBackColor = true; + this.addLocation.Click += new System.EventHandler(this.addLocation_Click); + // + // locationTextBox + // + this.locationsTableLayoutPanel.SetColumnSpan(this.locationTextBox, 3); + this.locationTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.locationTextBox.Location = new System.Drawing.Point(3, 154); + this.locationTextBox.Name = "locationTextBox"; + this.locationTextBox.Size = new System.Drawing.Size(972, 20); + this.locationTextBox.TabIndex = 9; + // + // locationLabel + // + this.locationLabel.AutoSize = true; + this.locationLabel.Location = new System.Drawing.Point(3, 136); + this.locationLabel.Name = "locationLabel"; + this.locationLabel.Size = new System.Drawing.Size(38, 13); + this.locationLabel.TabIndex = 8; + this.locationLabel.Text = "Name:"; + // + // deleteFishType + // + this.deleteFishType.Dock = System.Windows.Forms.DockStyle.Fill; + this.deleteFishType.Location = new System.Drawing.Point(217, 182); + this.deleteFishType.Name = "deleteFishType"; + this.deleteFishType.Size = new System.Drawing.Size(102, 24); + this.deleteFishType.TabIndex = 11; + this.deleteFishType.Text = "delete"; + this.deleteFishType.UseVisualStyleBackColor = true; + this.deleteFishType.Click += new System.EventHandler(this.deleteFishType_Click); + // + // updateFishType + // + this.updateFishType.Dock = System.Windows.Forms.DockStyle.Fill; + this.updateFishType.Location = new System.Drawing.Point(110, 182); + this.updateFishType.Name = "updateFishType"; + this.updateFishType.Size = new System.Drawing.Size(101, 24); + this.updateFishType.TabIndex = 10; + this.updateFishType.Text = "update"; + this.updateFishType.UseVisualStyleBackColor = true; + this.updateFishType.Click += new System.EventHandler(this.updateFishType_Click); + // + // addFishType + // + this.addFishType.Dock = System.Windows.Forms.DockStyle.Fill; + this.addFishType.Location = new System.Drawing.Point(3, 182); + this.addFishType.Name = "addFishType"; + this.addFishType.Size = new System.Drawing.Size(101, 24); + this.addFishType.TabIndex = 10; + this.addFishType.Text = "add"; + this.addFishType.UseVisualStyleBackColor = true; + this.addFishType.Click += new System.EventHandler(this.addFishType_Click); + // + // updateFishFood + // + this.updateFishFood.Dock = System.Windows.Forms.DockStyle.Fill; + this.updateFishFood.Location = new System.Drawing.Point(110, 182); + this.updateFishFood.Name = "updateFishFood"; + this.updateFishFood.Size = new System.Drawing.Size(101, 24); + this.updateFishFood.TabIndex = 10; + this.updateFishFood.Text = "update"; + this.updateFishFood.UseVisualStyleBackColor = true; + this.updateFishFood.Click += new System.EventHandler(this.updateFishFood_Click); + // + // deleteFishFood + // + this.deleteFishFood.Dock = System.Windows.Forms.DockStyle.Fill; + this.deleteFishFood.Location = new System.Drawing.Point(217, 182); + this.deleteFishFood.Name = "deleteFishFood"; + this.deleteFishFood.Size = new System.Drawing.Size(102, 24); + this.deleteFishFood.TabIndex = 11; + this.deleteFishFood.Text = "delete"; + this.deleteFishFood.UseVisualStyleBackColor = true; + this.deleteFishFood.Click += new System.EventHandler(this.deleteFishFood_Click); + // + // addFishFood + // + this.addFishFood.Dock = System.Windows.Forms.DockStyle.Fill; + this.addFishFood.Location = new System.Drawing.Point(3, 182); + this.addFishFood.Name = "addFishFood"; + this.addFishFood.Size = new System.Drawing.Size(101, 24); + this.addFishFood.TabIndex = 10; + this.addFishFood.Text = "add"; + this.addFishFood.UseVisualStyleBackColor = true; + this.addFishFood.Click += new System.EventHandler(this.addFishFood_Click); + // + // fishFoodTextBox + // + this.fishFoodTableLayoutPanel.SetColumnSpan(this.fishFoodTextBox, 3); + this.fishFoodTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishFoodTextBox.Location = new System.Drawing.Point(3, 157); + this.fishFoodTextBox.Name = "fishFoodTextBox"; + this.fishFoodTextBox.Size = new System.Drawing.Size(316, 20); + this.fishFoodTextBox.TabIndex = 9; + // + // fishFoodLabel + // + this.fishFoodLabel.AutoSize = true; + this.fishFoodLabel.Location = new System.Drawing.Point(3, 139); + this.fishFoodLabel.Name = "fishFoodLabel"; + this.fishFoodLabel.Size = new System.Drawing.Size(53, 13); + this.fishFoodLabel.TabIndex = 8; + this.fishFoodLabel.Text = "Fish food:"; + // + // fishFoodDataGridView + // + this.fishFoodDataGridView.AllowUserToAddRows = false; + this.fishFoodDataGridView.AllowUserToDeleteRows = false; + this.fishFoodDataGridView.AllowUserToResizeRows = false; + this.fishFoodDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.fishFoodTableLayoutPanel.SetColumnSpan(this.fishFoodDataGridView, 3); + this.fishFoodDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishFoodDataGridView.Location = new System.Drawing.Point(3, 18); + this.fishFoodDataGridView.MultiSelect = false; + this.fishFoodDataGridView.Name = "fishFoodDataGridView"; + this.fishFoodDataGridView.ReadOnly = true; + this.fishFoodDataGridView.RowTemplate.Height = 25; + this.fishFoodDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.fishFoodDataGridView.Size = new System.Drawing.Size(316, 118); + this.fishFoodDataGridView.TabIndex = 7; + // + // fishTypeTextBox + // + this.fishTypesTableLayoutPanel.SetColumnSpan(this.fishTypeTextBox, 3); + this.fishTypeTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishTypeTextBox.Location = new System.Drawing.Point(3, 154); + this.fishTypeTextBox.Name = "fishTypeTextBox"; + this.fishTypeTextBox.Size = new System.Drawing.Size(316, 20); + this.fishTypeTextBox.TabIndex = 6; + // + // fishTypeLabel + // + this.fishTypeLabel.AutoSize = true; + this.fishTypeLabel.Location = new System.Drawing.Point(3, 136); + this.fishTypeLabel.Name = "fishTypeLabel"; + this.fishTypeLabel.Size = new System.Drawing.Size(52, 13); + this.fishTypeLabel.TabIndex = 5; + this.fishTypeLabel.Text = "Fish type:"; + // + // fishTypeFishesLabel + // + this.fishTypeFishesLabel.AutoSize = true; + this.fishTypeFishesLabel.Location = new System.Drawing.Point(3, 94); + this.fishTypeFishesLabel.Name = "fishTypeFishesLabel"; + this.fishTypeFishesLabel.Size = new System.Drawing.Size(52, 13); + this.fishTypeFishesLabel.TabIndex = 4; + this.fishTypeFishesLabel.Text = "Fish type:"; + // + // fishTypeFishesComboBox + // + this.fishesTableLayoutPanel.SetColumnSpan(this.fishTypeFishesComboBox, 3); + this.fishTypeFishesComboBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishTypeFishesComboBox.FormattingEnabled = true; + this.fishTypeFishesComboBox.Location = new System.Drawing.Point(3, 112); + this.fishTypeFishesComboBox.Name = "fishTypeFishesComboBox"; + this.fishTypeFishesComboBox.Size = new System.Drawing.Size(316, 21); + this.fishTypeFishesComboBox.TabIndex = 3; + // + // locationsDataGridView + // + this.locationsDataGridView.AllowUserToAddRows = false; + this.locationsDataGridView.AllowUserToDeleteRows = false; + this.locationsDataGridView.AllowUserToResizeRows = false; + this.locationsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.locationsTableLayoutPanel.SetColumnSpan(this.locationsDataGridView, 3); + this.locationsDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.locationsDataGridView.Location = new System.Drawing.Point(3, 18); + this.locationsDataGridView.MultiSelect = false; + this.locationsDataGridView.Name = "locationsDataGridView"; + this.locationsDataGridView.ReadOnly = true; + this.locationsDataGridView.RowTemplate.Height = 25; + this.locationsDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.locationsDataGridView.Size = new System.Drawing.Size(972, 115); + this.locationsDataGridView.TabIndex = 2; + // + // fishTypesDataGridView + // + this.fishTypesDataGridView.AllowUserToAddRows = false; + this.fishTypesDataGridView.AllowUserToDeleteRows = false; + this.fishTypesDataGridView.AllowUserToResizeRows = false; + this.fishTypesDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.fishTypesTableLayoutPanel.SetColumnSpan(this.fishTypesDataGridView, 3); + this.fishTypesDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishTypesDataGridView.Location = new System.Drawing.Point(3, 18); + this.fishTypesDataGridView.MultiSelect = false; + this.fishTypesDataGridView.Name = "fishTypesDataGridView"; + this.fishTypesDataGridView.ReadOnly = true; + this.fishTypesDataGridView.RowTemplate.Height = 25; + this.fishTypesDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.fishTypesDataGridView.Size = new System.Drawing.Size(316, 115); + this.fishTypesDataGridView.TabIndex = 1; + // + // fishesDataGridView + // + this.fishesDataGridView.AllowUserToAddRows = false; + this.fishesDataGridView.AllowUserToDeleteRows = false; + this.fishesDataGridView.AllowUserToResizeRows = false; + this.fishesDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.fishesTableLayoutPanel.SetColumnSpan(this.fishesDataGridView, 3); + this.fishesDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishesDataGridView.Location = new System.Drawing.Point(3, 18); + this.fishesDataGridView.MultiSelect = false; + this.fishesDataGridView.Name = "fishesDataGridView"; + this.fishesDataGridView.ReadOnly = true; + this.fishesDataGridView.RowTemplate.Height = 25; + this.fishesDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.fishesDataGridView.Size = new System.Drawing.Size(316, 30); + this.fishesDataGridView.TabIndex = 0; + // + // locationsTopLabel + // + this.locationsTopLabel.AutoSize = true; + this.locationsTopLabel.Location = new System.Drawing.Point(3, 0); + this.locationsTopLabel.Name = "locationsTopLabel"; + this.locationsTopLabel.Size = new System.Drawing.Size(56, 13); + this.locationsTopLabel.TabIndex = 13; + this.locationsTopLabel.Text = "Locations:"; + // + // fishTypesTopLabel + // + this.fishTypesTopLabel.AutoSize = true; + this.fishTypesTopLabel.Location = new System.Drawing.Point(3, 0); + this.fishTypesTopLabel.Name = "fishTypesTopLabel"; + this.fishTypesTopLabel.Size = new System.Drawing.Size(57, 13); + this.fishTypesTopLabel.TabIndex = 14; + this.fishTypesTopLabel.Text = "Fish types:"; + // + // fishFoodTopLabel + // + this.fishFoodTopLabel.AutoSize = true; + this.fishFoodTopLabel.Location = new System.Drawing.Point(3, 0); + this.fishFoodTopLabel.Name = "fishFoodTopLabel"; + this.fishFoodTopLabel.Size = new System.Drawing.Size(53, 13); + this.fishFoodTopLabel.TabIndex = 15; + this.fishFoodTopLabel.Text = "Fish food:"; + // + // plantTypesTopLabel + // + this.plantTypesTopLabel.AutoSize = true; + this.plantTypesTopLabel.Location = new System.Drawing.Point(3, 0); + this.plantTypesTopLabel.Name = "plantTypesTopLabel"; + this.plantTypesTopLabel.Size = new System.Drawing.Size(62, 13); + this.plantTypesTopLabel.TabIndex = 15; + this.plantTypesTopLabel.Text = "Plant types:"; + // + // plantsTopLabel + // + this.plantsTopLabel.AutoSize = true; + this.plantsTopLabel.Location = new System.Drawing.Point(3, 0); + this.plantsTopLabel.Name = "plantsTopLabel"; + this.plantsTopLabel.Size = new System.Drawing.Size(39, 13); + this.plantsTopLabel.TabIndex = 18; + this.plantsTopLabel.Text = "Plants:"; + // + // fishRationsTopLabel + // + this.fishRationsTopLabel.AutoSize = true; + this.fishRationsTopLabel.Location = new System.Drawing.Point(3, 0); + this.fishRationsTopLabel.Name = "fishRationsTopLabel"; + this.fishRationsTopLabel.Size = new System.Drawing.Size(63, 13); + this.fishRationsTopLabel.TabIndex = 17; + this.fishRationsTopLabel.Text = "Fish rations:"; + // + // fishesTopLabel + // + this.fishesTopLabel.AutoSize = true; + this.fishesTopLabel.Location = new System.Drawing.Point(3, 0); + this.fishesTopLabel.Name = "fishesTopLabel"; + this.fishesTopLabel.Size = new System.Drawing.Size(40, 13); + this.fishesTopLabel.TabIndex = 16; + this.fishesTopLabel.Text = "Fishes:"; + // + // locationsTableLayoutPanel + // + this.locationsTableLayoutPanel.ColumnCount = 3; + this.mainTableLayoutPanel.SetColumnSpan(this.locationsTableLayoutPanel, 3); + this.locationsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33332F)); + this.locationsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F)); + this.locationsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F)); + this.locationsTableLayoutPanel.Controls.Add(this.locationsTopLabel, 0, 0); + this.locationsTableLayoutPanel.Controls.Add(this.locationsDataGridView, 0, 1); + this.locationsTableLayoutPanel.Controls.Add(this.locationTextBox, 0, 3); + this.locationsTableLayoutPanel.Controls.Add(this.addLocation, 0, 4); + this.locationsTableLayoutPanel.Controls.Add(this.updateLocation, 1, 4); + this.locationsTableLayoutPanel.Controls.Add(this.deleteLocation, 2, 4); + this.locationsTableLayoutPanel.Controls.Add(this.locationLabel, 0, 2); + this.locationsTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.locationsTableLayoutPanel.Location = new System.Drawing.Point(3, 3); + this.locationsTableLayoutPanel.Name = "locationsTableLayoutPanel"; + this.locationsTableLayoutPanel.RowCount = 5; + this.locationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.locationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.locationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.locationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.locationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.locationsTableLayoutPanel.Size = new System.Drawing.Size(978, 209); + this.locationsTableLayoutPanel.TabIndex = 19; + // + // fishTypesTableLayoutPanel + // + this.fishTypesTableLayoutPanel.ColumnCount = 3; + this.fishTypesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishTypesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishTypesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishTypesTableLayoutPanel.Controls.Add(this.fishTypesTopLabel, 0, 0); + this.fishTypesTableLayoutPanel.Controls.Add(this.fishTypesDataGridView, 0, 1); + this.fishTypesTableLayoutPanel.Controls.Add(this.fishTypeLabel, 0, 2); + this.fishTypesTableLayoutPanel.Controls.Add(this.fishTypeTextBox, 0, 3); + this.fishTypesTableLayoutPanel.Controls.Add(this.addFishType, 0, 4); + this.fishTypesTableLayoutPanel.Controls.Add(this.updateFishType, 1, 4); + this.fishTypesTableLayoutPanel.Controls.Add(this.deleteFishType, 2, 4); + this.fishTypesTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishTypesTableLayoutPanel.Location = new System.Drawing.Point(3, 218); + this.fishTypesTableLayoutPanel.Name = "fishTypesTableLayoutPanel"; + this.fishTypesTableLayoutPanel.RowCount = 5; + this.fishTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.fishTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.fishTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.fishTypesTableLayoutPanel.Size = new System.Drawing.Size(322, 209); + this.fishTypesTableLayoutPanel.TabIndex = 20; + // + // fishFoodTableLayoutPanel + // + this.fishFoodTableLayoutPanel.ColumnCount = 3; + this.fishFoodTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishFoodTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishFoodTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishFoodTableLayoutPanel.Controls.Add(this.fishFoodTopLabel, 0, 0); + this.fishFoodTableLayoutPanel.Controls.Add(this.fishFoodDataGridView, 0, 1); + this.fishFoodTableLayoutPanel.Controls.Add(this.fishFoodLabel, 0, 2); + this.fishFoodTableLayoutPanel.Controls.Add(this.fishFoodTextBox, 0, 3); + this.fishFoodTableLayoutPanel.Controls.Add(this.addFishFood, 0, 4); + this.fishFoodTableLayoutPanel.Controls.Add(this.updateFishFood, 1, 4); + this.fishFoodTableLayoutPanel.Controls.Add(this.deleteFishFood, 2, 4); + this.fishFoodTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishFoodTableLayoutPanel.Location = new System.Drawing.Point(331, 218); + this.fishFoodTableLayoutPanel.Name = "fishFoodTableLayoutPanel"; + this.fishFoodTableLayoutPanel.RowCount = 5; + this.fishFoodTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishFoodTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.fishFoodTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishFoodTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.fishFoodTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.fishFoodTableLayoutPanel.Size = new System.Drawing.Size(322, 209); + this.fishFoodTableLayoutPanel.TabIndex = 21; + // + // plantTypesTableLayoutPanel + // + this.plantTypesTableLayoutPanel.ColumnCount = 3; + this.plantTypesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.plantTypesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.plantTypesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.plantTypesTableLayoutPanel.Controls.Add(this.plantTypesTopLabel, 0, 0); + this.plantTypesTableLayoutPanel.Controls.Add(this.plantTypesDataGridView, 0, 1); + this.plantTypesTableLayoutPanel.Controls.Add(this.plantTypelabel, 0, 2); + this.plantTypesTableLayoutPanel.Controls.Add(this.plantTypeTextBox, 0, 3); + this.plantTypesTableLayoutPanel.Controls.Add(this.addPlantType, 0, 4); + this.plantTypesTableLayoutPanel.Controls.Add(this.updatePlantType, 1, 4); + this.plantTypesTableLayoutPanel.Controls.Add(this.deletePlantType, 2, 4); + this.plantTypesTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.plantTypesTableLayoutPanel.Location = new System.Drawing.Point(659, 218); + this.plantTypesTableLayoutPanel.Name = "plantTypesTableLayoutPanel"; + this.plantTypesTableLayoutPanel.RowCount = 5; + this.plantTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.plantTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.plantTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.plantTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.plantTypesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.plantTypesTableLayoutPanel.Size = new System.Drawing.Size(322, 209); + this.plantTypesTableLayoutPanel.TabIndex = 22; + // + // fishesTableLayoutPanel + // + this.fishesTableLayoutPanel.ColumnCount = 3; + this.fishesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishesTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.fishesTableLayoutPanel.Controls.Add(this.fishesTopLabel, 0, 0); + this.fishesTableLayoutPanel.Controls.Add(this.fishesDataGridView, 0, 1); + this.fishesTableLayoutPanel.Controls.Add(this.numberFishLabel, 0, 2); + this.fishesTableLayoutPanel.Controls.Add(this.numberFishNumericUpDown, 0, 3); + this.fishesTableLayoutPanel.Controls.Add(this.fishTypeFishesLabel, 0, 4); + this.fishesTableLayoutPanel.Controls.Add(this.fishTypeFishesComboBox, 0, 5); + this.fishesTableLayoutPanel.Controls.Add(this.locationFishesLabel, 0, 6); + this.fishesTableLayoutPanel.Controls.Add(this.locationFishComboBox, 0, 7); + this.fishesTableLayoutPanel.Controls.Add(this.addFish, 0, 8); + this.fishesTableLayoutPanel.Controls.Add(this.updateFish, 1, 8); + this.fishesTableLayoutPanel.Controls.Add(this.deleteFish, 2, 8); + this.fishesTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishesTableLayoutPanel.Location = new System.Drawing.Point(3, 433); + this.fishesTableLayoutPanel.Name = "fishesTableLayoutPanel"; + this.fishesTableLayoutPanel.RowCount = 9; + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.fishesTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.fishesTableLayoutPanel.Size = new System.Drawing.Size(322, 210); + this.fishesTableLayoutPanel.TabIndex = 23; + // + // fishRationsTableLayoutPanel + // + this.fishRationsTableLayoutPanel.ColumnCount = 2; + this.fishRationsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.fishRationsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.fishRationsTableLayoutPanel.Controls.Add(this.fishRationsTopLabel, 0, 0); + this.fishRationsTableLayoutPanel.Controls.Add(this.fishRationsDataGridView, 0, 1); + this.fishRationsTableLayoutPanel.Controls.Add(this.fishTypeRationsLabel, 0, 2); + this.fishRationsTableLayoutPanel.Controls.Add(this.fishTypeRationsComboBox, 0, 3); + this.fishRationsTableLayoutPanel.Controls.Add(this.fishFoodRationsLabel, 0, 4); + this.fishRationsTableLayoutPanel.Controls.Add(this.fishFoodRationsComboBox, 0, 5); + this.fishRationsTableLayoutPanel.Controls.Add(this.deleteFishRation, 1, 6); + this.fishRationsTableLayoutPanel.Controls.Add(this.addFishRation, 0, 6); + this.fishRationsTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.fishRationsTableLayoutPanel.Location = new System.Drawing.Point(331, 433); + this.fishRationsTableLayoutPanel.Name = "fishRationsTableLayoutPanel"; + this.fishRationsTableLayoutPanel.RowCount = 7; + this.fishRationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishRationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.fishRationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishRationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.fishRationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.fishRationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.fishRationsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.fishRationsTableLayoutPanel.Size = new System.Drawing.Size(322, 210); + this.fishRationsTableLayoutPanel.TabIndex = 24; + // + // deleteFishRation + // + this.deleteFishRation.Dock = System.Windows.Forms.DockStyle.Fill; + this.deleteFishRation.Location = new System.Drawing.Point(164, 183); + this.deleteFishRation.Name = "deleteFishRation"; + this.deleteFishRation.Size = new System.Drawing.Size(155, 24); + this.deleteFishRation.TabIndex = 11; + this.deleteFishRation.Text = "delete"; + this.deleteFishRation.UseVisualStyleBackColor = true; + this.deleteFishRation.Click += new System.EventHandler(this.deleteFishRation_Click); + // + // addFishRation + // + this.addFishRation.Dock = System.Windows.Forms.DockStyle.Fill; + this.addFishRation.Location = new System.Drawing.Point(3, 183); + this.addFishRation.Name = "addFishRation"; + this.addFishRation.Size = new System.Drawing.Size(155, 24); + this.addFishRation.TabIndex = 10; + this.addFishRation.Text = "add"; + this.addFishRation.UseVisualStyleBackColor = true; + this.addFishRation.Click += new System.EventHandler(this.addFishRation_Click); + // + // plantsTableLayoutPanel + // + this.plantsTableLayoutPanel.ColumnCount = 3; + this.plantsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.plantsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.plantsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.plantsTableLayoutPanel.Controls.Add(this.plantsTopLabel, 0, 0); + this.plantsTableLayoutPanel.Controls.Add(this.plantsDataGridView, 0, 1); + this.plantsTableLayoutPanel.Controls.Add(this.numberPlantsLabel, 0, 2); + this.plantsTableLayoutPanel.Controls.Add(this.numberPlantsNumericUpDown, 0, 3); + this.plantsTableLayoutPanel.Controls.Add(this.plantTypePlantslabel, 0, 4); + this.plantsTableLayoutPanel.Controls.Add(this.plantTypePlantsComboBox, 0, 5); + this.plantsTableLayoutPanel.Controls.Add(this.locationPlantLabel, 0, 6); + this.plantsTableLayoutPanel.Controls.Add(this.deletePlant, 2, 8); + this.plantsTableLayoutPanel.Controls.Add(this.locationPlantsComboBox, 0, 7); + this.plantsTableLayoutPanel.Controls.Add(this.updatePlant, 1, 8); + this.plantsTableLayoutPanel.Controls.Add(this.addPlant, 0, 8); + this.plantsTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.plantsTableLayoutPanel.Location = new System.Drawing.Point(659, 433); + this.plantsTableLayoutPanel.Name = "plantsTableLayoutPanel"; + this.plantsTableLayoutPanel.RowCount = 9; + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 15F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); + this.plantsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); + this.plantsTableLayoutPanel.Size = new System.Drawing.Size(322, 210); + this.plantsTableLayoutPanel.TabIndex = 25; + // + // mainTableLayoutPanel + // + this.mainTableLayoutPanel.ColumnCount = 3; + this.mainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.mainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.mainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.mainTableLayoutPanel.Controls.Add(this.locationsTableLayoutPanel, 0, 0); + this.mainTableLayoutPanel.Controls.Add(this.plantsTableLayoutPanel, 2, 2); + this.mainTableLayoutPanel.Controls.Add(this.fishTypesTableLayoutPanel, 0, 1); + this.mainTableLayoutPanel.Controls.Add(this.fishRationsTableLayoutPanel, 1, 2); + this.mainTableLayoutPanel.Controls.Add(this.fishFoodTableLayoutPanel, 1, 1); + this.mainTableLayoutPanel.Controls.Add(this.fishesTableLayoutPanel, 0, 2); + this.mainTableLayoutPanel.Controls.Add(this.plantTypesTableLayoutPanel, 2, 1); + this.mainTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainTableLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.mainTableLayoutPanel.Name = "mainTableLayoutPanel"; + this.mainTableLayoutPanel.RowCount = 3; + this.mainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.mainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.mainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.mainTableLayoutPanel.Size = new System.Drawing.Size(984, 646); + this.mainTableLayoutPanel.TabIndex = 26; + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(984, 661); + this.Controls.Add(this.mainTableLayoutPanel); + this.DoubleBuffered = true; + this.MinimumSize = new System.Drawing.Size(800, 600); + this.Name = "MainForm"; + this.Padding = new System.Windows.Forms.Padding(0, 0, 0, 15); + this.Text = "Application"; + ((System.ComponentModel.ISupportInitialize)(this.fishRationsDataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.plantTypesDataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numberPlantsNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.plantsDataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numberFishNumericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.fishFoodDataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.locationsDataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.fishTypesDataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.fishesDataGridView)).EndInit(); + this.locationsTableLayoutPanel.ResumeLayout(false); + this.locationsTableLayoutPanel.PerformLayout(); + this.fishTypesTableLayoutPanel.ResumeLayout(false); + this.fishTypesTableLayoutPanel.PerformLayout(); + this.fishFoodTableLayoutPanel.ResumeLayout(false); + this.fishFoodTableLayoutPanel.PerformLayout(); + this.plantTypesTableLayoutPanel.ResumeLayout(false); + this.plantTypesTableLayoutPanel.PerformLayout(); + this.fishesTableLayoutPanel.ResumeLayout(false); + this.fishesTableLayoutPanel.PerformLayout(); + this.fishRationsTableLayoutPanel.ResumeLayout(false); + this.fishRationsTableLayoutPanel.PerformLayout(); + this.plantsTableLayoutPanel.ResumeLayout(false); + this.plantsTableLayoutPanel.PerformLayout(); + this.mainTableLayoutPanel.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Label fishFoodRationsLabel; + private System.Windows.Forms.ComboBox fishFoodRationsComboBox; + private System.Windows.Forms.Label fishTypeRationsLabel; + private System.Windows.Forms.ComboBox fishTypeRationsComboBox; + private System.Windows.Forms.DataGridView fishRationsDataGridView; + private System.Windows.Forms.Label plantTypePlantslabel; + private System.Windows.Forms.ComboBox plantTypePlantsComboBox; + private System.Windows.Forms.Button deletePlantType; + private System.Windows.Forms.Button updatePlantType; + private System.Windows.Forms.Button addPlantType; + private System.Windows.Forms.TextBox plantTypeTextBox; + private System.Windows.Forms.Label plantTypelabel; + private System.Windows.Forms.DataGridView plantTypesDataGridView; + private System.Windows.Forms.NumericUpDown numberPlantsNumericUpDown; + private System.Windows.Forms.Button deletePlant; + private System.Windows.Forms.Button updatePlant; + private System.Windows.Forms.Button addPlant; + private System.Windows.Forms.Label numberPlantsLabel; + private System.Windows.Forms.Label locationPlantLabel; + private System.Windows.Forms.ComboBox locationPlantsComboBox; + private System.Windows.Forms.DataGridView plantsDataGridView; + private System.Windows.Forms.Label numberFishLabel; + private System.Windows.Forms.NumericUpDown numberFishNumericUpDown; + private System.Windows.Forms.Button deleteFish; + private System.Windows.Forms.Button updateFish; + private System.Windows.Forms.Button addFish; + private System.Windows.Forms.Label locationFishesLabel; + private System.Windows.Forms.ComboBox locationFishComboBox; + private System.Windows.Forms.Button deleteLocation; + private System.Windows.Forms.Button updateLocation; + private System.Windows.Forms.Button addLocation; + private System.Windows.Forms.TextBox locationTextBox; + private System.Windows.Forms.Label locationLabel; + private System.Windows.Forms.Button deleteFishType; + private System.Windows.Forms.Button updateFishType; + private System.Windows.Forms.Button addFishType; + private System.Windows.Forms.Button updateFishFood; + private System.Windows.Forms.Button deleteFishFood; + private System.Windows.Forms.Button addFishFood; + private System.Windows.Forms.TextBox fishFoodTextBox; + private System.Windows.Forms.Label fishFoodLabel; + private System.Windows.Forms.DataGridView fishFoodDataGridView; + private System.Windows.Forms.TextBox fishTypeTextBox; + private System.Windows.Forms.Label fishTypeLabel; + private System.Windows.Forms.Label fishTypeFishesLabel; + private System.Windows.Forms.ComboBox fishTypeFishesComboBox; + private System.Windows.Forms.DataGridView locationsDataGridView; + private System.Windows.Forms.DataGridView fishTypesDataGridView; + private System.Windows.Forms.DataGridView fishesDataGridView; + private System.Windows.Forms.Label locationsTopLabel; + private System.Windows.Forms.Label fishTypesTopLabel; + private System.Windows.Forms.Label fishFoodTopLabel; + private System.Windows.Forms.Label plantTypesTopLabel; + private System.Windows.Forms.Label plantsTopLabel; + private System.Windows.Forms.Label fishRationsTopLabel; + private System.Windows.Forms.Label fishesTopLabel; + private System.Windows.Forms.TableLayoutPanel fishRationsTableLayoutPanel; + private System.Windows.Forms.TableLayoutPanel plantsTableLayoutPanel; + private System.Windows.Forms.TableLayoutPanel plantTypesTableLayoutPanel; + private System.Windows.Forms.TableLayoutPanel fishesTableLayoutPanel; + private System.Windows.Forms.TableLayoutPanel locationsTableLayoutPanel; + private System.Windows.Forms.TableLayoutPanel mainTableLayoutPanel; + private System.Windows.Forms.TableLayoutPanel fishTypesTableLayoutPanel; + private System.Windows.Forms.TableLayoutPanel fishFoodTableLayoutPanel; + private System.Windows.Forms.Button deleteFishRation; + private System.Windows.Forms.Button addFishRation; + } +} + diff --git a/Database/MainForm.cs b/Database/MainForm.cs new file mode 100644 index 0000000..90275f9 --- /dev/null +++ b/Database/MainForm.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.OleDb; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Database +{ + public partial class MainForm : Form + { + + private Fishes fishes; + private Plants plants; + private FishFood fishFood; + private Locations locations; + private FishTypes fishTypes; + private PlantTypes plantTypes; + private FishRations fishRations; + + public MainForm() + { + InitializeComponent(); + ConfigureWidgets(); + ConfigureText(); + } + private void ConfigureWidgets() { + fishes = new Fishes(fishesDataGridView); + plants = new Plants(plantsDataGridView); + fishFood = new FishFood(fishFoodDataGridView); + locations = new Locations(locationsDataGridView); + fishTypes = new FishTypes(fishTypesDataGridView); + plantTypes = new PlantTypes(plantTypesDataGridView); + fishRations = new FishRations(fishRationsDataGridView); + + var initializerList = new (ComboBox, DataGridView)[6] { + (fishTypeFishesComboBox, fishTypesDataGridView), + (locationFishComboBox, locationsDataGridView), + (fishTypeRationsComboBox, fishTypesDataGridView), + (fishFoodRationsComboBox, fishFoodDataGridView), + (plantTypePlantsComboBox, plantTypesDataGridView), + (locationPlantsComboBox, locationsDataGridView) + }; + foreach (var pair in initializerList) { + pair.Item1.DataSource = pair.Item2.DataSource; + pair.Item1.DropDownStyle = ComboBoxStyle.DropDownList; + pair.Item1.DisplayMember = "data"; + pair.Item1.ValueMember = "id"; + } + } + private void ConfigureText() { + var initializerList = new DataGridView[7] { + fishesDataGridView, + plantsDataGridView, + fishFoodDataGridView, + locationsDataGridView, + fishTypesDataGridView, + plantTypesDataGridView, + fishRationsDataGridView + }; + foreach (var dataGridView in initializerList) + dataGridView.Columns["id"].HeaderText = "Identifier"; + fishesDataGridView.Columns["id"].Visible = false; + plantsDataGridView.Columns["id"].Visible = false; + fishesDataGridView.Columns["type"].HeaderText = "Type of fish"; + fishesDataGridView.Columns["location"].HeaderText = "Place of residence"; + fishesDataGridView.Columns["number"].HeaderText = "Population"; + plantsDataGridView.Columns["type"].HeaderText = "Type of plant"; + plantsDataGridView.Columns["location"].HeaderText = "Plant location"; + plantsDataGridView.Columns["number"].HeaderText = "Number of plants"; + fishFoodDataGridView.Columns["data"].HeaderText = "Fish nutrition"; + locationsDataGridView.Columns["data"].HeaderText = "Place of residence"; + fishTypesDataGridView.Columns["data"].HeaderText = "Type of fish"; + plantTypesDataGridView.Columns["data"].HeaderText = "Type of plant"; + fishRationsDataGridView.Columns["type"].HeaderText = "Type of fish"; + fishRationsDataGridView.Columns["food"].HeaderText = "What does it eat"; + } + private void addLocation_Click(object sender, EventArgs e) { + string data = locationTextBox.Text.Trim(); + if (data.Length < 1) + return; + locations.Insert(data); + } + private void updateLocation_Click(object sender, EventArgs e) { + string data = locationTextBox.Text.Trim(); + if (data.Length < 1) + return; + locations.Update(data); + } + private void deleteLocation_Click(object sender, EventArgs e) { + locations.Delete(); + } + private void addFishType_Click(object sender, EventArgs e) { + string data = fishTypeTextBox.Text.Trim(); + if (data.Length < 1) + return; + fishTypes.Insert(data); + } + private void updateFishType_Click(object sender, EventArgs e) { + string data = fishTypeTextBox.Text.Trim(); + if (data.Length < 1) + return; + fishTypes.Update(data); + } + private void deleteFishType_Click(object sender, EventArgs e) { + fishTypes.Delete(); + } + private void addFishFood_Click(object sender, EventArgs e) { + string data = fishFoodTextBox.Text.Trim(); + if (data.Length < 1) + return; + fishFood.Insert(data); + } + private void updateFishFood_Click(object sender, EventArgs e) { + string data = fishFoodTextBox.Text.Trim(); + if (data.Length < 1) + return; + fishFood.Update(data); + } + private void deleteFishFood_Click(object sender, EventArgs e) { + fishFood.Delete(); + } + private void addPlantType_Click(object sender, EventArgs e) { + string data = plantTypeTextBox.Text.Trim(); + if (data.Length < 1) + return; + plantTypes.Insert(data); + } + private void updatePlantType_Click(object sender, EventArgs e) { + string data = plantTypeTextBox.Text.Trim(); + if (data.Length < 1) + return; + plantTypes.Update(data); + } + private void deletePlantType_Click(object sender, EventArgs e) { + plantTypes.Delete(); + } + private void addFish_Click(object sender, EventArgs e) { + int number = Convert.ToInt32(numberFishNumericUpDown.Value); + int typeId = Convert.ToInt32(fishTypeFishesComboBox.SelectedValue); + int locationId = Convert.ToInt32(locationFishComboBox.SelectedValue); + fishes.Insert(number, typeId, locationId); + } + private void updateFish_Click(object sender, EventArgs e) { + int number = Convert.ToInt32(numberFishNumericUpDown.Value); + int typeId = Convert.ToInt32(fishTypeFishesComboBox.SelectedValue); + int locationId = Convert.ToInt32(locationFishComboBox.SelectedValue); + fishes.Update(number, typeId, locationId); + } + private void deleteFish_Click(object sender, EventArgs e) { + fishes.Delete(); + } + private void addPlant_Click(object sender, EventArgs e) { + int number = Convert.ToInt32(numberPlantsNumericUpDown.Value); + int typeId = Convert.ToInt32(plantTypePlantsComboBox.SelectedValue); + int locationId = Convert.ToInt32(locationPlantsComboBox.SelectedValue); + plants.Insert(number, typeId, locationId); + } + private void updatePlant_Click(object sender, EventArgs e) { + int number = Convert.ToInt32(numberPlantsNumericUpDown.Value); + int typeId = Convert.ToInt32(plantTypePlantsComboBox.SelectedValue); + int locationId = Convert.ToInt32(locationPlantsComboBox.SelectedValue); + plants.Update(number, typeId, locationId); + } + private void deletePlant_Click(object sender, EventArgs e) { + plants.Delete(); + } + private void addFishRation_Click(object sender, EventArgs e) { + int typeId = Convert.ToInt32(fishTypeFishesComboBox.SelectedValue); + int foodId = Convert.ToInt32(fishFoodRationsComboBox.SelectedValue); + fishRations.Insert(typeId, foodId); + } + private void deleteFishRation_Click(object sender, EventArgs e) { + fishRations.Delete(); + } + } +} diff --git a/Database/MainForm.resx b/Database/MainForm.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Database/MainForm.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/Database/OleDBDataGridViewHandler.cs b/Database/OleDBDataGridViewHandler.cs new file mode 100644 index 0000000..39d9650 --- /dev/null +++ b/Database/OleDBDataGridViewHandler.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Database +{ + abstract class OleDBDataGridViewHandler + { + protected string nameTable; + private int idIndex; + public OleDbDataAdapter select; + private DataGridView dataGridView; + protected OleDBDataGridViewHandler(OleDbCommand selectCommand, string nameTable, DataGridView dataGridView, int idIndex = 0) + { + this.nameTable = nameTable; + this.idIndex = idIndex; + select = new OleDbDataAdapter(selectCommand); + this.dataGridView = dataGridView; + this.dataGridView.DataSource = new DataTable(); + RefreshView(); + var lastColIndex = dataGridView.Columns.Count - 1; + var lastColumn = dataGridView.Columns[lastColIndex]; + lastColumn.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; + } + protected OleDBDataGridViewHandler(string nameTable, DataGridView dataGridView, string fields = "*", int idIndex = 0) + : this(OleDBHandler.SelectCommand(nameTable, fields), nameTable, dataGridView, idIndex) + { } + protected void RefreshView() + { + var dataTable = this.dataGridView.DataSource as DataTable; + dataTable.Clear(); + select.Fill(dataTable); + } + protected int CurrentId() + { + if (dataGridView.SelectedCells.Count < 1) + return -1; + var selectedRowIndex = dataGridView.SelectedCells[0].RowIndex; + var value = dataGridView.Rows[selectedRowIndex].Cells[idIndex].Value; + return Convert.ToInt32(value); + } + public void Delete() + { + int id = CurrentId(); + if (id < 0) + return; + OleDBHandler.Delete(nameTable, id); + RefreshView(); + } + } +} diff --git a/Database/OleDBHandler.cs b/Database/OleDBHandler.cs new file mode 100644 index 0000000..7d21338 --- /dev/null +++ b/Database/OleDBHandler.cs @@ -0,0 +1,127 @@ +using System; +using System.Windows.Forms; +using System.Data; +using System.Data.OleDb; +using System.Text; + +namespace Database { + static public class OleDBHandler { + static private OleDbConnection connection; + static public OleDbConnection Connection { + get { + if (connection == null) { + InitializeConnection(); + } + return connection; + } + } + static private void InitializeConnection() { + try { + using (var ofDlg = new OpenFileDialog()) { + ofDlg.InitialDirectory = "c:\\"; + ofDlg.Filter = "Access database files (*.accdb;*.mdb)|*.accdb;*.mdb"; + ofDlg.RestoreDirectory = true; + ofDlg.CheckFileExists = true; + + if (ofDlg.ShowDialog() == DialogResult.OK) { + connection = new OleDbConnection(string.Format( + "Provider = Microsoft.ACE.Oledb.12.0; Data Source = {0}" + , ofDlg.FileName + )); + } + else { + Environment.Exit(0); + } + } + connection.Open(); + } + catch (Exception e) { + MessageBox.Show( + e.Message + , "Database connection error" + , MessageBoxButtons.OK + , MessageBoxIcon.Error + ); + Environment.Exit(e.HResult); + } + } + public enum ExecuteType { NonQuery, Scalar }; + public static object Execute(string command, ExecuteType type) + { + using (var statement = new OleDbCommand(command, Connection)) + { + switch (type) + { + case ExecuteType.NonQuery: + return statement.ExecuteNonQuery(); + case ExecuteType.Scalar: + return statement.ExecuteScalar(); + default: + throw new ArgumentException("An unsupported method is specified"); + } + } + } + public static OleDbCommand SelectCommand(string tableName, string fields) + { + var command = $"SELECT {fields} FROM [{tableName}];"; + return new OleDbCommand(command, Connection); + } + public static bool Delete(string tableName, int id) { + string command = $"DELETE FROM [{tableName}] WHERE [id] = {id};"; + var result = Execute(command, ExecuteType.NonQuery); + return Convert.ToBoolean(result); + } + private static string UpdatePart(params (string, object)[] listPairColumnNameValue) { + StringBuilder result = new StringBuilder(string.Empty); + var size = listPairColumnNameValue.Length; + if (size < 1) + return result.ToString(); + foreach (var pair in listPairColumnNameValue) + if(pair.Item2 is string) + result.Append($"[{pair.Item1}]='{pair.Item2}',"); + else + result.Append($"[{pair.Item1}]={pair.Item2},"); + + return result.ToString().TrimEnd(','); + } + public static bool Update(string tableName, int id, params (string, object)[] listPairColumnNameValue) + { + string partCommand = UpdatePart(listPairColumnNameValue); + if (partCommand.Length < 1) + return true; + string command = $"UPDATE [{tableName}] SET {partCommand} WHERE [id] = {id};"; + var result = Execute(command, ExecuteType.NonQuery); + return Convert.ToBoolean(result); + } + private static string InsertPart(params (string, object)[] listPairColumnNameValue) + { + var size = listPairColumnNameValue.Length; + if (size < 1) + return string.Empty; + + StringBuilder left = new StringBuilder("("); + StringBuilder right = new StringBuilder("VALUES ("); + foreach (var pair in listPairColumnNameValue) { + left.Append('['); + left.Append(pair.Item1); + left.Append("],"); + if (pair.Item2 is string) + right.Append('\'' + pair.Item2.ToString() + '\'' + ','); + else + right.Append(pair.Item2.ToString() + ','); + } + var leftResult = left.ToString().TrimEnd(',') + ')'; + var rightResult = right.ToString().TrimEnd(',') + ')'; + return leftResult + rightResult; + } + public static bool Insert(string tableName, params (string, object)[] listPairColumnNameValue) + { + string partCommand = InsertPart(listPairColumnNameValue); + if (partCommand.Length < 1) + return true; + string command = $"INSERT INTO [{tableName}] {partCommand};"; + var result = Execute(command, ExecuteType.NonQuery); + return Convert.ToBoolean(result); + } + } +} diff --git a/Database/PlantTypes.cs b/Database/PlantTypes.cs new file mode 100644 index 0000000..017783a --- /dev/null +++ b/Database/PlantTypes.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Text; +using System.Windows.Forms; + +namespace Database +{ + class PlantTypes : OleDBDataGridViewHandler + { + public PlantTypes(DataGridView dataGridView) : base("plant_types", dataGridView) { } + public void Insert(String name) + { + (string, object) pair = ("data", name); + OleDBHandler.Insert(nameTable, pair); + RefreshView(); + } + public void Update(String name) + { + int id = CurrentId(); + if (id < 0) + return; + (string, object) pair = ("data", name); + OleDBHandler.Update(nameTable, id, pair); + RefreshView(); + } + } +} diff --git a/Database/Plants.cs b/Database/Plants.cs new file mode 100644 index 0000000..391bc3a --- /dev/null +++ b/Database/Plants.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Data.OleDb; +using System.Text; +using System.Windows.Forms; + +namespace Database +{ + class Plants : OleDBDataGridViewHandler + { + static OleDbCommand SelectCommand() { + string command = + "SELECT [F].[id], [PT].[data] AS [type], [L].[data] AS [location], [F].[number]" + + "FROM[plants] AS[F], [plant_types] AS[PT], [locations] AS[L]" + + "WHERE[type_id] = [PT].[id] AND[location_id] = [L].[id]"; + var result = new OleDbCommand(command, OleDBHandler.Connection); + return result; + } + public Plants(DataGridView dataGridView) : base(SelectCommand(), "plants", dataGridView) { } + private bool Exists(int typeId, int locationId) { + string command = "SELECT COUNT(*) FROM [plants]" + + $"WHERE [type_id] = {typeId} AND [location_id] = {locationId};"; + var result = OleDBHandler.Execute(command, OleDBHandler.ExecuteType.Scalar); + if (Convert.ToInt32(result) > 0) + return true; + return false; + } + public void Insert(int number, int typeId, int locationId) { + if (Exists(typeId, locationId) == true) + return; + (string, object) pair1 = ("type_id", typeId); + (string, object) pair2 = ("location_id", locationId); + (string, object) pair3 = ("number", number); + OleDBHandler.Insert(nameTable, pair1, pair2, pair3); + RefreshView(); + } + public void Update(int number, int typeId, int locationId) { + if (Exists(typeId, locationId) == true) + return; + int id = CurrentId(); + if (id < 0) + return; + (string, object) pair1 = ("type_id", typeId); + (string, object) pair2 = ("location_id", locationId); + (string, object) pair3 = ("number", number); + OleDBHandler.Update(nameTable, id, pair1, pair2, pair3); + RefreshView(); + } + } +} diff --git a/Database/Program.cs b/Database/Program.cs new file mode 100644 index 0000000..f3269ad --- /dev/null +++ b/Database/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Database +{ + static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + //MessageBox.Show(RuntimeInformation.FrameworkDescription); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/Database/Properties/AssemblyInfo.cs b/Database/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..905995a --- /dev/null +++ b/Database/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("Database")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Database")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("baf17228-60de-4081-a24f-f6dd8a12c06a")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Database/Properties/Resources.Designer.cs b/Database/Properties/Resources.Designer.cs new file mode 100644 index 0000000..e0a4a68 --- /dev/null +++ b/Database/Properties/Resources.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + + +namespace Database.Properties +{ + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи 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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Database.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; + } + } + } +} diff --git a/Database/Properties/Resources.resx b/Database/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Database/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/Database/Properties/Settings.Designer.cs b/Database/Properties/Settings.Designer.cs new file mode 100644 index 0000000..1ff1830 --- /dev/null +++ b/Database/Properties/Settings.Designer.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + + +namespace Database.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/Database/Properties/Settings.settings b/Database/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Database/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + +