-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathMenu.ControlsTheDesignerRemoves.cs
148 lines (123 loc) · 6.4 KB
/
Menu.ControlsTheDesignerRemoves.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// <copyright file="Menu.ControlsTheDesignerRemoves.cs" company="PlaceholderCompany">
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
namespace SystemTrayMenu.UserInterface
{
using System.Drawing;
using System.Windows.Forms;
using SystemTrayMenu.Utilities;
internal partial class Menu
{
public bool IsLoadingMenu { get; internal set; }
private void InitializeComponentControlsTheDesignerRemoves()
{
DataGridViewCellStyle dataGridViewCellStyle1 = new();
DataGridViewCellStyle dataGridViewCellStyle2 = new();
DataGridViewCellStyle dataGridViewCellStyle3 = new();
labelTitle = new LabelNoCopy();
ColumnText = new DataGridViewTextBoxColumn();
ColumnIcon = new DataGridViewImageColumn();
customScrollbar = new CustomScrollbar();
tableLayoutPanelDgvAndScrollbar.Controls.Add(customScrollbar, 1, 0);
// tableLayoutPanelDgvAndScrollbar.SuspendLayout();
// ((System.ComponentModel.ISupportInitialize)dgv).BeginInit();
// tableLayoutPanelSearch.SuspendLayout();
// ((System.ComponentModel.ISupportInitialize)pictureBoxSearch).BeginInit();
// tableLayoutPanelMenu.SuspendLayout();
// SuspendLayout();
// labelTitle
labelTitle.AutoEllipsis = true;
labelTitle.AutoSize = true;
labelTitle.Dock = DockStyle.Fill;
labelTitle.Font = new Font("Segoe UI", 8.25F * Scaling.Factor, FontStyle.Bold, GraphicsUnit.Point, 0);
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);
labelTitle.Text = "SystemTrayMenu";
labelTitle.TextAlign = ContentAlignment.MiddleCenter;
labelTitle.MouseWheel += new MouseEventHandler(DgvMouseWheel);
labelTitle.MouseDown += Menu_MouseDown;
labelTitle.MouseUp += Menu_MouseUp;
labelTitle.MouseMove += Menu_MouseMove;
// tableLayoutPanelMenu
tableLayoutPanelMenu.MouseDown += Menu_MouseDown;
tableLayoutPanelMenu.MouseUp += Menu_MouseUp;
tableLayoutPanelMenu.MouseMove += Menu_MouseMove;
// tableLayoutPanelBottom
tableLayoutPanelBottom.MouseDown += Menu_MouseDown;
tableLayoutPanelBottom.MouseUp += Menu_MouseUp;
tableLayoutPanelBottom.MouseMove += Menu_MouseMove;
// ColumnIcon
ColumnIcon.DataPropertyName = "ColumnIcon";
dataGridViewCellStyle1.Alignment = DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.NullValue = "System.Drawing.Icon";
dataGridViewCellStyle1.Padding = new Padding(3, 1, 2, 1);
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,
});
dataGridViewCellStyle3.Font = new Font("Segoe UI", 7F * Scaling.Factor, FontStyle.Regular, GraphicsUnit.Pixel, 0);
dgv.RowsDefaultCellStyle = dataGridViewCellStyle3;
dgv.RowTemplate.DefaultCellStyle.Font = new Font("Segoe UI", 9F * Scaling.Factor, FontStyle.Regular, GraphicsUnit.Point, 0);
dgv.RowTemplate.Height = 20;
dgv.RowTemplate.ReadOnly = true;
textBoxSearch.ContextMenuStrip = new ContextMenuStrip();
tableLayoutPanelMenu.Controls.Add(labelTitle, 0, 0);
// customScrollbar
customScrollbar.Location = new Point(0, 0);
customScrollbar.Name = "customScrollbar";
customScrollbar.Size = new Size(Scaling.Scale(15), 40);
pictureBoxOpenFolder.Size = new Size(
Scaling.Scale(pictureBoxOpenFolder.Width),
Scaling.Scale(pictureBoxOpenFolder.Height));
pictureBoxMenuAlwaysOpen.Size = new Size(
Scaling.Scale(pictureBoxMenuAlwaysOpen.Width),
Scaling.Scale(pictureBoxMenuAlwaysOpen.Height));
pictureBoxSettings.Size = new Size(
Scaling.Scale(pictureBoxSettings.Width),
Scaling.Scale(pictureBoxSettings.Height));
pictureBoxRestart.Size = new Size(
Scaling.Scale(pictureBoxRestart.Width),
Scaling.Scale(pictureBoxRestart.Height));
pictureBoxSearch.Size = new Size(
Scaling.Scale(pictureBoxSearch.Width),
Scaling.Scale(pictureBoxSearch.Height));
labelItems.Font = new Font("Segoe UI", 7F * Scaling.Factor, FontStyle.Bold, GraphicsUnit.Point, 0);
// 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();
}
}
}