Jiwa Legacy Image Conversion

Discussions relating to plugin development, and the Jiwa API.

Jiwa Legacy Image Conversion

Postby SBarnes » Thu Mar 15, 2018 10:18 am

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
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Jiwa Legacy Image Conversion

Postby Scott.Pearce » Thu Mar 15, 2018 10:26 am

Nope.

EDIT: I see a plugin in your midst. :-)
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Jiwa Legacy Image Conversion

Postby SBarnes » Thu Mar 15, 2018 11:45 am

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Jiwa Legacy Image Conversion

Postby Scott.Pearce » Thu Mar 15, 2018 11:59 am

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.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Jiwa Legacy Image Conversion

Postby SBarnes » Thu Mar 15, 2018 1:34 pm

Ok, Thanks Scott I'll have a look at that.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Jiwa Legacy Image Conversion

Postby SBarnes » Fri Mar 16, 2018 7:01 am

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 15 guests

cron