Hook event for - ContrApptPanel Appt Main AreaRightClick

For users or potential users.
Post Reply
pid_user
Posts: 67
Joined: Thu Jun 04, 2015 9:31 am

Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by pid_user » Thu Feb 18, 2021 11:19 pm

Hello,

I would like to have access to menuBlockout control that is present on RightClick of ContrApptPanel Appointment main area and which is initialized in ContrApptPanel_ApptMainAreaRightClicked event of class "ControlAppt". Hence i want to have a hook event for ContrApptPanel_ApptMainAreaRightClicked event. Please provide us with this event.

Please provide a hook as-
Plugins.HookAddCode(this, "ContrApptPanel_ApptMainAreaRightClick", menuBlockout);




Thanks-
Vaishali Kulkarni Soni

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by joes » Fri Feb 19, 2021 9:58 am

Please provide a code snippet that includes the hook to show where you want it within the ContrApptPanel_ApptMainAreaRightClicked method.
Joe Sullivan
Open Dental Software
http://www.opendental.com

pid_user
Posts: 67
Joined: Thu Jun 04, 2015 9:31 am

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by pid_user » Sun Feb 21, 2021 11:19 pm

Hi,
Following is the code snippet to have the hook method .

private void ContrApptPanel_ApptMainAreaRightClicked(object sender, UI.ApptMainClickEventArgs e){
ToolStripItem menuEdit=menuBlockout.Items.Find(MenuItemNames.EditBlockout,false)[0];
ToolStripItem menuCut=menuBlockout.Items.Find(MenuItemNames.CutBlockout,false)[0];

-----further code here-------------

SetMenuItemProperty(menuBlockout,MenuItemNames.TextApptsForDay,x => {
x.Visible=isTextingEnabled;
x.Text=MenuItemNames.TextApptsForDay+(PrefC.HasClinicsEnabled ? ", Clinic only" : "");
});
Plugins.HookAddCode(this, "ContrApptPanel_ApptMainAreaRightClick", menuBlockout);
menuBlockout.Show(contrApptPanel,e.Location);
}

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by joes » Mon Feb 22, 2021 9:08 am

Thank you. I'll follow up with the version that this will be in when we have it implemented.
Joe Sullivan
Open Dental Software
http://www.opendental.com

pid_user
Posts: 67
Joined: Thu Jun 04, 2015 9:31 am

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by pid_user » Wed Feb 24, 2021 2:45 pm

Hello OD Team - Following-up to check if this has been added and on which version of code.

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by joes » Wed Feb 24, 2021 3:45 pm

One of our engineers is in the process of adding this right now. It will be in version 20.5.28 which should be released tomorrow.
Joe Sullivan
Open Dental Software
http://www.opendental.com

jasony
Posts: 14
Joined: Wed Feb 24, 2021 4:03 pm

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by jasony » Wed Feb 24, 2021 4:08 pm

Confirmed this will be in version 20.5.28 when released. You will find the hook as:
Plugins.HookAddCode(this,"ControlAppt.ContrApptPanel_ApptMainAreaRightClick_end",menuBlockout);

pid_user
Posts: 67
Joined: Thu Jun 04, 2015 9:31 am

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by pid_user » Thu Feb 25, 2021 10:40 am

THANK YOU

pid_user
Posts: 67
Joined: Thu Jun 04, 2015 9:31 am

Re: Hook event for - ContrApptPanel Appt Main AreaRightClick

Post by pid_user » Sun Feb 28, 2021 9:28 pm

Hello,
Thank you for the quick assistance.

Post Reply