2021-06-27 21:35:07 +12:00
|
|
|
|
// <copyright file="Menu.ControlsTheDesignerRemoves.cs" company="PlaceholderCompany">
|
|
|
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
|
|
namespace SystemTrayMenu.UserInterface
|
2021-06-19 05:31:30 +12:00
|
|
|
|
{
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
2021-06-27 01:23:39 +12:00
|
|
|
|
using SystemTrayMenu.Utilities;
|
2021-06-19 05:31:30 +12:00
|
|
|
|
|
|
|
|
|
internal partial class Menu
|
|
|
|
|
{
|
2021-10-04 07:24:22 +13:00
|
|
|
|
public bool IsLoadingMenu { get; internal set; }
|
|
|
|
|
|
2021-06-19 05:31:30 +12:00
|
|
|
|
private void InitializeComponentControlsTheDesignerRemoves()
|
|
|
|
|
{
|
2021-11-17 12:13:46 +13:00
|
|
|
|
DataGridViewCellStyle dataGridViewCellStyle1 = new();
|
|
|
|
|
DataGridViewCellStyle dataGridViewCellStyle2 = new();
|
|
|
|
|
DataGridViewCellStyle dataGridViewCellStyle3 = new();
|
2021-06-19 05:31:30 +12:00
|
|
|
|
|
|
|
|
|
labelTitle = new LabelNoCopy();
|
|
|
|
|
ColumnText = new DataGridViewTextBoxColumn();
|
|
|
|
|
ColumnIcon = new DataGridViewImageColumn();
|
|
|
|
|
|
|
|
|
|
customScrollbar = new CustomScrollbar();
|
|
|
|
|
|
|
|
|
|
tableLayoutPanelDgvAndScrollbar.Controls.Add(customScrollbar, 1, 0);
|
|
|
|
|
|
2021-06-26 23:24:56 +12:00
|
|
|
|
// tableLayoutPanelDgvAndScrollbar.SuspendLayout();
|
|
|
|
|
// ((System.ComponentModel.ISupportInitialize)dgv).BeginInit();
|
|
|
|
|
// tableLayoutPanelSearch.SuspendLayout();
|
|
|
|
|
// ((System.ComponentModel.ISupportInitialize)pictureBoxSearch).BeginInit();
|
|
|
|
|
// tableLayoutPanelMenu.SuspendLayout();
|
|
|
|
|
// SuspendLayout();
|
2021-06-19 05:31:30 +12:00
|
|
|
|
|
|
|
|
|
// labelTitle
|
|
|
|
|
labelTitle.AutoEllipsis = true;
|
|
|
|
|
labelTitle.AutoSize = true;
|
|
|
|
|
labelTitle.Dock = DockStyle.Fill;
|
2021-10-11 03:44:06 +13:00
|
|
|
|
labelTitle.Font = new Font("Segoe UI", 8.25F * Scaling.Factor, FontStyle.Bold, GraphicsUnit.Point, 0);
|
2021-06-19 05:31:30 +12:00
|
|
|
|
labelTitle.ForeColor = Color.Black;
|
|
|
|
|
labelTitle.Location = new Point(0, 0);
|
|
|
|
|
labelTitle.Margin = new Padding(0);
|
|
|
|
|
labelTitle.Name = "labelTitle";
|
|
|
|
|
labelTitle.Padding = new Padding(3, 0, 0, 1);
|
|
|
|
|
labelTitle.Size = new Size(70, 14);
|
2021-11-14 01:55:01 +13:00
|
|
|
|
labelTitle.Text = "SystemTrayMenu";
|
2021-06-19 05:31:30 +12:00
|
|
|
|
labelTitle.TextAlign = ContentAlignment.MiddleCenter;
|
|
|
|
|
labelTitle.MouseWheel += new MouseEventHandler(DgvMouseWheel);
|
|
|
|
|
|
|
|
|
|
// ColumnIcon
|
|
|
|
|
ColumnIcon.DataPropertyName = "ColumnIcon";
|
|
|
|
|
dataGridViewCellStyle1.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
|
|
|
|
dataGridViewCellStyle1.NullValue = "System.Drawing.Icon";
|
|
|
|
|
dataGridViewCellStyle1.Padding = new Padding(3, 2, 6, 2);
|
|
|
|
|
ColumnIcon.DefaultCellStyle = dataGridViewCellStyle1;
|
|
|
|
|
ColumnIcon.Frozen = true;
|
|
|
|
|
ColumnIcon.HeaderText = "ColumnIcon";
|
|
|
|
|
ColumnIcon.ImageLayout = DataGridViewImageCellLayout.Zoom;
|
|
|
|
|
ColumnIcon.Name = "ColumnIcon";
|
|
|
|
|
ColumnIcon.ReadOnly = true;
|
|
|
|
|
ColumnIcon.Resizable = DataGridViewTriState.False;
|
|
|
|
|
ColumnIcon.Width = 25;
|
|
|
|
|
|
|
|
|
|
// ColumnText
|
|
|
|
|
ColumnText.DataPropertyName = "ColumnText";
|
|
|
|
|
dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleLeft;
|
|
|
|
|
dataGridViewCellStyle2.Padding = new Padding(0, 0, 3, 0);
|
|
|
|
|
ColumnText.DefaultCellStyle = dataGridViewCellStyle2;
|
|
|
|
|
ColumnText.Frozen = true;
|
|
|
|
|
ColumnText.HeaderText = "ColumnText";
|
|
|
|
|
ColumnText.MaxInputLength = 40;
|
|
|
|
|
ColumnText.Name = "ColumnText";
|
|
|
|
|
ColumnText.ReadOnly = true;
|
|
|
|
|
ColumnText.Resizable = DataGridViewTriState.False;
|
|
|
|
|
ColumnText.SortMode = DataGridViewColumnSortMode.Programmatic;
|
|
|
|
|
ColumnText.Width = 25;
|
|
|
|
|
|
|
|
|
|
dgv.Columns.AddRange(new DataGridViewColumn[]
|
|
|
|
|
{
|
|
|
|
|
ColumnIcon,
|
|
|
|
|
ColumnText,
|
|
|
|
|
});
|
|
|
|
|
|
2021-10-11 03:44:06 +13:00
|
|
|
|
dataGridViewCellStyle3.Font = new Font("Segoe UI", 7F * Scaling.Factor, FontStyle.Regular, GraphicsUnit.Pixel, 0);
|
2021-06-19 05:31:30 +12:00
|
|
|
|
dgv.RowsDefaultCellStyle = dataGridViewCellStyle3;
|
|
|
|
|
|
2021-10-11 03:44:06 +13:00
|
|
|
|
dgv.RowTemplate.DefaultCellStyle.Font = new Font("Segoe UI", 9F * Scaling.Factor, FontStyle.Regular, GraphicsUnit.Point, 0);
|
2021-06-19 05:31:30 +12:00
|
|
|
|
dgv.RowTemplate.Height = 20;
|
|
|
|
|
dgv.RowTemplate.ReadOnly = true;
|
|
|
|
|
|
|
|
|
|
textBoxSearch.ContextMenuStrip = new ContextMenuStrip();
|
|
|
|
|
|
|
|
|
|
tableLayoutPanelTitle.Controls.Add(labelTitle, 1, 0);
|
|
|
|
|
|
|
|
|
|
// customScrollbar
|
|
|
|
|
customScrollbar.Location = new Point(0, 0);
|
|
|
|
|
customScrollbar.Name = "customScrollbar";
|
2021-06-27 01:23:39 +12:00
|
|
|
|
customScrollbar.Size = new Size(Scaling.Scale(15), 40);
|
|
|
|
|
|
2021-11-22 05:24:01 +13:00
|
|
|
|
pictureBoxOpenFolder.Size = new Size(
|
|
|
|
|
Scaling.Scale(pictureBoxOpenFolder.Width),
|
|
|
|
|
Scaling.Scale(pictureBoxOpenFolder.Height));
|
|
|
|
|
|
2021-06-27 01:23:39 +12:00
|
|
|
|
pictureBoxMenuAlwaysOpen.Size = new Size(
|
|
|
|
|
Scaling.Scale(pictureBoxMenuAlwaysOpen.Width),
|
|
|
|
|
Scaling.Scale(pictureBoxMenuAlwaysOpen.Height));
|
|
|
|
|
|
2021-11-22 05:24:01 +13:00
|
|
|
|
pictureBoxSettings.Size = new Size(
|
|
|
|
|
Scaling.Scale(pictureBoxSettings.Width),
|
|
|
|
|
Scaling.Scale(pictureBoxSettings.Height));
|
|
|
|
|
|
|
|
|
|
pictureBoxRestart.Size = new Size(
|
|
|
|
|
Scaling.Scale(pictureBoxRestart.Width),
|
|
|
|
|
Scaling.Scale(pictureBoxRestart.Height));
|
2021-06-27 01:23:39 +12:00
|
|
|
|
|
|
|
|
|
pictureBoxSearch.Size = new Size(
|
|
|
|
|
Scaling.Scale(pictureBoxSearch.Width),
|
|
|
|
|
Scaling.Scale(pictureBoxSearch.Height));
|
2021-06-19 05:31:30 +12:00
|
|
|
|
|
2021-06-28 00:44:12 +12:00
|
|
|
|
pictureBoxFoldersCount.Size = new Size(
|
|
|
|
|
Scaling.Scale(pictureBoxFoldersCount.Width),
|
|
|
|
|
Scaling.Scale(pictureBoxFoldersCount.Height));
|
|
|
|
|
|
|
|
|
|
pictureBoxFilesCount.Size = new Size(
|
|
|
|
|
Scaling.Scale(pictureBoxFilesCount.Width),
|
|
|
|
|
Scaling.Scale(pictureBoxFilesCount.Height));
|
|
|
|
|
|
2021-10-11 03:44:06 +13:00
|
|
|
|
labelFoldersCount.Font = new Font("Segoe UI", 7F * Scaling.Factor, FontStyle.Bold, GraphicsUnit.Point, 0);
|
|
|
|
|
labelFilesCount.Font = new Font("Segoe UI", 7F * Scaling.Factor, FontStyle.Bold, GraphicsUnit.Point, 0);
|
2021-06-28 00:44:12 +12:00
|
|
|
|
|
2021-06-26 23:24:56 +12:00
|
|
|
|
// tableLayoutPanelDgvAndScrollbar.ResumeLayout(false);
|
|
|
|
|
// ((System.ComponentModel.ISupportInitialize)dgv).EndInit();
|
|
|
|
|
// tableLayoutPanelSearch.ResumeLayout(false);
|
|
|
|
|
// tableLayoutPanelSearch.PerformLayout();
|
|
|
|
|
// ((System.ComponentModel.ISupportInitialize)pictureBoxSearch).EndInit();
|
|
|
|
|
// tableLayoutPanelMenu.ResumeLayout(false);
|
|
|
|
|
// tableLayoutPanelMenu.PerformLayout();
|
|
|
|
|
// customScrollbar.PerformLayout();
|
|
|
|
|
// ResumeLayout(false);
|
|
|
|
|
// PerformLayout();
|
2021-06-19 05:31:30 +12:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|