I didn't think so, but I thought I would ask...
Instead of an Open File Dialog sending a list of files as a string.. I want to replace it with my own. The method is rather large, it is the Import File Dialog in the Images Module.
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Multiselect = true;
if (EhrAmendmentCur != null)
{
openFileDialog.Multiselect = false;
}
if (openFileDialog.ShowDialog() != DialogResult.OK)
{
return;
}
string[] fileNames = openFileDialog.FileNames;
if (fileNames.Length < 1)
{
return;
}
Is this possible to change with a hook?
- Justin Shafer
- Posts: 596
- Joined: Sat Jul 28, 2007 7:34 pm
- Location: Fort Worth, TX.
Is this possible to change with a hook?
Justin Shafer
Onsite Dental Systems
817-909-4222
justin@onsitedentalsystems.com
http://www.onsitedentalsystems.com
http://iocsnapshot.com
http://justinshafer.blogspot.com
Onsite Dental Systems
817-909-4222
justin@onsitedentalsystems.com
http://www.onsitedentalsystems.com
http://iocsnapshot.com
http://justinshafer.blogspot.com
Re: Is this possible to change with a hook?
If the part you pasted is the only part of the method that you don't want to run I would recommend checking out the "goto" option:
Otherwise the easiest kind of hook for taking over entire methods would be the first hook type:If a developer wishes to only replace part of the code in a method, a goto may be used.
http://www.opendental.com/manual/patternplugins.htmlThe first type of hook is called HookMethod. It is placed at the very top of a method and is designed to let the plug-in designer completely replace the method with their own code. This is the code that is placed at the top of the method:
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
Jason Salmon
Open Dental Software
http://www.opendental.com