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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

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 »

Hello,
Thank you for the quick assistance.
Post Reply