добавлены аватар и имя бота в Discord, мелкие фиксы

This commit is contained in:
SlothDpal
2024-05-23 14:09:27 +03:00
parent d0eff52e10
commit 81f43f911f
7 changed files with 173 additions and 53 deletions

View File

@@ -30,15 +30,20 @@
{
this.btnOk = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.chbxDiscordEnabled = new System.Windows.Forms.CheckBox();
this.textDwhURL = new System.Windows.Forms.TextBox();
this.lblDwhURL = new System.Windows.Forms.Label();
this.btnClearUrlField = new System.Windows.Forms.Button();
this.lblDwhBotname = new System.Windows.Forms.Label();
this.lblDwhAvatarUrl = new System.Windows.Forms.Label();
this.textDwhAvatarUrl = new System.Windows.Forms.TextBox();
this.textDwhBotName = new System.Windows.Forms.TextBox();
this.textDwhURL = new System.Windows.Forms.TextBox();
this.chbxDiscordEnabled = new System.Windows.Forms.CheckBox();
this.btnClearAvatarUrlField = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnOk
//
this.btnOk.Location = new System.Drawing.Point(193, 89);
this.btnOk.Location = new System.Drawing.Point(215, 155);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 0;
@@ -49,7 +54,7 @@
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(274, 89);
this.btnCancel.Location = new System.Drawing.Point(296, 155);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 1;
@@ -57,31 +62,10 @@
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// chbxDiscordEnabled
//
this.chbxDiscordEnabled.AutoSize = true;
this.chbxDiscordEnabled.Checked = global::RelaunchProcess.Properties.Settings.Default.dwhEnabled;
this.chbxDiscordEnabled.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::RelaunchProcess.Properties.Settings.Default, "dwhEnabled", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.chbxDiscordEnabled.Location = new System.Drawing.Point(12, 63);
this.chbxDiscordEnabled.Name = "chbxDiscordEnabled";
this.chbxDiscordEnabled.Size = new System.Drawing.Size(232, 17);
this.chbxDiscordEnabled.TabIndex = 2;
this.chbxDiscordEnabled.Text = "Включить отправку сообщений в Discord";
this.chbxDiscordEnabled.UseVisualStyleBackColor = true;
//
// textDwhURL
//
this.textDwhURL.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::RelaunchProcess.Properties.Settings.Default, "dwhURL", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.textDwhURL.Location = new System.Drawing.Point(12, 37);
this.textDwhURL.Name = "textDwhURL";
this.textDwhURL.Size = new System.Drawing.Size(337, 20);
this.textDwhURL.TabIndex = 3;
this.textDwhURL.Text = global::RelaunchProcess.Properties.Settings.Default.dwhURL;
//
// lblDwhURL
//
this.lblDwhURL.AutoSize = true;
this.lblDwhURL.Location = new System.Drawing.Point(9, 9);
this.lblDwhURL.Location = new System.Drawing.Point(9, 87);
this.lblDwhURL.Name = "lblDwhURL";
this.lblDwhURL.Size = new System.Drawing.Size(147, 13);
this.lblDwhURL.TabIndex = 4;
@@ -90,13 +74,84 @@
// btnClearUrlField
//
this.btnClearUrlField.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.btnClearUrlField.Location = new System.Drawing.Point(351, 38);
this.btnClearUrlField.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.btnClearUrlField.Location = new System.Drawing.Point(352, 103);
this.btnClearUrlField.Name = "btnClearUrlField";
this.btnClearUrlField.Size = new System.Drawing.Size(19, 19);
this.btnClearUrlField.TabIndex = 5;
this.btnClearUrlField.Text = "X";
this.btnClearUrlField.UseVisualStyleBackColor = true;
this.btnClearUrlField.Click += new System.EventHandler(this.BtnClearUrlField_Click);
this.btnClearUrlField.Click += new System.EventHandler(this.ClearUrl);
//
// lblDwhBotname
//
this.lblDwhBotname.AutoSize = true;
this.lblDwhBotname.Location = new System.Drawing.Point(9, 9);
this.lblDwhBotname.Name = "lblDwhBotname";
this.lblDwhBotname.Size = new System.Drawing.Size(127, 13);
this.lblDwhBotname.TabIndex = 6;
this.lblDwhBotname.Text = "Имя бота в сообщении:";
//
// lblDwhAvatarUrl
//
this.lblDwhAvatarUrl.AutoSize = true;
this.lblDwhAvatarUrl.Location = new System.Drawing.Point(9, 48);
this.lblDwhAvatarUrl.Name = "lblDwhAvatarUrl";
this.lblDwhAvatarUrl.Size = new System.Drawing.Size(102, 13);
this.lblDwhAvatarUrl.TabIndex = 6;
this.lblDwhAvatarUrl.Text = "URL аватара бота:";
//
// textDwhAvatarUrl
//
this.textDwhAvatarUrl.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::RelaunchProcess.Properties.Settings.Default, "dwhAvatarURL", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.textDwhAvatarUrl.Location = new System.Drawing.Point(9, 64);
this.textDwhAvatarUrl.Name = "textDwhAvatarUrl";
this.textDwhAvatarUrl.Size = new System.Drawing.Size(337, 20);
this.textDwhAvatarUrl.TabIndex = 7;
this.textDwhAvatarUrl.Text = global::RelaunchProcess.Properties.Settings.Default.dwhAvatarURL;
//
// textDwhBotName
//
this.textDwhBotName.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::RelaunchProcess.Properties.Settings.Default, "dwhBotname", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.textDwhBotName.Location = new System.Drawing.Point(9, 25);
this.textDwhBotName.MaxLength = 40;
this.textDwhBotName.Name = "textDwhBotName";
this.textDwhBotName.Size = new System.Drawing.Size(211, 20);
this.textDwhBotName.TabIndex = 7;
this.textDwhBotName.Text = global::RelaunchProcess.Properties.Settings.Default.dwhBotname;
//
// textDwhURL
//
this.textDwhURL.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::RelaunchProcess.Properties.Settings.Default, "dwhURL", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.textDwhURL.Location = new System.Drawing.Point(9, 103);
this.textDwhURL.Name = "textDwhURL";
this.textDwhURL.Size = new System.Drawing.Size(337, 20);
this.textDwhURL.TabIndex = 3;
this.textDwhURL.Text = global::RelaunchProcess.Properties.Settings.Default.dwhURL;
//
// chbxDiscordEnabled
//
this.chbxDiscordEnabled.AutoSize = true;
this.chbxDiscordEnabled.Checked = global::RelaunchProcess.Properties.Settings.Default.dwhEnabled;
this.chbxDiscordEnabled.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::RelaunchProcess.Properties.Settings.Default, "dwhEnabled", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.chbxDiscordEnabled.Location = new System.Drawing.Point(9, 129);
this.chbxDiscordEnabled.Name = "chbxDiscordEnabled";
this.chbxDiscordEnabled.Size = new System.Drawing.Size(232, 17);
this.chbxDiscordEnabled.TabIndex = 2;
this.chbxDiscordEnabled.Text = "Включить отправку сообщений в Discord";
this.chbxDiscordEnabled.UseVisualStyleBackColor = true;
//
// btnClearAvatarUrlField
//
this.btnClearAvatarUrlField.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.btnClearAvatarUrlField.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.btnClearAvatarUrlField.Location = new System.Drawing.Point(352, 65);
this.btnClearAvatarUrlField.Name = "btnClearAvatarUrlField";
this.btnClearAvatarUrlField.Size = new System.Drawing.Size(19, 19);
this.btnClearAvatarUrlField.TabIndex = 5;
this.btnClearAvatarUrlField.Text = "X";
this.btnClearAvatarUrlField.UseVisualStyleBackColor = true;
this.btnClearAvatarUrlField.Click += new System.EventHandler(this.ClearUrl);
//
// DiscordSettings
//
@@ -104,8 +159,13 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(375, 128);
this.ClientSize = new System.Drawing.Size(387, 188);
this.ControlBox = false;
this.Controls.Add(this.textDwhAvatarUrl);
this.Controls.Add(this.textDwhBotName);
this.Controls.Add(this.lblDwhAvatarUrl);
this.Controls.Add(this.lblDwhBotname);
this.Controls.Add(this.btnClearAvatarUrlField);
this.Controls.Add(this.btnClearUrlField);
this.Controls.Add(this.lblDwhURL);
this.Controls.Add(this.textDwhURL);
@@ -132,5 +192,10 @@
private System.Windows.Forms.TextBox textDwhURL;
private System.Windows.Forms.Label lblDwhURL;
private System.Windows.Forms.Button btnClearUrlField;
private System.Windows.Forms.Label lblDwhBotname;
private System.Windows.Forms.TextBox textDwhBotName;
private System.Windows.Forms.Label lblDwhAvatarUrl;
private System.Windows.Forms.TextBox textDwhAvatarUrl;
private System.Windows.Forms.Button btnClearAvatarUrlField;
}
}