убирает редактируемость поля с сообщением

fixes #36
This commit is contained in:
Maxim Slipenko 2022-05-24 16:13:22 +03:00
parent fbb645930c
commit caaf57b46e
Signed by: Maks1mS
GPG Key ID: 7461AF39A8705FB8
2 changed files with 172 additions and 170 deletions

View File

@ -35,35 +35,35 @@
this.pathToJournalTextBox = new System.Windows.Forms.TextBox(); this.pathToJournalTextBox = new System.Windows.Forms.TextBox();
this.usersTabPage = new System.Windows.Forms.TabPage(); this.usersTabPage = new System.Windows.Forms.TabPage();
this.usersDataGridView = new System.Windows.Forms.DataGridView(); this.usersDataGridView = new System.Windows.Forms.DataGridView();
this.journalTabPage = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel();
this.journalDataGridView = new System.Windows.Forms.DataGridView();
this.editUserButton = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.deleteUserButton = new System.Windows.Forms.Button(); this.deleteUserButton = new System.Windows.Forms.Button();
this.sqliteCommand1 = new Microsoft.Data.Sqlite.SqliteCommand(); this.editUserButton = new System.Windows.Forms.Button();
this.journalTabPage = new System.Windows.Forms.TabPage();
this.panel3 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label(); this.journalDataGridView = new System.Windows.Forms.DataGridView();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.messageRichTextBox = new System.Windows.Forms.RichTextBox();
this.panel4 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel();
this.deleteJournalButton = new System.Windows.Forms.Button(); this.deleteJournalButton = new System.Windows.Forms.Button();
this.dateLabel = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel();
this.userLabel = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label2 = new System.Windows.Forms.Label();
this.messageRichTextBox = new System.Windows.Forms.RichTextBox();
this.userLabel = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.dateLabel = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.actionLabel = new System.Windows.Forms.Label(); this.actionLabel = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label();
this.sqliteCommand1 = new Microsoft.Data.Sqlite.SqliteCommand();
this.mainTabControl.SuspendLayout(); this.mainTabControl.SuspendLayout();
this.mainSettingsTabPage.SuspendLayout(); this.mainSettingsTabPage.SuspendLayout();
this.usersTabPage.SuspendLayout(); this.usersTabPage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.usersDataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.usersDataGridView)).BeginInit();
this.journalTabPage.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.journalDataGridView)).BeginInit();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.journalTabPage.SuspendLayout();
this.panel3.SuspendLayout(); this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.journalDataGridView)).BeginInit();
this.panel4.SuspendLayout(); this.panel4.SuspendLayout();
this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -141,49 +141,6 @@
this.usersDataGridView.Size = new System.Drawing.Size(984, 497); this.usersDataGridView.Size = new System.Drawing.Size(984, 497);
this.usersDataGridView.TabIndex = 0; this.usersDataGridView.TabIndex = 0;
// //
// journalTabPage
//
this.journalTabPage.Controls.Add(this.panel3);
this.journalTabPage.Controls.Add(this.panel1);
this.journalTabPage.Location = new System.Drawing.Point(4, 22);
this.journalTabPage.Name = "journalTabPage";
this.journalTabPage.Size = new System.Drawing.Size(990, 531);
this.journalTabPage.TabIndex = 2;
this.journalTabPage.Text = "Журнал";
this.journalTabPage.UseVisualStyleBackColor = true;
this.journalTabPage.Click += new System.EventHandler(this.journalTabPage_Click);
//
// panel1
//
this.panel1.Controls.Add(this.tableLayoutPanel1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
this.panel1.Location = new System.Drawing.Point(536, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(454, 531);
this.panel1.TabIndex = 1;
//
// journalDataGridView
//
this.journalDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.journalDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.journalDataGridView.Location = new System.Drawing.Point(0, 37);
this.journalDataGridView.Name = "journalDataGridView";
this.journalDataGridView.ReadOnly = true;
this.journalDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.journalDataGridView.Size = new System.Drawing.Size(536, 494);
this.journalDataGridView.TabIndex = 0;
this.journalDataGridView.SelectionChanged += new System.EventHandler(this.journalDataGridView_SelectionChanged);
//
// editUserButton
//
this.editUserButton.Location = new System.Drawing.Point(3, 3);
this.editUserButton.Name = "editUserButton";
this.editUserButton.Size = new System.Drawing.Size(131, 20);
this.editUserButton.TabIndex = 1;
this.editUserButton.Text = "Редактировать";
this.editUserButton.UseVisualStyleBackColor = true;
this.editUserButton.Click += new System.EventHandler(this.editUserButton_Click);
//
// panel2 // panel2
// //
this.panel2.Controls.Add(this.deleteUserButton); this.panel2.Controls.Add(this.deleteUserButton);
@ -204,12 +161,27 @@
this.deleteUserButton.UseVisualStyleBackColor = true; this.deleteUserButton.UseVisualStyleBackColor = true;
this.deleteUserButton.Click += new System.EventHandler(this.deleteUserButton_Click); this.deleteUserButton.Click += new System.EventHandler(this.deleteUserButton_Click);
// //
// sqliteCommand1 // editUserButton
// //
this.sqliteCommand1.CommandTimeout = 30; this.editUserButton.Location = new System.Drawing.Point(3, 3);
this.sqliteCommand1.Connection = null; this.editUserButton.Name = "editUserButton";
this.sqliteCommand1.Transaction = null; this.editUserButton.Size = new System.Drawing.Size(131, 20);
this.sqliteCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None; this.editUserButton.TabIndex = 1;
this.editUserButton.Text = "Редактировать";
this.editUserButton.UseVisualStyleBackColor = true;
this.editUserButton.Click += new System.EventHandler(this.editUserButton_Click);
//
// journalTabPage
//
this.journalTabPage.Controls.Add(this.panel3);
this.journalTabPage.Controls.Add(this.panel1);
this.journalTabPage.Location = new System.Drawing.Point(4, 22);
this.journalTabPage.Name = "journalTabPage";
this.journalTabPage.Size = new System.Drawing.Size(990, 531);
this.journalTabPage.TabIndex = 2;
this.journalTabPage.Text = "Журнал";
this.journalTabPage.UseVisualStyleBackColor = true;
this.journalTabPage.Click += new System.EventHandler(this.journalTabPage_Click);
// //
// panel3 // panel3
// //
@ -221,41 +193,17 @@
this.panel3.Size = new System.Drawing.Size(536, 531); this.panel3.Size = new System.Drawing.Size(536, 531);
this.panel3.TabIndex = 2; this.panel3.TabIndex = 2;
// //
// label2 // journalDataGridView
// //
this.label2.AutoSize = true; this.journalDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.label2.Location = new System.Drawing.Point(3, 0); this.journalDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Name = "label2"; this.journalDataGridView.Location = new System.Drawing.Point(0, 37);
this.label2.Size = new System.Drawing.Size(36, 13); this.journalDataGridView.Name = "journalDataGridView";
this.label2.TabIndex = 0; this.journalDataGridView.ReadOnly = true;
this.label2.Text = "Дата:"; this.journalDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
// this.journalDataGridView.Size = new System.Drawing.Size(536, 494);
// label3 this.journalDataGridView.TabIndex = 0;
// this.journalDataGridView.SelectionChanged += new System.EventHandler(this.journalDataGridView_SelectionChanged);
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 30);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(83, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Пользователь:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 60);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(54, 13);
this.label4.TabIndex = 2;
this.label4.Text = "Событие:";
//
// messageRichTextBox
//
this.messageRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.messageRichTextBox.Location = new System.Drawing.Point(103, 93);
this.messageRichTextBox.Name = "messageRichTextBox";
this.messageRichTextBox.Size = new System.Drawing.Size(348, 435);
this.messageRichTextBox.TabIndex = 3;
this.messageRichTextBox.Text = "";
// //
// panel4 // panel4
// //
@ -276,21 +224,14 @@
this.deleteJournalButton.UseVisualStyleBackColor = true; this.deleteJournalButton.UseVisualStyleBackColor = true;
this.deleteJournalButton.Click += new System.EventHandler(this.deleteJournalButton_Click); this.deleteJournalButton.Click += new System.EventHandler(this.deleteJournalButton_Click);
// //
// dateLabel // panel1
// //
this.dateLabel.AutoSize = true; this.panel1.Controls.Add(this.tableLayoutPanel1);
this.dateLabel.Location = new System.Drawing.Point(103, 0); this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
this.dateLabel.Name = "dateLabel"; this.panel1.Location = new System.Drawing.Point(536, 0);
this.dateLabel.Size = new System.Drawing.Size(0, 13); this.panel1.Name = "panel1";
this.dateLabel.TabIndex = 4; this.panel1.Size = new System.Drawing.Size(454, 531);
// this.panel1.TabIndex = 1;
// userLabel
//
this.userLabel.AutoSize = true;
this.userLabel.Location = new System.Drawing.Point(103, 30);
this.userLabel.Name = "userLabel";
this.userLabel.Size = new System.Drawing.Size(0, 13);
this.userLabel.TabIndex = 5;
// //
// tableLayoutPanel1 // tableLayoutPanel1
// //
@ -316,6 +257,59 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(454, 531); this.tableLayoutPanel1.Size = new System.Drawing.Size(454, 531);
this.tableLayoutPanel1.TabIndex = 6; this.tableLayoutPanel1.TabIndex = 6;
// //
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(36, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Дата:";
//
// messageRichTextBox
//
this.messageRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.messageRichTextBox.Location = new System.Drawing.Point(103, 93);
this.messageRichTextBox.Name = "messageRichTextBox";
this.messageRichTextBox.ReadOnly = true;
this.messageRichTextBox.Size = new System.Drawing.Size(348, 435);
this.messageRichTextBox.TabIndex = 3;
this.messageRichTextBox.Text = "";
//
// userLabel
//
this.userLabel.AutoSize = true;
this.userLabel.Location = new System.Drawing.Point(103, 30);
this.userLabel.Name = "userLabel";
this.userLabel.Size = new System.Drawing.Size(0, 13);
this.userLabel.TabIndex = 5;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 60);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(54, 13);
this.label4.TabIndex = 2;
this.label4.Text = "Событие:";
//
// dateLabel
//
this.dateLabel.AutoSize = true;
this.dateLabel.Location = new System.Drawing.Point(103, 0);
this.dateLabel.Name = "dateLabel";
this.dateLabel.Size = new System.Drawing.Size(0, 13);
this.dateLabel.TabIndex = 4;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 30);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(83, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Пользователь:";
//
// actionLabel // actionLabel
// //
this.actionLabel.AutoSize = true; this.actionLabel.AutoSize = true;
@ -333,6 +327,13 @@
this.label5.TabIndex = 7; this.label5.TabIndex = 7;
this.label5.Text = "Сообщение:"; this.label5.Text = "Сообщение:";
// //
// sqliteCommand1
//
this.sqliteCommand1.CommandTimeout = 30;
this.sqliteCommand1.Connection = null;
this.sqliteCommand1.Transaction = null;
this.sqliteCommand1.UpdatedRowSource = System.Data.UpdateRowSource.None;
//
// AdministrationForm // AdministrationForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -347,12 +348,12 @@
this.mainSettingsTabPage.PerformLayout(); this.mainSettingsTabPage.PerformLayout();
this.usersTabPage.ResumeLayout(false); this.usersTabPage.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.usersDataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.usersDataGridView)).EndInit();
this.journalTabPage.ResumeLayout(false);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.journalDataGridView)).EndInit();
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.journalTabPage.ResumeLayout(false);
this.panel3.ResumeLayout(false); this.panel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.journalDataGridView)).EndInit();
this.panel4.ResumeLayout(false); this.panel4.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout(); this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);

