Hook Request: butText_Click in FormApptEdit.cs

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Hook Request: butText_Click in FormApptEdit.cs

Post by mopensoft » Sun May 17, 2015 9:53 pm

Hi OpenDental

Could you please add the following hook for me.

private void butText_Click(object sender,EventArgs e) {
if (Plugins.HookMethod(this, "FormApptEdit.butText_Click_Start", pat, AptCur, this))
{
return;
}

Thanks
MOpenSoft

User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Re: Hook Request: butText_Click in FormApptEdit.cs

Post by mopensoft » Mon May 18, 2015 10:52 pm

Can you also modify the existing hook at the end of FormApptEdit_load function from:

Code: Select all

Plugins.HookAddCode(this,"FormApptEdit.Load_End",pat,butText);
to

Code: Select all

Plugins.HookAddCode(this,"FormApptEdit.Load_End",AptCur);
I found that my existing hook is not very useful to get appointment info.

Thanks

allends
Posts: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook Request: butText_Click in FormApptEdit.cs

Post by allends » Tue May 19, 2015 9:11 am

We cannot modify existing hooks because other plugins may rely on them. I can add another hook at the end that does what you want.

Code: Select all

Plugins.HookAddCode(this,"FormApptEdit.Load_end2",AptCur);
It would look like this.
Allen
Open Dental Software
http://www.opendental.com

User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Re: Hook Request: butText_Click in FormApptEdit.cs

Post by mopensoft » Tue May 19, 2015 5:23 pm

Thanks Allen

Although the existing one was mine request but it's not harm to get both.

Cheers
Minh

allends
Posts: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook Request: butText_Click in FormApptEdit.cs

Post by allends » Wed May 20, 2015 11:49 am

Code: Select all

if(Plugins.HookMethod(this,"FormApptEdit.butText_Click_start",pat,AptCur,this)) {
	return;
}

Code: Select all

Plugins.HookAddCode(this,"FormApptEdit.Load_end2",AptCur);
These two hooks were committed to 15.2.4. Note that I did lower case the end of the method to fall in line with our newer hook patterns.
Allen
Open Dental Software
http://www.opendental.com

User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Re: Hook Request: butText_Click in FormApptEdit.cs

Post by mopensoft » Tue May 26, 2015 11:16 pm

Thanks Allen.

Post Reply