从 PowerBuilder 到 Windows Forms(.NET) 转换
Ispirer MnMTK应用迁移工具提供从PowerBuilder到Windows Forms (.NET)自动化迁移。
PowerBuilder到WinForms .NET 迁移的概观
在转换PowerBuilder成Windows Forms (.NET), Ispirer MnMTK能够转换:
- 应用程序的源文件(.SRA文件)
- Window对象(.SRW 文件)
- Menu(.SRM)
- DataWindow (.SRD)
为什么选择Ispirer MnMTK为从PowerBuilder转换到Windows Forms (.NET)?
Ispirer Systems一直以实现高品位和一流的数据库迁移而备受关注。我们调整我们的迁移工具Ispirer MnMTK定制版以这样的方式能充分符合客户的业务需求。
我们主要好处:
- 高素质和经验丰富的技术支持: 我们的技术团队拥有在复杂程度不同的迁移项目的工作经验。
- 客户至上的方针和快速定制: 我们个性化我们的迁移工具可以充分满足客户的业务需求,定制的转换和优化在1-2工作日完成。
- 预售参与 : 我们会在评估决定之前展示完全转换。
- 灵活的定价策略: 我们为您提供广泛的选择,其中您一定会找到最适合您的价格方案。
- 优化转换-: 没有Ispirer的文库或转换后使用IP
评估过程
您可以使用我们的评估向导为搜集关于您的应用程序统计信息。欢迎您下载我们的免费评估版:
此外,您可以填写我们的应用程序转换调查问卷:
Ispirer转换解决方案
PowerBuilder 到 WinForms(.NET) 请求
Ispirer转换解决方案
PowerBuilder 到 WinForms(.NET) 服务
工具
转换特征
Ispirer MnMTK进行自动转换从PowerBuilder到WinForms .NET 。Ispirer MnMTK允许:
- 转换源文件(.SRA文件)
SRA文件是应用源文件,有基本应用和入口点信息:
forward
global TYPE simple_demo FROM application
END TYPE
END forward
global TYPE simple_demo FROM application
string appname = "simple_demo"
END TYPE
global simple_demo simple_demo
ON simple_demo.CREATE
END ON
event OPEN;
OPEN ( simple_demo_main )
END event
SRA文件是转换到类对迁移方法,使用开始应用:static class _simple_demo
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new _simple_demo_main());
}
}
- 转换Window对象(.SRW 文件)到ASPX
SRW文件是窗口的源文件。它有形式和荣内的项目的描述,及也事件和方法。SRW 文件被转换到ASPX。
考虑简单形式的例如对一个控制元件:
$PBExportHeader$simple_demo_main.srw
forward
global TYPE simple_demo_main FROM window
END TYPE
TYPE b_button FROM commandbutton WITHIN simple_demo_main
END TYPE
END forward
global TYPE simple_demo_main FROM window
INTEGER width = 800
INTEGER height = 1200
BOOLEAN titlebar = TRUE
string title = "simple_demo"
b_button b_button
END TYPE
global simple_demo_main simple_demo_main
ON simple_demo_main.CREATE
this.b_button =CREATE b_button
this.Control[]={this.b_button}
END ON
ON simple_demo_main.destroy
destroy(this.b_button)
END ON
TYPE b_button FROM commandbutton WITHIN simple_demo_main
INTEGER x = 400
INTEGER y = 400
INTEGER width = 200
INTEGER height = 120
string text = "Show"
END TYPE
event clicked;
END event
声明控制被转换到设计器类:
namespace simple_demo
{
partial class _simple_demo_main
{
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.b_button = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//b_button
//
this.b_button.Location = new System.
Drawing.Point(100, 100);
this.b_button.Name = "b_button";
this.b_button.Size = new System.Drawing.Size(50, 30);
this.b_button.Text = "Show";
this.b_button.Click += new System.
EventHandler(this.b_button_Click);
//
//_simple_demo_main
//
this.Size = new System.Drawing.Size(200, 300);
this.Controls.Add(this.b_button);
this.Name = "_simple_demo_main";
this.Text = "simple_demo";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button b_button;
}
}
事件被转换到方法类:
public partial class _simple_demo_main : Form
{
public _simple_demo_main()
{
InitializeComponent();
}
private void b_button_Click
(object sender, EventArgs e)
{
}
}
Ispirer MnMTK节省属性的大小和组建的位置像可转换的PowerBuilder 应用:
 |
 |
