Skip to content

Instantly share code, notes, and snippets.

@hasokeric
Last active June 26, 2019 12:56
Show Gist options
  • Save hasokeric/7d6981cba7dbce93f8f41a2d4be4d0c8 to your computer and use it in GitHub Desktop.
Save hasokeric/7d6981cba7dbce93f8f41a2d4be4d0c8 to your computer and use it in GitHub Desktop.
setButtonImage Epicor 10.2.500
setButtonImage("Workstation", epiButtonC1);
private bool setButtonImage(string resID, EpiButton btnTarget)
{
bool flag;
if (EpiUIImages.AllImages.ContainsKey(resID))
{
btnTarget.Appearance.Image = (Image)EpiUIImages.AllImages[resID];
btnTarget.Appearance.ImageHAlign = Infragistics.Win.HAlign.Center;
btnTarget.Appearance.ImageVAlign = Infragistics.Win.VAlign.Middle;
btnTarget.Appearance.ImageAlpha = Infragistics.Win.Alpha.Opaque;
btnTarget.ImageSize = new Size(24, 24);
flag = true;
}
else
{
HandHeldMessageBox.Show(string.Format(EpiString.GetString("cannotFindImageResource"), resID));
flag = false;
}
return flag;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment