Compare commits

...

4 Commits

9 changed files with 312 additions and 70 deletions

View File

@ -0,0 +1,91 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using PortalAccountsDatabaseImplement;
#nullable disable
namespace PortalAccountsDatabaseImplement.Migrations
{
[DbContext(typeof(PortalAccountsDatabase))]
[Migration("20241022165136_InitialCreate")]
partial class InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Account", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Login")
.IsRequired()
.HasColumnType("text");
b.Property<double?>("Rating")
.HasColumnType("double precision");
b.Property<int>("RoleId")
.HasColumnType("integer");
b.Property<string>("Warnings")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("Accounts");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Role", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Roles");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Account", b =>
{
b.HasOne("PortalAccountsDatabaseImplement.Models.Role", "Role")
.WithMany("Accounts")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Role");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Role", b =>
{
b.Navigation("Accounts");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,65 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace PortalAccountsDatabaseImplement.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Roles",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Name = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Roles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Accounts",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Login = table.Column<string>(type: "text", nullable: false),
Warnings = table.Column<string>(type: "text", nullable: true),
RoleId = table.Column<int>(type: "integer", nullable: false),
Rating = table.Column<double>(type: "double precision", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Accounts", x => x.Id);
table.ForeignKey(
name: "FK_Accounts_Roles_RoleId",
column: x => x.RoleId,
principalTable: "Roles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Accounts_RoleId",
table: "Accounts",
column: "RoleId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Accounts");
migrationBuilder.DropTable(
name: "Roles");
}
}
}

View File

