Mateiral Pair에서 check된 항목 load/save/remove

Compatibility Map에 적용
This commit is contained in:
2017-08-13 04:18:50 +09:00
parent b906236fef
commit bef2551cc6
12 changed files with 833 additions and 73 deletions

View File

@@ -167,8 +167,25 @@ namespace friction
foreach (ToolStripMenuItem item in ctrl.Items)
{
foreach (ToolStripMenuItem subitem in item.DropDownItems)
foreach (ToolStripItem subitem in item.DropDownItems)
{
if(subitem.GetType() == typeof(ToolStripMenuItem))
{
foreach (ToolStripItem subsubitem in ((ToolStripMenuItem)subitem).DropDownItems)
{
subsubitem.BackColor = Backcolor;
subsubitem.ForeColor = Forecolor;
subsubitem.MouseEnter += Ctrl_MouseEnter;
subsubitem.MouseLeave += Ctrl_MouseLeave;
}
}
else if(subitem.GetType() == typeof(ToolStripSeparator))
{
((ToolStripSeparator)subitem).BackColor = Backcolor;
((ToolStripSeparator)subitem).ForeColor = Forecolor;
}
subitem.BackColor = Backcolor;
subitem.ForeColor = Forecolor;
@@ -202,4 +219,32 @@ namespace friction
}
}
}
public class ExtendedToolStripSeparator : ToolStripSeparator
{
public ExtendedToolStripSeparator()
{
this.Paint += ExtendedToolStripSeparator_Paint;
}
private void ExtendedToolStripSeparator_Paint(object sender, PaintEventArgs e)
{
// Get the separator's width and height.
ToolStripSeparator toolStripSeparator = (ToolStripSeparator)sender;
int width = toolStripSeparator.Width;
int height = toolStripSeparator.Height;
// Choose the colors for drawing.
// I've used Color.White as the foreColor.
Color foreColor = Theme.Forecolor;
// Color.Teal as the backColor.
Color backColor = Theme.Backcolor;
// Fill the background.
e.Graphics.FillRectangle(new SolidBrush(backColor), 0, 0, width, height);
// Draw the line.
e.Graphics.DrawLine(new Pen(foreColor), 4, height / 2, width - 4, height / 2);
}
}
}