public CustomButton(string ptext, int pwidth, int pid, ButtonCall pcall) { text = ptext; width = pwidth; ID = pid; call = pcall; }
void ReleaseDesignerOutlets() { if (ButtonAddEvent != null) { ButtonAddEvent.Dispose(); ButtonAddEvent = null; } if (ButtonCall != null) { ButtonCall.Dispose(); ButtonCall = null; } if (ButtonEmail != null) { ButtonEmail.Dispose(); ButtonEmail = null; } if (ImagePhoto != null) { ImagePhoto.Dispose(); ImagePhoto = null; } if (TextEmail != null) { TextEmail.Dispose(); TextEmail = null; } if (TextFirst != null) { TextFirst.Dispose(); TextFirst = null; } if (TextLast != null) { TextLast.Dispose(); TextLast = null; } if (TextPhone != null) { TextPhone.Dispose(); TextPhone = null; } }
ButtonCall cs_Script; // You create a variable that will contain your script with his functions. private void OnEnable() { cs_Script = (ButtonCall)target; // When your script is enable you cast your function script to your "cs_script". }
public void AddButton(string Text, int Width, int id, ButtonCall call) { buttons.Add(new CustomButton(Text, Width, id,call)); }
public void AddButton(string Text, int Width, int id, ButtonCall call) { buttons.Add(new CustomButton(Text, Width, id, call)); }