...
In an actual upgrade solution, I would create a generalized WiseJ upgrade configuration that could be used with many different VBPs and forms code files and also develop a set of rules files to deal with third-party controls. In a project context, we would further customize this so that various customer-specific requirements are automated including other WiseJ/.NET standards.
“Quick and Dirty” upgrade rules to rewrite from VB6 (desktop) for WiseJ/C# (web)
Code Block |
---|
<Author> <Fix host="Calculator" name="PostEdit"> <Replace name="change namespace Winforms to WiseJ.Web" > <OldBlock><![CDATA[using System.Windows.Forms;]]></OldBlock> <NewBlock><![CDATA[using Wisej.Web;]]></NewBlock> </Replace> <Replace status="active" name="remove using WinForms"> <OldBlock><![CDATA[System.Windows.Forms.]]></OldBlock> <NewBlock><![CDATA[Wisej.Web.]]></NewBlock> </Replace> <Replace status="active" name="remove FlatStyle"> <OldBlock><![CDATA[FlatStyle]]></OldBlock> </Replace> <Replace status="active" name="cleanup using System.Data"> <OldBlock><![CDATA[using System.Data;]]></OldBlock> </Replace> <Replace status="active" name="cleanup using System.CompilerServices"> <OldBlock><![CDATA[using Microsoft.VisualBasic.CompilerServices;]]></OldBlock> </Replace> <Replace name="rework old MenuStrip initialization boilerplate, not needed"> <OldBlock><![CDATA[ this.MainMenuStrip = this.mainMenu1; this.mainMenu1.AutoSize = false; this.MainMenuStrip.Height = 20; this.Controls.Add(this.mainMenu1); ]]></OldBlock> <NewBlock><![CDATA[ this.Menu = this.mainMenu1; ]]></NewBlock> </Replace> <Replace status="active" name="rename MenuStrip class"> <OldBlock><![CDATA[MenuStrip]]></OldBlock> <NewBlock><![CDATA[MainMenu]]></NewBlock> </Replace> <Replace status="active" name="rename ToolStripMenuItem class"> <OldBlock><![CDATA[ToolStripMenuItem]]></OldBlock> <NewBlock><![CDATA[MenuItem]]></NewBlock> </Replace> <Replace name="Remove hideSelection setting (default?)"> <OldBlock><![CDATA[.HideSelection = ]]></OldBlock> </Replace> <Replace name="Rename BorderStyle enum entry"> <OldBlock><![CDATA[.BorderStyle.Fixed3D;]]></OldBlock> <NewBlock><![CDATA[.BorderStyle.Solid;]]></NewBlock> </Replace> <Replace name="Rename BorderStyle enum entry"> <OldBlock><![CDATA[.BorderStyle.FixedSingle;]]></OldBlock> <NewBlock><![CDATA[.BorderStyle.Solid;]]></NewBlock> </Replace> <Replace status="active" name="rework ShortcutKeys"> <OldBlock><![CDATA[ShortcutKeys = Keys.Control | Keys.]]></OldBlock> <NewBlock><![CDATA[Shortcut = Shortcut.Ctrl]]></NewBlock> </Replace> <Replace name="Change menu.Items property name"> <OldBlock><![CDATA[this.mainMenu1.Items.AddRange(new Wisej.Web.ToolStripItem]]></OldBlock> <NewBlock><![CDATA[this.mainMenu1.MenuItems.AddRange(new Wisej.Web.MenuItem]]></NewBlock> </Replace> <Replace name="change menu.DropDownItems name"> <OldBlock><![CDATA[this.mnuEdit.DropDownItems.AddRange(new Wisej.Web.ToolStripItem[] {]]></OldBlock> <NewBlock><![CDATA[this.mnuEdit.MenuItems.AddRange(new Wisej.Web.MenuItem[] {]]></NewBlock> </Replace> <Replace name="rename FormBorderStyle enum entry"> <OldBlock><![CDATA[.FormBorderStyle.FixedSingle;]]></OldBlock> <NewBlock><![CDATA[.FormBorderStyle.Fixed;]]></NewBlock> </Replace> <ReplaceFile name="Override csproj file using WiseJ.csproj" lang="csproj" source="Calculator.csproj" target="..\usr\wiseJ\WiseJ.csproj" /> <ReplaceFile name="Override startup file using program.cs" lang="csproj" source="Calculator_StartUp.cs" target="..\usr\wiseJ\program.cs" /> </Fix> </Author> |