protected void OnBeyondLimitEvent(BeyondLimitEventArgs e) { if (BeyondLimitEvent != null) { BeyondLimitEvent(this, e); } }
protected Boolean isBeyondRange(int X, int Y) { BeyondLimitEventArgs args = new BeyondLimitEventArgs(X, Y); OnBeyondLimitEvent(args); if (!args.getLimitReached()) { return(false); } else { MessageBox.Show("Limit Reached. Step Back !! Restricted Area."); return(true); } }