Page 1 of 1

Jiwa 6.5.13 to Jiwa 7 Menu Conversion.

PostPosted: Fri May 04, 2018 1:18 pm
by SBarnes
Hi Mike,

Is there a way of converting a Jiwa 6.5.13 menu structure to Jiwa 7?

Re: Jiwa 6.5.13 to Jiwa 7 Menu Conversion.  Topic is solved

PostPosted: Fri May 04, 2018 8:18 pm
by Mike.Sheen
Hi Stuart,

We did have an import from legacy XML ribbon tool on the menu maintenance form until 07.00.175.00 - that release removed the tool, but the method backing it in the menu business logic was still there until 07.01.00.00.

So, in theory a version of 07.00.157.00 can import the old 06.05.13 menu - and for 07.00.175.00 you'd have to add a plugin to add back the ribbon tool and invoke the business logic method.

If you're up the for challenge of adding it back to the menu maintenance form of 07.00.175.00 then the following are code snippets from the menu maintenance form of 07.00.175.00:

The code to add the tool:
Code: Select all
Dim buttonTool As Infragistics.Win.UltraWinToolbars.ButtonTool
Dim group As Infragistics.Win.UltraWinToolbars.RibbonGroup

buttonTool = New Infragistics.Win.UltraWinToolbars.ButtonTool("ID_RecordImportFromLegacyXML")
buttonTool.SharedProps.Caption = "Import From Legacy XML"
UltraToolbarsManager1.Tools.Add(buttonTool)


The code to handle the tool click:
Code: Select all
Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
   Select Case e.Tool.Key
      Case "ID_RecordImportFromLegacyXML"
         ImportFromLegacyXML()
   End Select
End Sub


The method the above toolclick handler invoked:
Code: Select all
Public Sub ImportFromLegacyXML()
   Dim lFilter As String

   DialogOpen.Title = "Select file"
   lFilter = "All Files (*.*)|*.*"
   lFilter = lFilter & "|XML (*.xml)|*.xml"
   DialogOpen.Filter = lFilter
   DialogOpen.FilterIndex = 2

   If My.Computer.FileSystem.DirectoryExists(My.Computer.FileSystem.SpecialDirectories.MyPictures) Then
      DialogOpen.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
   End If

   DialogOpen.FileName = ""

   If DialogOpen.ShowDialog <> Windows.Forms.DialogResult.Cancel Then
      _MenuMaintenance.ImportFromLegacyXML(DialogOpen.FileName)
   End If

   MenuUltraTree.Nodes(0).ExpandAll()
End Sub