Page 1 of 1
Jiwa Legacy Image Conversion

Posted:
Thu Mar 15, 2018 10:18 am
by SBarnes
Hi All,
Given Jiwa 6 series keeps the image as a path to the image in IN_Main.Aux4 and Jiwa 7 keeps the image in the database, my question is will Jiwa 7 display the image if only Aux4 is filled in and the image field in the database is null.
I know there is a conversion plugin but this client has over 32,000 products that the plugin would have to convert which would certainly expand their database and probably take a while.
thanks
Re: Jiwa Legacy Image Conversion

Posted:
Thu Mar 15, 2018 10:26 am
by Scott.Pearce
Nope.
EDIT: I see a plugin in your midst.

Re: Jiwa Legacy Image Conversion

Posted:
Thu Mar 15, 2018 11:45 am
by SBarnes
Thanks Scott,
Unfortunately the plugin won't be a very simple one as PictureContextMenuStrip is private for the inventory form so you have to go after the open dialog events to get around it and set the open dialog's tag to be the form so you can get back to the form then the inventory item and Aux4 after that.
The picture display should just involve capturing the read end event and setting the control appropriately.
Re: Jiwa Legacy Image Conversion

Posted:
Thu Mar 15, 2018 11:59 am
by Scott.Pearce
During form setup, the private "PictureContextMenuStrip" is setup, and then the Picture control has it's ContextMenuStrip property set to it. You can therefore manipulate the ContextMenuStrip property of the control rather than the private "PictureContextMenuStrip" property.
Re: Jiwa Legacy Image Conversion

Posted:
Thu Mar 15, 2018 1:34 pm
by SBarnes
Ok, Thanks Scott I'll have a look at that.
Re: Jiwa Legacy Image Conversion

Posted:
Fri Mar 16, 2018 7:01 am
by SBarnes
Hi Scott
Whilst you suggestion is correct and I can get to the PictureContextMenuStrip that way it doesn't unfortunately help much in that its actually the setup before that would need to be used to get in before Jiwa and perform your own event and the control is null because the setup hasn't happened.
The code below does get the result though.
- Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
if(JiwaForm.GetType() == typeof(JiwaFinancials.Jiwa.JiwaInventoryUI.InventoryMaintenanceForm))
{
JiwaFinancials.Jiwa.JiwaInventoryUI.InventoryMaintenanceForm invform = (JiwaFinancials.Jiwa.JiwaInventoryUI.InventoryMaintenanceForm)JiwaForm;
invform.DialogOpen.FileOk += openFileDialog_FileOk;
invform.DialogOpen.Tag = invform;
//System.Diagnostics.Debugger.Launch();
//System.Windows.Forms.MessageBox.Show(invform.Picture.ContextMenuStrip.Name);
}
}
private void openFileDialog_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
{
System.Windows.Forms.OpenFileDialog dialog = (System.Windows.Forms.OpenFileDialog)sender;
JiwaFinancials.Jiwa.JiwaInventoryUI.InventoryMaintenanceForm invform = (JiwaFinancials.Jiwa.JiwaInventoryUI.InventoryMaintenanceForm)dialog.Tag;
//System.Windows.Forms.MessageBox.Show(dialog.FileName);
invform.Inventory.Aux4 = dialog.FileName;
//System.Windows.Forms.MessageBox.Show(invform.Inventory.Aux4);
}
Again thanks for the help.