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 » Sun Jun 26, 2016 11:43 pm

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: 1551
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: Hook request

Post by jsalmon » Mon Jun 27, 2016 10:34 am

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 » Mon Jun 27, 2016 5:38 pm

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 » Mon Jun 27, 2016 5:38 pm

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: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook request

Post by allends » Tue Jun 28, 2016 3:04 pm

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 » Mon Jul 11, 2016 12:38 am

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: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook request

Post by allends » Tue Jul 12, 2016 2:46 pm

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

Post Reply