Archived
Added toolbar
This commit is contained in:
1 parent
185d9aa253
commit
17bd46c9cd
4 files changed
+129
-12
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user