Page 1 of 1

New Hook Request for Cameras!

Posted: Thu Jan 05, 2017 2:41 am
by Justin Shafer
ContrImages.cs

Around line: 2000 I would like to over ride Import to File but still use the Open File Dialog, I just want to automatically process the files selected:

private void ToolBarImport_Click() {
+if (Plugins.HookMethod(this, "ContrImages.ToolBarImport_Click", PatCur))
+{
+ FillDocList(true);
+ return;
+}

Around line:1692 I would like to over ride the Scan Photo Button to use the DirectShow\IOC Snapshot plugin
private void ToolBarScan_Click(string scanType) {
+if (scanType == "photo")
+ {
+ if (Plugins.HookMethod(this, "ContrImages.ToolBarScan_Click", PatCur))
+ {
+ FillDocList(true);
+ return;
+ }
+ }

Can you guys add that? I probably wouldn't need it except for.. FillDocList doesn't seem doable from my plugin dll file.. So.. this works? Thanks! All FillDocList does is refresh the list of documents\images in the Images Module.

Image

When you close the window, the images are automatically assigned to the Photo Category without prompts. And no I didn't hard code the category number. :) I also made the filenames random in the database and the files etc. I went off of the TigerView.cs file and the sample as a reference. Neat!

Re: New Hook Request for Cameras!

Posted: Thu Jan 05, 2017 5:26 pm
by allends
Do you need these hooks if I make the FillDocList public?
Also does the Scan Click hook need to return right there or can it be a hook add method?

Re: New Hook Request for Cameras!

Posted: Fri Jan 06, 2017 4:56 am
by Justin Shafer
If you made the FillDoc public then I don't think I would need a hook on Scanclick at all... I can just rely on the toolbar button because FillDoc would work!

At least.. I think. :D I made it public just from OpenDental.. and I couldn't see it in my list of classes.. I dunno.

Re: New Hook Request for Cameras!

Posted: Tue Jan 17, 2017 10:39 am
by allends
I added this hook

Code: Select all


			if(Plugins.HookMethod(this,"ContrImages.ToolBarImport_Click_Start",PatCur)) {
				FillDocList(true);
				return;
			}
to the import button click and made the FillDocList public.

Both of those will be available in 16.4.15 when it is released.

Re: New Hook Request for Cameras!

Posted: Sat Feb 11, 2017 7:21 am
by Justin Shafer
NEAT! THANKS!!! :) Edit my other post later.