diff --git a/PCK-Studio/Forms/Additional-Popups/TextPrompt.Designer.cs b/PCK-Studio/Forms/Additional-Popups/TextPrompt.Designer.cs new file mode 100644 index 00000000..34269697 --- /dev/null +++ b/PCK-Studio/Forms/Additional-Popups/TextPrompt.Designer.cs @@ -0,0 +1,122 @@ +namespace PckStudio.Forms.Additional_Popups +{ + partial class TextPrompt + { + /// + /// 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.PromptTextBox = new MetroFramework.Controls.MetroTextBox(); + this.okBtn = new MetroFramework.Controls.MetroButton(); + this.metroButton1 = new MetroFramework.Controls.MetroButton(); + this.SuspendLayout(); + // + // PromptTextBox + // + // + // + // + this.PromptTextBox.CustomButton.Image = null; + this.PromptTextBox.CustomButton.Location = new System.Drawing.Point(34, 1); + this.PromptTextBox.CustomButton.Name = ""; + this.PromptTextBox.CustomButton.Size = new System.Drawing.Size(283, 283); + this.PromptTextBox.CustomButton.Style = MetroFramework.MetroColorStyle.Blue; + this.PromptTextBox.CustomButton.TabIndex = 1; + this.PromptTextBox.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light; + this.PromptTextBox.CustomButton.UseSelectable = true; + this.PromptTextBox.CustomButton.Visible = false; + this.PromptTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.PromptTextBox.Lines = new string[0]; + this.PromptTextBox.Location = new System.Drawing.Point(20, 60); + this.PromptTextBox.MaxLength = 32767; + this.PromptTextBox.Multiline = true; + this.PromptTextBox.Name = "PromptTextBox"; + this.PromptTextBox.PasswordChar = '\0'; + this.PromptTextBox.PromptText = "Paste Multi-line text here..."; + this.PromptTextBox.ScrollBars = System.Windows.Forms.ScrollBars.None; + this.PromptTextBox.SelectedText = ""; + this.PromptTextBox.SelectionLength = 0; + this.PromptTextBox.SelectionStart = 0; + this.PromptTextBox.ShortcutsEnabled = true; + this.PromptTextBox.ShowClearButton = true; + this.PromptTextBox.Size = new System.Drawing.Size(318, 285); + this.PromptTextBox.Style = MetroFramework.MetroColorStyle.Black; + this.PromptTextBox.TabIndex = 0; + this.PromptTextBox.Theme = MetroFramework.MetroThemeStyle.Dark; + this.PromptTextBox.UseSelectable = true; + this.PromptTextBox.WaterMark = "Paste Multi-line text here..."; + this.PromptTextBox.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109))))); + this.PromptTextBox.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel); + // + // okBtn + // + this.okBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okBtn.Location = new System.Drawing.Point(264, 351); + this.okBtn.Name = "okBtn"; + this.okBtn.Size = new System.Drawing.Size(74, 23); + this.okBtn.TabIndex = 1; + this.okBtn.Text = "OK"; + this.okBtn.Theme = MetroFramework.MetroThemeStyle.Dark; + this.okBtn.UseSelectable = true; + this.okBtn.Click += new System.EventHandler(this.okBtn_Click); + // + // metroButton1 + // + this.metroButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.metroButton1.Location = new System.Drawing.Point(183, 351); + this.metroButton1.Name = "metroButton1"; + this.metroButton1.Size = new System.Drawing.Size(75, 23); + this.metroButton1.TabIndex = 2; + this.metroButton1.Text = "Cancel"; + this.metroButton1.Theme = MetroFramework.MetroThemeStyle.Dark; + this.metroButton1.UseSelectable = true; + this.metroButton1.Click += new System.EventHandler(this.metroButton1_Click); + // + // TextPrompt + // + this.AcceptButton = this.okBtn; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(358, 385); + this.Controls.Add(this.metroButton1); + this.Controls.Add(this.okBtn); + this.Controls.Add(this.PromptTextBox); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(270, 335); + this.Name = "TextPrompt"; + this.Padding = new System.Windows.Forms.Padding(20, 60, 20, 40); + this.Style = MetroFramework.MetroColorStyle.Black; + this.Theme = MetroFramework.MetroThemeStyle.Dark; + this.ResumeLayout(false); + + } + + #endregion + + private MetroFramework.Controls.MetroTextBox PromptTextBox; + private MetroFramework.Controls.MetroButton okBtn; + private MetroFramework.Controls.MetroButton metroButton1; + } +} \ No newline at end of file diff --git a/PCK-Studio/Forms/Additional-Popups/TextPrompt.cs b/PCK-Studio/Forms/Additional-Popups/TextPrompt.cs new file mode 100644 index 00000000..a24f0a0c --- /dev/null +++ b/PCK-Studio/Forms/Additional-Popups/TextPrompt.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace PckStudio.Forms.Additional_Popups +{ + public partial class TextPrompt : MetroFramework.Forms.MetroForm + { + public string[] TextOutput => DialogResult == DialogResult.OK ? PromptTextBox.Lines : null; + public TextPrompt() + { + InitializeComponent(); + } + + private void okBtn_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + } + + private void metroButton1_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + } + } +} diff --git a/PCK-Studio/Forms/Additional-Popups/TextPrompt.resx b/PCK-Studio/Forms/Additional-Popups/TextPrompt.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/PCK-Studio/Forms/Additional-Popups/TextPrompt.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/PCK-Studio/PckStudio.csproj b/PCK-Studio/PckStudio.csproj index 001f58c0..e36b48c3 100644 --- a/PCK-Studio/PckStudio.csproj +++ b/PCK-Studio/PckStudio.csproj @@ -229,6 +229,12 @@ RenamePrompt.cs + + Form + + + TextPrompt.cs + Form @@ -447,6 +453,9 @@ RenamePrompt.cs Designer + + TextPrompt.cs + COLEditor.cs