Hook request

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

Post by mopensoft »

Could you please add the hook to Load function of FormRpBirthday as follow:

Plugins.HookAddCode(this, "FormRpBirthday.Load_end", textDateFrom.Text, textDateTo.Text, textPostcardMsg.Text);

Thanks
M
User avatar
jsalmon
Posts: 1609
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Hook request

Post by jsalmon »

You should be able to get access to all controls on the form (or control in some hooks) because HookAddCode has sent you the "sender" (this) which you can loop through all controls owned by sender looking for those particular text boxes and grab the text from them yourself within the plugin class.

So the hook should end up looking like this:

Code: Select all

Plugins.HookAddCode(this,"FormRpBirthday.Load_end");
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
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

Post by mopensoft »

OK, if that's the preferred way. Thanks. M
User avatar
mopensoft
Posts: 146
Joined: Tue Dec 04, 2012 3:33 pm
Location: Melbourne, Australia
Contact:

Re: Hook request

Post by mopensoft »

Can you also add the following hook in ContrAppt.cs:

if (Plugins.HookMethod(this, "ContrApptSheet2_DoubleClick_start", ContrApptSingle.ClickedAptNum, e))
return;

Thanks
M
allends
Posts: 244
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook request

Post by allends »

Both of these hooks have been added and released in 16.2.25.
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

Post by mopensoft »

Hi Allen,

Can you also add 4 hooks below:

if (Plugins.HookMethod(this, "ContrApptSheet2_MouseDown_start", ContrApptSingle.ClickedAptNum, e))
{
return;
}

and
Plugins.HookAddCode(this, "FormOpenDental_KeyDown_end", e);

and
Plugins.HookAddCode(this, "FormProduction_Load_end");

and
Plugins.HookAddCode(this, "FormPaymentSheet_Load_end");

Thanks
M
allends
Posts: 244
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook request

Post by allends »

The remaining hooks have been added to 16.2.30.
Allen
Open Dental Software
http://www.opendental.com
Post Reply