160 lines
7.5 KiB
C#
160 lines
7.5 KiB
C#
using AppLauncher.Models;
|
|
using RyzStudio.Windows.ThemedForms;
|
|
using System;
|
|
|
|
namespace AppLauncher.Windows.Forms
|
|
{
|
|
public class AddListTileForm : TDialogForm
|
|
{
|
|
public static void ShowDialog(TTilePanelLayout control)
|
|
{
|
|
AddListTileForm form = new AddListTileForm();
|
|
form.TilePanelLayout = control;
|
|
form.ShowDialog();
|
|
}
|
|
|
|
private System.Windows.Forms.Label label1;
|
|
private TButton button1;
|
|
private RyzStudio.Windows.Forms.THorizontalSeparator horizontalSeparator1;
|
|
private TTextBox textBox1;
|
|
|
|
public TTilePanelLayout TilePanelLayout { get; set; } = null;
|
|
|
|
public AddListTileForm() : base()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void InitializeComponent()
|
|
{
|
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddListTileForm));
|
|
RyzStudio.Windows.ThemedForms.TButton.ButtonStyle style4 = new RyzStudio.Windows.ThemedForms.TButton.ButtonStyle();
|
|
RyzStudio.Windows.ThemedForms.TButton.ButtonStyle style5 = new RyzStudio.Windows.ThemedForms.TButton.ButtonStyle();
|
|
RyzStudio.Windows.ThemedForms.TButton.ButtonStyle style6 = new RyzStudio.Windows.ThemedForms.TButton.ButtonStyle();
|
|
this.textBox1 = new RyzStudio.Windows.ThemedForms.TTextBox();
|
|
this.label1 = new System.Windows.Forms.Label();
|
|
this.button1 = new RyzStudio.Windows.ThemedForms.TButton();
|
|
this.horizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
|
|
((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).BeginInit();
|
|
this.SuspendLayout();
|
|
//
|
|
// imgbxClose
|
|
//
|
|
this.imgbxClose.Image = ((System.Drawing.Image)(resources.GetObject("imgbxClose.Image")));
|
|
this.imgbxClose.Location = new System.Drawing.Point(367, 5);
|
|
//
|
|
// lblDescription
|
|
//
|
|
this.lblDescription.Size = new System.Drawing.Size(359, 30);
|
|
this.lblDescription.Text = "Add List Tile";
|
|
//
|
|
// panel1
|
|
//
|
|
this.panel1.Location = new System.Drawing.Point(394, 474);
|
|
//
|
|
// area1
|
|
//
|
|
this.area1.Location = new System.Drawing.Point(1, 474);
|
|
this.area1.Size = new System.Drawing.Size(392, 5);
|
|
//
|
|
// textBox1
|
|
//
|
|
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.textBox1.BackColor = System.Drawing.Color.Transparent;
|
|
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
|
|
this.textBox1.Location = new System.Drawing.Point(159, 50);
|
|
this.textBox1.Margin = new System.Windows.Forms.Padding(10, 6, 10, 6);
|
|
this.textBox1.Name = "textBox1";
|
|
this.textBox1.Padding = new System.Windows.Forms.Padding(10, 10, 9, 9);
|
|
this.textBox1.Size = new System.Drawing.Size(220, 32);
|
|
this.textBox1.SubmitButton = null;
|
|
this.textBox1.TabIndex = 152;
|
|
this.textBox1.UseSystemPasswordChar = false;
|
|
//
|
|
// label1
|
|
//
|
|
this.label1.BackColor = System.Drawing.Color.Transparent;
|
|
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(95)))), ((int)(((byte)(99)))), ((int)(((byte)(104)))));
|
|
this.label1.Location = new System.Drawing.Point(18, 50);
|
|
this.label1.Margin = new System.Windows.Forms.Padding(0);
|
|
this.label1.Name = "label1";
|
|
this.label1.Size = new System.Drawing.Size(131, 32);
|
|
this.label1.TabIndex = 153;
|
|
this.label1.Text = "Title";
|
|
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
|
//
|
|
// button1
|
|
//
|
|
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
|
this.button1.BackColor = System.Drawing.Color.Transparent;
|
|
this.button1.DefaultImage = null;
|
|
this.button1.DownImage = null;
|
|
this.button1.LabelText = "&Save";
|
|
this.button1.Location = new System.Drawing.Point(251, 427);
|
|
this.button1.Name = "button1";
|
|
this.button1.OverImage = null;
|
|
this.button1.Padding = new System.Windows.Forms.Padding(4, 4, 3, 3);
|
|
this.button1.Size = new System.Drawing.Size(128, 32);
|
|
style4.BackColour = System.Drawing.Color.White;
|
|
style4.ForeImage = null;
|
|
style4.PenColour = System.Drawing.Color.Black;
|
|
this.button1.StyleDefault = style4;
|
|
style5.BackColour = System.Drawing.Color.FromArgb(((int)(((byte)(179)))), ((int)(((byte)(179)))), ((int)(((byte)(179)))));
|
|
style5.ForeImage = null;
|
|
style5.PenColour = System.Drawing.Color.Black;
|
|
this.button1.StyleDown = style5;
|
|
style6.BackColour = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
|
|
style6.ForeImage = null;
|
|
style6.PenColour = System.Drawing.Color.White;
|
|
this.button1.StyleOver = style6;
|
|
this.button1.TabIndex = 173;
|
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
|
//
|
|
// horizontalSeparator1
|
|
//
|
|
this.horizontalSeparator1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
| System.Windows.Forms.AnchorStyles.Right)));
|
|
this.horizontalSeparator1.Location = new System.Drawing.Point(10, 92);
|
|
this.horizontalSeparator1.MaximumSize = new System.Drawing.Size(4920, 2);
|
|
this.horizontalSeparator1.Name = "horizontalSeparator1";
|
|
this.horizontalSeparator1.Size = new System.Drawing.Size(380, 2);
|
|
this.horizontalSeparator1.TabIndex = 176;
|
|
//
|
|
// AddListTileForm
|
|
//
|
|
this.ClientSize = new System.Drawing.Size(400, 480);
|
|
this.Controls.Add(this.horizontalSeparator1);
|
|
this.Controls.Add(this.button1);
|
|
this.Controls.Add(this.label1);
|
|
this.Controls.Add(this.textBox1);
|
|
this.Description = "Add List Tile";
|
|
this.Name = "AddListTileForm";
|
|
this.Controls.SetChildIndex(this.imgbxClose, 0);
|
|
this.Controls.SetChildIndex(this.lblDescription, 0);
|
|
this.Controls.SetChildIndex(this.panel1, 0);
|
|
this.Controls.SetChildIndex(this.area1, 0);
|
|
this.Controls.SetChildIndex(this.textBox1, 0);
|
|
this.Controls.SetChildIndex(this.label1, 0);
|
|
this.Controls.SetChildIndex(this.button1, 0);
|
|
this.Controls.SetChildIndex(this.horizontalSeparator1, 0);
|
|
((System.ComponentModel.ISupportInitialize)(this.imgbxClose)).EndInit();
|
|
this.ResumeLayout(false);
|
|
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
TileModel model = new TileModel()
|
|
{
|
|
Title = textBox1.Text?.Trim(),
|
|
IsGroup = true
|
|
};
|
|
|
|
this.TilePanelLayout.AddTile(model);
|
|
|
|
this.Close();
|
|
}
|
|
|
|
}
|
|
} |