Morning coding funny

Well, I got tired of it. So… I added this to a few forms.

/* This is not a real class, it's sole purpose is to sit at the end of this file and
  "catch" the events that the wizard puts in. There is a bug / "feature?" lol where they
  just look for the last "}" and stick it above that.

  Well, I have my OWN classes down here, so it doesn't quite work out! ;)
  So here is a nice clean place for it to land so you can cut and paste it back to
  the "Script" class where it belongs. */
class EpicorEventCatcher
{

}

After Wizard Add Event

/* This is not a real class, it's sole purpose is to sit at the end of this file and
  "catch" the events that the wizard puts in. There is a bug / "feature?" lol where they
  just look for the last "}" and stick it above that.

  Well, I have my OWN classes down here, so it doesn't quite work out! ;)
  So here is a nice clean place for it to land so you can cut and paste it back to
  the "Script" class where it belongs. */
class EpicorEventCatcher
{


	private void CustShipForm_Closing(object sender, System.ComponentModel.CancelEventArgs args)
	{
		// Add Event Handler Code
	}
}

Put your clases at the top @klincecum and then problem solved

I did, but it was so ugly and getting in the way.

This is my compromise. :rofl:

1 Like

If it would store the region state (collapsed / not) for me, that would work wonderful.

Mostly unrelated, but I found that you can manipulate the braces in BPMs in order to create own classes/functions (not the way to go, but you know that) since it generates a class anyways. Epicor still throws out a bpm error, but since the C# compiles, the code is still executed. BPM errors seem meaningless, and the BPM designer only cares to validate that the code compiles when saving.

4 Likes

Very interesting haha

Be Quiet Cut It Out GIF

1 Like

Hey, Siri! Define best practices.

1 Like

I don’t always test my code, but when I do dot gif