115
JournalForm.Designer.cs generated
View File

@ -30,13 +30,13 @@
{ {
this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.dataLabel = new System.Windows.Forms.Label(); this.dataLabel = new System.Windows.Forms.Label();
this.actionLabel = new System.Windows.Forms.Label(); this.actionLabel = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.label2 = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
@ -64,60 +64,6 @@
this.panel1.Size = new System.Drawing.Size(458, 451); this.panel1.Size = new System.Drawing.Size(458, 451);
this.panel1.TabIndex = 1; this.panel1.TabIndex = 1;
// //
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(36, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Дата:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 30);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(54, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Событие:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 50);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 13);
this.label3.TabIndex = 4;
this.label3.Text = "Сообщение:";
//
// dataLabel
//
this.dataLabel.AutoSize = true;
this.dataLabel.Location = new System.Drawing.Point(141, 10);
this.dataLabel.Name = "dataLabel";
this.dataLabel.Size = new System.Drawing.Size(54, 13);
this.dataLabel.TabIndex = 5;
this.dataLabel.Text = "dataLabel";
//
// actionLabel
//
this.actionLabel.AutoSize = true;
this.actionLabel.Location = new System.Drawing.Point(141, 30);
this.actionLabel.Name = "actionLabel";
this.actionLabel.Size = new System.Drawing.Size(62, 13);
this.actionLabel.TabIndex = 6;
this.actionLabel.Text = "actionLabel";
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(141, 53);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(304, 385);
this.richTextBox1.TabIndex = 7;
this.richTextBox1.Text = "";
//
// tableLayoutPanel1 // tableLayoutPanel1
// //
this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnCount = 2;
@ -140,6 +86,61 @@
this.tableLayoutPanel1.Size = new System.Drawing.Size(458, 451); this.tableLayoutPanel1.Size = new System.Drawing.Size(458, 451);
this.tableLayoutPanel1.TabIndex = 8; this.tableLayoutPanel1.TabIndex = 8;
// //
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 10);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(36, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Дата:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(13, 50);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(68, 13);
this.label3.TabIndex = 4;
this.label3.Text = "Сообщение:";
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(141, 53);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(304, 385);
this.richTextBox1.TabIndex = 7;
this.richTextBox1.Text = "";
//
// dataLabel
//
this.dataLabel.AutoSize = true;
this.dataLabel.Location = new System.Drawing.Point(141, 10);
this.dataLabel.Name = "dataLabel";
this.dataLabel.Size = new System.Drawing.Size(54, 13);
this.dataLabel.TabIndex = 5;
this.dataLabel.Text = "dataLabel";
//
// actionLabel
//
this.actionLabel.AutoSize = true;
this.actionLabel.Location = new System.Drawing.Point(141, 30);
this.actionLabel.Name = "actionLabel";
this.actionLabel.Size = new System.Drawing.Size(62, 13);
this.actionLabel.TabIndex = 6;
this.actionLabel.Text = "actionLabel";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 30);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(54, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Событие:";
//
// JournalForm // JournalForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);