@ -0,0 +1,88 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using PortalAccountsDatabaseImplement;
#nullable disable
namespace PortalAccountsDatabaseImplement.Migrations
{
[DbContext(typeof(PortalAccountsDatabase))]
partial class PortalAccountsDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.11")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Account", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Login")
.IsRequired()
.HasColumnType("text");
b.Property<double?>("Rating")
.HasColumnType("double precision");
b.Property<int>("RoleId")
.HasColumnType("integer");
b.Property<string>("Warnings")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("Accounts");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Role", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Roles");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Account", b =>
{
b.HasOne("PortalAccountsDatabaseImplement.Models.Role", "Role")
.WithMany("Accounts")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Role");
});
modelBuilder.Entity("PortalAccountsDatabaseImplement.Models.Role", b =>
{
b.Navigation("Accounts");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -43,39 +43,36 @@
// controlInputRating // controlInputRating
// //
controlInputRating.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; controlInputRating.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
controlInputRating.Location = new Point(8, 197); controlInputRating.Location = new Point(9, 263);
controlInputRating.Margin = new Padding(4, 6, 4, 6); controlInputRating.Margin = new Padding(5, 8, 5, 8);
controlInputRating.Name = "controlInputRating"; controlInputRating.Name = "controlInputRating";
controlInputRating.Size = new Size(329, 27); controlInputRating.Size = new Size(376, 36);
controlInputRating.TabIndex = 0; controlInputRating.TabIndex = 0;
controlInputRating.Value = null; controlInputRating.Value = null;
// //
// textBoxLogin // textBoxLogin
// //
textBoxLogin.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; textBoxLogin.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
textBoxLogin.Location = new Point(15, 86); textBoxLogin.Location = new Point(17, 115);
textBoxLogin.Margin = new Padding(3, 2, 3, 2);
textBoxLogin.Name = "textBoxLogin"; textBoxLogin.Name = "textBoxLogin";
textBoxLogin.Size = new Size(323, 23); textBoxLogin.Size = new Size(369, 27);
textBoxLogin.TabIndex = 2; textBoxLogin.TabIndex = 2;
textBoxLogin.TextChanged += TextBoxLogin_TextChanged; textBoxLogin.TextChanged += TextBoxLogin_TextChanged;
// //
// textBoxWarnings // textBoxWarnings
// //
textBoxWarnings.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; textBoxWarnings.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
textBoxWarnings.Location = new Point(15, 143); textBoxWarnings.Location = new Point(17, 191);
textBoxWarnings.Margin = new Padding(3, 2, 3, 2);
textBoxWarnings.Name = "textBoxWarnings"; textBoxWarnings.Name = "textBoxWarnings";
textBoxWarnings.Size = new Size(323, 23); textBoxWarnings.Size = new Size(369, 27);
textBoxWarnings.TabIndex = 3; textBoxWarnings.TabIndex = 3;
textBoxWarnings.TextChanged += TextBoxWarnings_TextChanged; textBoxWarnings.TextChanged += TextBoxWarnings_TextChanged;
// //
// buttonSave // buttonSave
// //
buttonSave.Location = new Point(25, 232); buttonSave.Location = new Point(29, 309);
buttonSave.Margin = new Padding(3, 2, 3, 2);
buttonSave.Name = "buttonSave"; buttonSave.Name = "buttonSave";
buttonSave.Size = new Size(92, 27); buttonSave.Size = new Size(105, 36);
buttonSave.TabIndex = 8; buttonSave.TabIndex = 8;
buttonSave.Text = "Сохранить"; buttonSave.Text = "Сохранить";
buttonSave.UseVisualStyleBackColor = true; buttonSave.UseVisualStyleBackColor = true;
@ -84,55 +81,54 @@
// labelLogin // labelLogin
// //
labelLogin.AutoSize = true; labelLogin.AutoSize = true;
labelLogin.Location = new Point(15, 64); labelLogin.Location = new Point(17, 85);
labelLogin.Name = "labelLogin"; labelLogin.Name = "labelLogin";
labelLogin.Size = new Size(41, 15); labelLogin.Size = new Size(52, 20);
labelLogin.TabIndex = 4; labelLogin.TabIndex = 4;
labelLogin.Text = "Логин"; labelLogin.Text = "Логин";
// //
// labelWarnings // labelWarnings
// //
labelWarnings.AutoSize = true; labelWarnings.AutoSize = true;
labelWarnings.Location = new Point(15, 120); labelWarnings.Location = new Point(17, 160);
labelWarnings.Name = "labelWarnings"; labelWarnings.Name = "labelWarnings";
labelWarnings.Size = new Size(102, 15); labelWarnings.Size = new Size(131, 20);
labelWarnings.TabIndex = 5; labelWarnings.TabIndex = 5;
labelWarnings.Text = "Предупреждения"; labelWarnings.Text = "Предупреждения";
// //
// labelRating // labelRating
// //
labelRating.AutoSize = true; labelRating.AutoSize = true;
labelRating.Location = new Point(19, 174); labelRating.Location = new Point(22, 232);
labelRating.Name = "labelRating"; labelRating.Name = "labelRating";
labelRating.Size = new Size(51, 15); labelRating.Size = new Size(64, 20);
labelRating.TabIndex = 6; labelRating.TabIndex = 6;
labelRating.Text = "Рейтинг"; labelRating.Text = "Рейтинг";
// //
// labelRole // labelRole
// //
labelRole.AutoSize = true; labelRole.AutoSize = true;
labelRole.Location = new Point(18, 12); labelRole.Location = new Point(21, 16);
labelRole.Name = "labelRole"; labelRole.Name = "labelRole";
labelRole.Size = new Size(34, 15); labelRole.Size = new Size(42, 20);
labelRole.TabIndex = 7; labelRole.TabIndex = 7;
labelRole.Text = "Роль"; labelRole.Text = "Роль";
// //
// comboBoxControlRole // comboBoxControlRole
// //
comboBoxControlRole.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; comboBoxControlRole.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
comboBoxControlRole.Location = new Point(15, 33); comboBoxControlRole.Location = new Point(17, 44);
comboBoxControlRole.Margin = new Padding(3, 2, 3, 2); comboBoxControlRole.Margin = new Padding(3, 4, 3, 4);
comboBoxControlRole.Name = "comboBoxControlRole"; comboBoxControlRole.Name = "comboBoxControlRole";
comboBoxControlRole.SelectedValue = ""; comboBoxControlRole.SelectedValue = "";
comboBoxControlRole.Size = new Size(327, 26); comboBoxControlRole.Size = new Size(369, 35);
comboBoxControlRole.TabIndex = 8; comboBoxControlRole.TabIndex = 8;
// //
// buttonCancel // buttonCancel
// //
buttonCancel.Location = new Point(147, 232); buttonCancel.Location = new Point(168, 309);
buttonCancel.Margin = new Padding(3, 2, 3, 2);
buttonCancel.Name = "buttonCancel"; buttonCancel.Name = "buttonCancel";
buttonCancel.Size = new Size(92, 27); buttonCancel.Size = new Size(105, 36);
buttonCancel.TabIndex = 9; buttonCancel.TabIndex = 9;
buttonCancel.Text = "Отмена"; buttonCancel.Text = "Отмена";
buttonCancel.UseVisualStyleBackColor = true; buttonCancel.UseVisualStyleBackColor = true;
@ -140,9 +136,9 @@
// //
// FormAccount // FormAccount
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(357, 272); ClientSize = new Size(408, 363);
Controls.Add(buttonCancel); Controls.Add(buttonCancel);
Controls.Add(comboBoxControlRole); Controls.Add(comboBoxControlRole);
Controls.Add(labelRole); Controls.Add(labelRole);
@ -153,7 +149,6 @@
Controls.Add(textBoxWarnings); Controls.Add(textBoxWarnings);
Controls.Add(textBoxLogin); Controls.Add(textBoxLogin);
Controls.Add(controlInputRating); Controls.Add(controlInputRating);
Margin = new Padding(3, 2, 3, 2);
Name = "FormAccount"; Name = "FormAccount";
Text = "Аккаунт"; Text = "Аккаунт";
FormClosing += FormAccount_FormClosing; FormClosing += FormAccount_FormClosing;

View File

@ -45,6 +45,7 @@ namespace PortalAccountsView
textBoxWarnings.Text = account.Warnings; textBoxWarnings.Text = account.Warnings;
controlInputRating.Value = account.Rating; controlInputRating.Value = account.Rating;
comboBoxControlRole.SelectedValue = account.RoleName; comboBoxControlRole.SelectedValue = account.RoleName;
_isModified = false;
} }
} }
catch (Exception ex) catch (Exception ex)
@ -122,7 +123,7 @@ namespace PortalAccountsView
private void FormAccount_FormClosing(object sender, FormClosingEventArgs e) private void FormAccount_FormClosing(object sender, FormClosingEventArgs e)
{ {
if (!_isModified) if (!_isModified || DialogResult == DialogResult.OK)
return; return;
var result = MessageBox.Show( var result = MessageBox.Show(

View File

@ -29,8 +29,8 @@
private void InitializeComponent() private void InitializeComponent()
{ {
dataGridView = new DataGridView(); dataGridView = new DataGridView();
Id = new DataGridViewTextBoxColumn();
NameCol = new DataGridViewTextBoxColumn(); NameCol = new DataGridViewTextBoxColumn();
Id = new DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout(); SuspendLayout();
// //
@ -38,17 +38,24 @@
// //
dataGridView.BackgroundColor = SystemColors.ControlLightLight; dataGridView.BackgroundColor = SystemColors.ControlLightLight;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Columns.AddRange(new DataGridViewColumn[] { Id, NameCol }); dataGridView.Columns.AddRange(new DataGridViewColumn[] { NameCol, Id });
dataGridView.Dock = System.Windows.Forms.DockStyle.Fill; dataGridView.Dock = DockStyle.Fill;
dataGridView.Location = new System.Drawing.Point(0, 0); dataGridView.Location = new Point(0, 0);
dataGridView.Name = "dataGridView"; dataGridView.Name = "dataGridView";
dataGridView.RowHeadersWidth = 51; dataGridView.RowHeadersWidth = 51;
dataGridView.RowTemplate.Height = 29; dataGridView.RowTemplate.Height = 29;
dataGridView.Size = new System.Drawing.Size(800, 450); dataGridView.Size = new Size(800, 450);
dataGridView.TabIndex = 0; dataGridView.TabIndex = 0;
dataGridView.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView_CellValueChanged); dataGridView.CellValueChanged += DataGridView_CellValueChanged;
dataGridView.UserDeletingRow += new System.Windows.Forms.DataGridViewRowCancelEventHandler(this.DataGridView_UserDeletingRow); dataGridView.UserDeletingRow += DataGridView_UserDeletingRow;
dataGridView.KeyUp += new System.Windows.Forms.KeyEventHandler(this.DataGridView_KeyUp); dataGridView.KeyUp += DataGridView_KeyUp;
//
// NameCol
//
NameCol.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
NameCol.HeaderText = "Название";
NameCol.MinimumWidth = 6;
NameCol.Name = "NameCol";
// //
// Id // Id
// //
@ -56,32 +63,25 @@
Id.MinimumWidth = 6; Id.MinimumWidth = 6;
Id.Name = "Id"; Id.Name = "Id";
Id.Visible = false; Id.Visible = false;
Id.Width = 125; Id.Width = 6;
//
// Name
//
NameCol.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
NameCol.HeaderText = "Название";
NameCol.MinimumWidth = 6;
NameCol.Name = "Name";
// //
// FormRoles // FormRoles
// //
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(800, 450); ClientSize = new Size(800, 450);
Controls.Add(dataGridView); Controls.Add(dataGridView);
Name = "FormRoles"; Name = "FormRoles";
Text = "FormRoles"; Text = "FormRoles";
Load += new System.EventHandler(this.FormRoles_Load); Load += FormRoles_Load;
((System.ComponentModel.ISupportInitialize)(dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private DataGridView dataGridView; private DataGridView dataGridView;
private DataGridViewTextBoxColumn Id;
private DataGridViewTextBoxColumn NameCol; private DataGridViewTextBoxColumn NameCol;
private DataGridViewTextBoxColumn Id;
} }
} }

View File

@ -50,18 +50,16 @@ namespace PortalAccountsView
{ {
if (dataLoading || e.RowIndex < 0 || e.ColumnIndex != 0) if (dataLoading || e.RowIndex < 0 || e.ColumnIndex != 0)
return; return;
if (dataGridView.Rows[e.RowIndex].Cells[1].Value != null && !string.IsNullOrEmpty(dataGridView.Rows[e.RowIndex].Cells[1].Value.ToString())) if (dataGridView.Rows[e.RowIndex].Cells[1].Value != null) {
{ var name = dataGridView.Rows[e.RowIndex].Cells[0].Value?.ToString()
var name = dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value; ?? throw new Exception("Не заполнено название роли");
if (name is null) return; _logic.Update(new RoleBindingModel { Id = Convert.ToInt32(dataGridView.Rows[e.RowIndex].Cells[1].Value), Name = name });
_logic.Update(new RoleBindingModel { Id = Convert.ToInt32(dataGridView.Rows[e.RowIndex].Cells[1].Value), Name = name.ToString() });
} }
else else
{ {
var name = dataGridView.Rows[e.RowIndex].Cells[e.ColumnIndex].Value; var name = dataGridView.Rows[e.RowIndex].Cells[0].Value?.ToString()
if (name is null) ?? throw new Exception("Не заполнено название роли");
return; _logic.Create(new RoleBindingModel { Id = 0, Name = name });
_logic.Create(new RoleBindingModel { Id = 0, Name = name.ToString() });
var list = _logic.ReadList(null) ?? throw new Exception("Не удалось получить список ролей"); var list = _logic.ReadList(null) ?? throw new Exception("Не удалось получить список ролей");
int newRoleId = list.Last().Id; int newRoleId = list.Last().Id;
dataGridView.Rows[e.RowIndex].Cells[1].Value = newRoleId; dataGridView.Rows[e.RowIndex].Cells[1].Value = newRoleId;
@ -83,7 +81,10 @@ namespace PortalAccountsView
for (int i = 0; i < rows.Count; i++) for (int i = 0; i < rows.Count; i++)
{ {
DataGridViewRow row = rows[i]; DataGridViewRow row = rows[i];
if (!_logic.Delete(new RoleBindingModel { Id = Convert.ToInt32(row.Cells[1].Value) })) continue; if (row.IsNewRow)
continue;
if (row.Cells[1].Value != null && !_logic.Delete(new RoleBindingModel { Id = Convert.ToInt32(row.Cells[1].Value) }))
throw new Exception($"Ошибка удаления строки: {row.Cells[0].Value}");
dataGridView.Rows.Remove(row); dataGridView.Rows.Remove(row);
} }
} }
@ -91,8 +92,10 @@ namespace PortalAccountsView
private void DataGridView_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e) private void DataGridView_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
{ {
e.Cancel = true; e.Cancel = true;
if (dataGridView.SelectedRows == null) return; if (dataGridView.SelectedRows == null)
if (MessageBox.Show("Удалить записи?", "Подтвердите действие", MessageBoxButtons.YesNo) == DialogResult.No) return; return;
if (MessageBox.Show("Удалить записи?", "Подтвердите действие", MessageBoxButtons.YesNo) == DialogResult.No)
return;
DeleteRows(dataGridView.SelectedRows); DeleteRows(dataGridView.SelectedRows);
} }
} }

View File

@ -120,7 +120,4 @@
<metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

View File

@ -36,18 +36,20 @@
comboBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; comboBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
comboBox.FormattingEnabled = true; comboBox.FormattingEnabled = true;
comboBox.Location = new Point(1, 0); comboBox.Location = new Point(1, 0);
comboBox.Margin = new Padding(3, 4, 3, 4);
comboBox.Name = "comboBox"; comboBox.Name = "comboBox";
comboBox.Size = new Size(323, 23); comboBox.Size = new Size(874, 28);
comboBox.TabIndex = 0; comboBox.TabIndex = 0;
comboBox.SelectedIndexChanged += ComboBox_SelectedIndexChanged; comboBox.SelectedIndexChanged += ComboBox_SelectedIndexChanged;
// //
// ComboBoxControl // ComboBoxControl
// //
AutoScaleDimensions = new SizeF(7F, 15F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
Controls.Add(comboBox); Controls.Add(comboBox);
Margin = new Padding(3, 4, 3, 4);
Name = "ComboBoxControl"; Name = "ComboBoxControl";
Size = new Size(327, 26); Size = new Size(875, 35);
ResumeLayout(false); ResumeLayout(false);
} }