Added toolbar

This commit is contained in:
Ray committed 2021-11-15 22:58:04 +00:00
1 parent 185d9aa253
commit 17bd46c9cd
4 files changed
+129 -12

No files matched your search

+21
View File
@@ -552,6 +552,27 @@ namespace RyzStudio.Windows.Forms
}
}
public static void SetEnable(ToolStripButton control, bool value)
{
if (control.GetCurrentParent() == null)
{
control.Enabled = value;
return;
}
if (control.GetCurrentParent().InvokeRequired)
{
control.GetCurrentParent().Invoke(new MethodInvoker(() =>
{
control.Enabled = value;
}));
}
else
{
control.Enabled = value;
}
}
public static void SetFocus(Control control)
{
if (control.InvokeRequired)