Keeping operators from closing the program

Top  Previous  Next

DISCLAIMER: This article involves Advanced Customizations, which can be technically challenging to get working and is not part of standard support.  This is programming and must be done precisely or the results can be unpredictable.  This information is provided as a service for those who have the technical skills to work through it -- we cannot help you solve any issues with getting it working.  For more information about Advanced Customizations, see the full documentation:

https://campgroundmaster.com/help/overview32.html

 

 

Here is an example of using the new Events customizations in version 4.0 to prevent non-manager operators from closing Campground Master accidentally.  Of course they could always shut off the computer if they want to shut it down, but this may help avoid accidental closures due to "fumbles" with the mouse or keyboard, for instance.

 

1. The first step is to add an Event Action.  Go to Maintenance / Advanced Customizations / Event Actions, and click "Add event action".

 

2. Give it a name, such as "Avoid shut-down".

 

3. For the Event Trigger, select "Program Shutdown".

 

4. We only want to prevent it for non-managers, so enter the following expression in the Condition (note that Manager access is level 4):

 

 CurrentOpLevel() < 4

 

5. We want to show them that it's not allowed, and also make sure the action is aborted, so enter this in the Action expression:

 

 Eval(MessageBox("You are not allowed to close this program"), .F.)

 

6. Finally, make sure the "Abort..." box is checked -- since the action expression above always returns False, the shut-down will always be aborted (assuming the Condition is met to trigger the action in the first place).

 

 


Page URL https://CampgroundMaster.com/news/keepingoperatorsfromclosing.html

Campground Master Home