This forum is for programmers who have questions about the source code.
-
mopensoft
- Posts: 146
- Joined: Tue Dec 04, 2012 3:33 pm
- Location: Melbourne, Australia
-
Contact:
Post
by mopensoft »
Hi
I would like to add 2 hooks into FormPatientEdit.cs:
1. At the end of FormPatientEdit_Load method as follow:
Code: Select all
Plugins.HookAddCode(this, "FormPatientEdit.Load_end", PatCur);
2. At the begining of butOK_Click method as follow to verify the user input:
Code: Select all
bool inputCheck = true;
object[] parameters = new object[] { inputCheck, PatCur };
Plugins.HookAddCode(this, "FormPatientEdit.butOK_click_Start", parameters);
if ((bool) parameters[0] == false)
return;
Thanks
-
allends
- Posts: 245
- Joined: Fri Aug 23, 2013 11:29 am
Post
by allends »
These have been added to the program and will be available with version 15.3.22.
I have changed the second hook slightly to better match our patterns:
Code: Select all
bool isValid=true;
object[] parameters=new object[] { isValid,PatCur };
Plugins.HookAddCode(this,"FormPatientEdit.butOK_Click_beginning",parameters);
if((bool)parameters[0]==false) {//Didn't pass plug-in validation
return;
}
-
mopensoft
- Posts: 146
- Joined: Tue Dec 04, 2012 3:33 pm
- Location: Melbourne, Australia
-
Contact:
Post
by mopensoft »
Thanks Allen