Jiwa And Infragistics Styles  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Jiwa And Infragistics Styles

Postby SBarnes » Mon Dec 04, 2017 6:35 pm

I am aware that Jiwa get its style (colours etc) from the file JiwaStyle.isl in the program directory and that the app stylist in installed along with Jiwa.

Is there a way to change this per database so that a customer could make their QA database looked markedly different say from their production one and avoid the danger that someone completes a whole heap of work in the wrong database?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Jiwa And Infragistics Styles

Postby Mike.Sheen » Mon Dec 04, 2017 7:43 pm

Hi Stuart,

Yes - you can set the style in a plugin at any time (you'll probably want to add a handler for the LoggedOn event in the ApplicationManagerPlugin class) and in there you can set the style to any .isl file using the ApplyStyling method of the Manager.

There are a bunch of pre-defined styles in Program Files (x86)\Jiwa Financials\Jiwa 7\Styles - or you can copy one of those and edit the style using the style editor (Infragistics4.Win.AppStylist.v13.1.exe) in Program Files (x86)\Jiwa Financials\Jiwa 7\Styles\Appstylist.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Jiwa And Infragistics Styles

Postby Mike.Sheen » Mon Dec 04, 2017 8:18 pm

Actually - I've just tried this myself and it is not working.

I did have this working a few years ago - as a POC I had styles switching per warehouse via a plugin - I'll see if I can dig that up and work out what I'm missing!
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Jiwa And Infragistics Styles

Postby SBarnes » Mon Dec 04, 2017 10:22 pm

Hi Mike,

Yes I was aware of the app stylist under the Jiwa directory and the isl files I had tried swapping files around to test that it worked before making the post.

I had a go also but the following doesn't work, so if you figure out what's needed to make it work please let me know, I did however out of the exercise figure out how to do a file open dialog to set the system setting when you make it a lookup field which makes it somewhat user friendly.

Code: Select all
   public void Setup(JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
    {
      JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.LoggedOn += LoggedOn;
   
    }
   
   private void LoggedOn()
   {
      //System.Windows.Forms.MessageBox.Show(JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database.ReadSysData("Attkey Style Setting", "StyleFile", "").ToString());
      if (System.IO.File.Exists(JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database.ReadSysData("Attkey Style Setting", "StyleFile", "").ToString()))
      {
         //System.Windows.Forms.MessageBox.Show(JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database.ReadSysData("Attkey Style Setting", "StyleFile", "").ToString());
         JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.ApplyStyling(JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database.ReadSysData("Attkey Style Setting", "StyleFile", "").ToString().Trim());
      }
      
   }
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Jiwa And Infragistics Styles  Topic is solved

Postby SBarnes » Tue Dec 05, 2017 7:27 am

Hi Mike,

Your actual warehouse change of style plugin is in the standard plugins.

I got it to go on login by doing the following:

1. In the logged on event I added a form shown event handler for the MDI Parent itself
2. In that event handler I applied the style file

It must be that the main code applies its style after logged on event has happened

My only remaining question is how do you get the MDI Parent under 7.1 so I can make this work in both versions?


Code: Select all
JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.MDIParentForm.Shown += FormShown;


and
Code: Select all
   private void FormShown(object sender,EventArgs e)
   {
      if (System.IO.File.Exists(JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database.ReadSysData("Attkey Style Setting", "StyleFile", "").ToString()))
      {
         JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.ApplyStyling(JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance.Database.ReadSysData("Attkey Style Setting", "StyleFile", "").ToString().Trim());
      }
   }
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Jiwa And Infragistics Styles

Postby Mike.Sheen » Tue Dec 05, 2017 9:18 am

SBarnes wrote:Your actual warehouse change of style plugin is in the standard plugins.


Lol - I knew I'd done it previously!

SBarnes wrote:My only remaining question is how do you get the MDI Parent under 7.1 so I can make this work in both versions?


The Manager has a property, MDIParentForm.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Jiwa And Infragistics Styles

Postby SBarnes » Tue Dec 05, 2017 9:36 am

Hi Mike,

Yeah I found that after the post the whole thing works in both versions now.

Although in 7.1 I had to add a variable to the plugin to hold the manager so the so the shown event could get at it.

Thanks for the help as always.
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 39 guests

cron