PowerBuilder Application Window |
WinForms Application Window |
- 转换选单(.SRM)到标准的用户控制
SRM文件是选单源文件。这些有元素和事件描述。这里是选单对一个元素例如为您的考虑:
$PBExportHeader$simple_menu.srm
forward
global TYPE simple_menu FROM menu
END TYPE
TYPE m_about FROM menu WITHIN simple_menu
END TYPE
END forward
global TYPE simple_menu FROM menu
END TYPE
global simple_menu simple_menu
ON simple_menu.CREATE
simple_menu=this
CALL super::CREATE
this.m_about=CREATE m_about
this.Item[UpperBound(this.Item)+1]=this.m_about
END ON
TYPE m_about FROM menu WITHIN simple_menu
END TYPE
ON m_about.CREATE
CALL super::CREATE
this.text = "&About"
END ON
event clicked;OPEN(simple_about)
END event
选单元素被转换到MenuStrip和ToolStripMenuItem控制。转换之后它们被添加到UserControl 设计器:
namespace simple_demo
{
partial class _simple_menu
{
#region Component Designer generated code
private void InitializeComponent()
{
this.simple_menu = new System.Windows.Forms.MenuStrip();
this.m_about = new System.
Windows.Forms.ToolStripMenuItem();
this.simple_menu.SuspendLayout();
this.SuspendLayout();
//
//simple_menu
//
this.simple_menu.Items.AddRange
(new System.Windows.Forms.ToolStripItem[]{ m_about });
this.simple_menu.Name = "simple_menu";
//
//m_about
//
this.m_about.Name = "m_about";
this.m_about.Text = "About";
this.m_about.Click += new System.
EventHandler(this.m_about_Click);
//
//_simple_menu
//
this.simple_menu.Location = new System.
Drawing.Point(0, 0);
this.simple_menu.Name = "simple_menu";
this.simple_menu.Text = "simple_menu";
this.Controls.Add(this.simple_menu);
this.Name = "simple_menu";
this.simple_menu.ResumeLayout(false);
this.simple_menu.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.MenuStrip simple_menu;
private System.Windows.Forms.ToolStripMenuItem m_about;
}
}
件事调用方法开始simple_about 页:
event clicked;OPEN(simple_about)
END event
方法被转换到方法类:
partial class _simple_menu : UserControl
{
private void aboutToolStripMenuItem_Click
(object sender, EventArgs e)
{
_simple_about simple_about = new _simple_about();
simple_about.Show();
}
}
- 转换数据窗口(.SRD)到DataSource类
SRD文件是数据窗口源文件。他有DataWindow对象信息:
release 10.5;
datawindow(…)
…
TABLE(COLUMN=(TYPE=CHAR(200)
updatewhereclause=yes name=name dbname="simple_demo.name" )
COLUMN=(TYPE=long updatewhereclause=yes name=age
dbname="simple_demo.age" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"simple_demo~" )
COLUMN(NAME=~"simple_demo.name~")
COLUMN(NAME=~"simple_demo.age~")) " )
SRD文件被转换从ISDataSource 继承 类到类:
public class _d_simple_demo : ISDataSource
{
public _d_simple_demo()
{
this.ConnectionString = ConfigurationManager.
ConnectionStrings["ConnectionString"].ToString();
}
public void Retrieve()
{
this.SelectComand = "SELECT name, age FROM dbo.simple_demo";
this.GetData();
}
}
ISDataSource Class 执行 Data Access Logic。 Ispirer MnMTK 提供使用System.Data.SqlClient与System.Data实行的 Class。 ISDataSource Class 是不能转换的,而在客户请求下可以发展的。
如果您有任何问题,请您随时联系我们。
|