New path config - fix anchoring issues
This commit is contained in:
parent
85f83bea30
commit
00d370db23
|
@ -43,7 +43,7 @@
|
||||||
// OK
|
// OK
|
||||||
//
|
//
|
||||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.OK.Location = new System.Drawing.Point(431, 435);
|
this.OK.Location = new System.Drawing.Point(450, 387);
|
||||||
this.OK.Name = "OK";
|
this.OK.Name = "OK";
|
||||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
this.OK.Size = new System.Drawing.Size(75, 23);
|
||||||
this.OK.TabIndex = 0;
|
this.OK.TabIndex = 0;
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
//
|
//
|
||||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.Cancel.Location = new System.Drawing.Point(512, 435);
|
this.Cancel.Location = new System.Drawing.Point(531, 387);
|
||||||
this.Cancel.Name = "Cancel";
|
this.Cancel.Name = "Cancel";
|
||||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||||
this.Cancel.TabIndex = 1;
|
this.Cancel.TabIndex = 1;
|
||||||
|
@ -72,13 +72,13 @@
|
||||||
this.PathTabControl.Multiline = true;
|
this.PathTabControl.Multiline = true;
|
||||||
this.PathTabControl.Name = "PathTabControl";
|
this.PathTabControl.Name = "PathTabControl";
|
||||||
this.PathTabControl.SelectedIndex = 0;
|
this.PathTabControl.SelectedIndex = 0;
|
||||||
this.PathTabControl.Size = new System.Drawing.Size(575, 345);
|
this.PathTabControl.Size = new System.Drawing.Size(594, 297);
|
||||||
this.PathTabControl.TabIndex = 2;
|
this.PathTabControl.TabIndex = 2;
|
||||||
//
|
//
|
||||||
// SaveBtn
|
// SaveBtn
|
||||||
//
|
//
|
||||||
this.SaveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.SaveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.SaveBtn.Location = new System.Drawing.Point(12, 435);
|
this.SaveBtn.Location = new System.Drawing.Point(12, 387);
|
||||||
this.SaveBtn.Name = "SaveBtn";
|
this.SaveBtn.Name = "SaveBtn";
|
||||||
this.SaveBtn.Size = new System.Drawing.Size(75, 23);
|
this.SaveBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
this.SaveBtn.TabIndex = 3;
|
this.SaveBtn.TabIndex = 3;
|
||||||
|
@ -88,8 +88,9 @@
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
|
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(490, 52);
|
this.label1.Location = new System.Drawing.Point(506, 52);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(97, 13);
|
this.label1.Size = new System.Drawing.Size(97, 13);
|
||||||
this.label1.TabIndex = 210;
|
this.label1.TabIndex = 210;
|
||||||
|
@ -97,8 +98,9 @@
|
||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
|
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.button1.Image = global::BizHawk.MultiClient.Properties.Resources.Help;
|
this.button1.Image = global::BizHawk.MultiClient.Properties.Resources.Help;
|
||||||
this.button1.Location = new System.Drawing.Point(456, 45);
|
this.button1.Location = new System.Drawing.Point(475, 47);
|
||||||
this.button1.Name = "button1";
|
this.button1.Name = "button1";
|
||||||
this.button1.Size = new System.Drawing.Size(26, 23);
|
this.button1.Size = new System.Drawing.Size(26, 23);
|
||||||
this.button1.TabIndex = 209;
|
this.button1.TabIndex = 209;
|
||||||
|
@ -122,14 +124,14 @@
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.BasePathBox.Location = new System.Drawing.Point(12, 15);
|
this.BasePathBox.Location = new System.Drawing.Point(12, 15);
|
||||||
this.BasePathBox.Name = "BasePathBox";
|
this.BasePathBox.Name = "BasePathBox";
|
||||||
this.BasePathBox.Size = new System.Drawing.Size(470, 20);
|
this.BasePathBox.Size = new System.Drawing.Size(489, 20);
|
||||||
this.BasePathBox.TabIndex = 205;
|
this.BasePathBox.TabIndex = 205;
|
||||||
//
|
//
|
||||||
// BrowseBase
|
// BrowseBase
|
||||||
//
|
//
|
||||||
this.BrowseBase.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.BrowseBase.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.BrowseBase.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
|
this.BrowseBase.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
|
||||||
this.BrowseBase.Location = new System.Drawing.Point(490, 14);
|
this.BrowseBase.Location = new System.Drawing.Point(509, 14);
|
||||||
this.BrowseBase.Name = "BrowseBase";
|
this.BrowseBase.Name = "BrowseBase";
|
||||||
this.BrowseBase.Size = new System.Drawing.Size(26, 23);
|
this.BrowseBase.Size = new System.Drawing.Size(26, 23);
|
||||||
this.BrowseBase.TabIndex = 206;
|
this.BrowseBase.TabIndex = 206;
|
||||||
|
@ -140,7 +142,7 @@
|
||||||
//
|
//
|
||||||
this.BaseDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.BaseDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.BaseDescription.AutoSize = true;
|
this.BaseDescription.AutoSize = true;
|
||||||
this.BaseDescription.Location = new System.Drawing.Point(523, 19);
|
this.BaseDescription.Location = new System.Drawing.Point(542, 19);
|
||||||
this.BaseDescription.Name = "BaseDescription";
|
this.BaseDescription.Name = "BaseDescription";
|
||||||
this.BaseDescription.Size = new System.Drawing.Size(64, 13);
|
this.BaseDescription.Size = new System.Drawing.Size(64, 13);
|
||||||
this.BaseDescription.TabIndex = 208;
|
this.BaseDescription.TabIndex = 208;
|
||||||
|
@ -152,7 +154,7 @@
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.Cancel;
|
this.CancelButton = this.Cancel;
|
||||||
this.ClientSize = new System.Drawing.Size(599, 470);
|
this.ClientSize = new System.Drawing.Size(618, 422);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
this.Controls.Add(this.button1);
|
this.Controls.Add(this.button1);
|
||||||
this.Controls.Add(this.RecentForROMs);
|
this.Controls.Add(this.RecentForROMs);
|
||||||
|
@ -163,6 +165,7 @@
|
||||||
this.Controls.Add(this.PathTabControl);
|
this.Controls.Add(this.PathTabControl);
|
||||||
this.Controls.Add(this.Cancel);
|
this.Controls.Add(this.Cancel);
|
||||||
this.Controls.Add(this.OK);
|
this.Controls.Add(this.OK);
|
||||||
|
this.MinimumSize = new System.Drawing.Size(360, 250);
|
||||||
this.Name = "NewPathConfig";
|
this.Name = "NewPathConfig";
|
||||||
this.ShowIcon = false;
|
this.ShowIcon = false;
|
||||||
this.Text = "Path Configuration";
|
this.Text = "Path Configuration";
|
||||||
|
|
|
@ -110,9 +110,10 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
int _x = 6;
|
int _x = 6;
|
||||||
int _y = 14;
|
int _y = 14;
|
||||||
int textbox_width = 150;
|
int textbox_width = 70;
|
||||||
int padding = 10;
|
int padding = 5;
|
||||||
int button_width = 26;
|
int button_width = 26;
|
||||||
|
int widget_offset = 85;
|
||||||
foreach (var path in paths)
|
foreach (var path in paths)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -121,18 +122,19 @@ namespace BizHawk.MultiClient
|
||||||
Text = path.Path,
|
Text = path.Path,
|
||||||
Location = new Point(_x, _y),
|
Location = new Point(_x, _y),
|
||||||
Width = textbox_width,
|
Width = textbox_width,
|
||||||
Name = path.Type
|
Name = path.Type,
|
||||||
//Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right,
|
Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right,
|
||||||
|
MinimumSize = new Size(26, 23),
|
||||||
};
|
};
|
||||||
|
|
||||||
Button btn = new Button()
|
Button btn = new Button()
|
||||||
{
|
{
|
||||||
Text = "",
|
Text = "",
|
||||||
Image = BizHawk.MultiClient.Properties.Resources.OpenFile,
|
Image = BizHawk.MultiClient.Properties.Resources.OpenFile,
|
||||||
Location = new Point(_x + textbox_width + padding, _y - 1),
|
Location = new Point(widget_offset, _y - 1),
|
||||||
Width = button_width,
|
Width = button_width,
|
||||||
Name = path.Type,
|
Name = path.Type,
|
||||||
//Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
||||||
};
|
};
|
||||||
btn.Click += new System.EventHandler(delegate
|
btn.Click += new System.EventHandler(delegate
|
||||||
{
|
{
|
||||||
|
@ -142,14 +144,15 @@ namespace BizHawk.MultiClient
|
||||||
Label label = new Label()
|
Label label = new Label()
|
||||||
{
|
{
|
||||||
Text = path.Type,
|
Text = path.Type,
|
||||||
Location = new Point(_x + textbox_width + (padding * 2) + button_width, _y + 4),
|
Location = new Point(widget_offset + button_width + padding, _y + 4),
|
||||||
Name = path.Type
|
Width = 100,
|
||||||
//Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
Name = path.Type,
|
||||||
|
Anchor = AnchorStyles.Top | AnchorStyles.Right,
|
||||||
};
|
};
|
||||||
|
|
||||||
t.Controls.Add(box);
|
|
||||||
t.Controls.Add(btn);
|
|
||||||
t.Controls.Add(label);
|
t.Controls.Add(label);
|
||||||
|
t.Controls.Add(btn);
|
||||||
|
t.Controls.Add(box);
|
||||||
|
|
||||||
_y += 30;
|
_y += 30;
|
||||||
}
|
}
|
||||||
|
@ -237,6 +240,34 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Label> AllPathLabels
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<Label> _AllPathLabels = new List<Label>();
|
||||||
|
foreach (TabPage tp in PathTabControl.TabPages)
|
||||||
|
{
|
||||||
|
IEnumerable<Label> control = from c in tp.Controls.OfType<Label>() select c;
|
||||||
|
_AllPathLabels.AddRange(control);
|
||||||
|
}
|
||||||
|
return _AllPathLabels;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Button> AllPathButtons
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<Button> _AllPathButtons = new List<Button>();
|
||||||
|
foreach (TabPage tp in PathTabControl.TabPages)
|
||||||
|
{
|
||||||
|
IEnumerable<Button> control = from c in tp.Controls.OfType<Button>() select c;
|
||||||
|
_AllPathButtons.AddRange(control);
|
||||||
|
}
|
||||||
|
return _AllPathButtons;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private List<Control> AllPathControls
|
private List<Control> AllPathControls
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Loading…
Reference in New Issue