Hey I am trying to make a message box in a C# component to inform the user if some data was recorded or not. However, I keep seeing it over and over with whatever changes that occur in the script, does anyone know how to optimize this so that I can only see it once the data is recorded, the code is as below and I attached the .GH file
private void RunScript(int x, List<string> y, ref object A)
{
if (x == 0)
{
System.Windows.Forms.MessageBox.Show("This component is happy! you can move on", "01.Material Groups", MessageBoxButtons.OKCancel);
}
else if (x == 1)
{
System.Windows.Forms.MessageBox.Show("This component has encounterd an error! Please try again", "01.Material Groups", MessageBoxButtons.OKCancel);
}
A = y;
}
MessageBox.gh (7.0 KB)