Page 1 of 1
Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Thu Feb 18, 2021 11:19 pm
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
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Fri Feb 19, 2021 9:58 am
by joes
Please provide a code snippet that includes the hook to show where you want it within the ContrApptPanel_ApptMainAreaRightClicked method.
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Sun Feb 21, 2021 11:19 pm
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);
}
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Mon Feb 22, 2021 9:08 am
by joes
Thank you. I'll follow up with the version that this will be in when we have it implemented.
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Wed Feb 24, 2021 2:45 pm
by pid_user
Hello OD Team - Following-up to check if this has been added and on which version of code.
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Wed Feb 24, 2021 3:45 pm
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.
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Wed Feb 24, 2021 4:08 pm
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);
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Thu Feb 25, 2021 10:40 am
by pid_user
THANK YOU
Re: Hook event for - ContrApptPanel Appt Main AreaRightClick
Posted: Sun Feb 28, 2021 9:28 pm
by pid_user
Hello,
Thank you for the quick assistance.