using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;namespace ControlTest
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class FormDecompileWizard : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControlDecompilerWizard;
private System.Windows.Forms.TabPage tabPageSolution;
private System.Windows.Forms.Label labelSolutionName;
private System.Windows.Forms.Label labelLocation;
private System.Windows.Forms.TextBox textBoxSolutionName;
private System.Windows.Forms.TextBox textBoxLocation;
private System.Windows.Forms.Button buttonBrowse;
private System.Windows.Forms.CheckedListBox checkedListBoxProjects;
private System.Windows.Forms.Button buttonRemove;
private System.Windows.Forms.GroupBox groupBoxProjects;
private System.Windows.Forms.TabPage tabPageScrambling;
private System.Windows.Forms.Button buttonLoad;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null; public FormDecompileWizard()
{
//
// Required for Windows Form Designer support
//
InitializeComponent(); //
// TODO: Add any constructor code after InitializeComponent call
//
} /// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tabControlDecompilerWizard = new System.Windows.Forms.TabControl();
this.tabPageSolution = new System.Windows.Forms.TabPage();
this.checkedListBoxProjects = new System.Windows.Forms.CheckedListBox();
this.buttonBrowse = new System.Windows.Forms.Button();
this.textBoxLocation = new System.Windows.Forms.TextBox();
this.textBoxSolutionName = new System.Windows.Forms.TextBox();
this.labelLocation = new System.Windows.Forms.Label();
this.labelSolutionName = new System.Windows.Forms.Label();
this.buttonLoad = new System.Windows.Forms.Button();
this.buttonRemove = new System.Windows.Forms.Button();
this.groupBoxProjects = new System.Windows.Forms.GroupBox();
this.tabPageScrambling = new System.Windows.Forms.TabPage();
this.tabControlDecompilerWizard.SuspendLayout();
this.tabPageSolution.SuspendLayout();
this.SuspendLayout();
//
// tabControlDecompilerWizard
//
this.tabControlDecompilerWizard.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabPageSolution,
this.tabPageScrambling});
this.tabControlDecompilerWizard.Location = new System.Drawing.Point(24, 24);
this.tabControlDecompilerWizard.Name = "tabControlDecompilerWizard";
this.tabControlDecompilerWizard.SelectedIndex = 0;
this.tabControlDecompilerWizard.Size = new System.Drawing.Size(592, 344);
this.tabControlDecompilerWizard.TabIndex = 0;
this.tabControlDecompilerWizard.SelectedIndexChanged += new System.EventHandler(this.tabControlDecompilerWizard_SelectedIndexChanged);
//
// tabPageSolution
//
this.tabPageSolution.Controls.AddRange(new System.Windows.Forms.Control[] {
this.buttonRemove,
this.buttonLoad,
this.checkedListBoxProjects,
}
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;namespace ControlTest
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class FormDecompileWizard : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControlDecompilerWizard;
private System.Windows.Forms.TabPage tabPageSolution;
private System.Windows.Forms.Label labelSolutionName;
private System.Windows.Forms.Label labelLocation;
private System.Windows.Forms.TextBox textBoxSolutionName;
private System.Windows.Forms.TextBox textBoxLocation;
private System.Windows.Forms.Button buttonBrowse;
private System.Windows.Forms.CheckedListBox checkedListBoxProjects;
private System.Windows.Forms.Button buttonRemove;
private System.Windows.Forms.GroupBox groupBoxProjects;
private System.Windows.Forms.TabPage tabPageScrambling;
private System.Windows.Forms.Button buttonLoad;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null; public FormDecompileWizard()
{
//
// Required for Windows Form Designer support
//
InitializeComponent(); //
// TODO: Add any constructor code after InitializeComponent call
//
} /// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tabControlDecompilerWizard = new System.Windows.Forms.TabControl();
this.tabPageSolution = new System.Windows.Forms.TabPage();
this.checkedListBoxProjects = new System.Windows.Forms.CheckedListBox();
this.buttonBrowse = new System.Windows.Forms.Button();
this.textBoxLocation = new System.Windows.Forms.TextBox();
this.textBoxSolutionName = new System.Windows.Forms.TextBox();
this.labelLocation = new System.Windows.Forms.Label();
this.labelSolutionName = new System.Windows.Forms.Label();
this.buttonLoad = new System.Windows.Forms.Button();
this.buttonRemove = new System.Windows.Forms.Button();
this.groupBoxProjects = new System.Windows.Forms.GroupBox();
this.tabPageScrambling = new System.Windows.Forms.TabPage();
this.tabControlDecompilerWizard.SuspendLayout();
this.tabPageSolution.SuspendLayout();
this.SuspendLayout();
//
// tabControlDecompilerWizard
//
this.tabControlDecompilerWizard.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabPageSolution,
this.tabPageScrambling});
this.tabControlDecompilerWizard.Location = new System.Drawing.Point(24, 24);
this.tabControlDecompilerWizard.Name = "tabControlDecompilerWizard";
this.tabControlDecompilerWizard.SelectedIndex = 0;
this.tabControlDecompilerWizard.Size = new System.Drawing.Size(592, 344);
this.tabControlDecompilerWizard.TabIndex = 0;
this.tabControlDecompilerWizard.SelectedIndexChanged += new System.EventHandler(this.tabControlDecompilerWizard_SelectedIndexChanged);
//
// tabPageSolution
//
this.tabPageSolution.Controls.AddRange(new System.Windows.Forms.Control[] {
this.buttonRemove,
this.buttonLoad,
this.checkedListBoxProjects,
}
解决方案 »
- 编写dll时有两种声明导出函数的方式,如果两种同时使用(即_declspec(export)和.def文件同时使用)系统会选择哪种呢
- WH_MOUSE_LL的回调函数LowLevelMouseProc中的lParam参数怎么用?
- 自绘BUTTON问题
- 跪求重要资料!!!
- 我是初学者,请问改哪里的initinstance?具体代码有例子么?谢谢
- 这样怎么会出错??大家帮我看看代码!
- 高分求AutoCAD2000的文件格式,如果有读写代码的给出我全部分!!!!!!!!!!!!!!!!!
- 大家好。一个单文档的程序,我想点击某一个菜单项后,生成并显示一个类似用win32 application完成的"hello world"那样的窗口,请各位说说
- 我有一局域网,怎样通过专线上互联网????请高手指教。
- 请教下,关于CListCtrl 显示 unicode 码,有些显示不了
- 我想要一段原码,实现如下功能:
- 怎么样实现 如:主窗口缩放 formview的视图中的控件(如:edit)跟着缩放
this.textBoxLocation,
this.textBoxSolutionName,
this.labelLocation,
this.labelSolutionName,
this.groupBoxProjects});
this.tabPageSolution.Location = new System.Drawing.Point(4, 21);
this.tabPageSolution.Name = "tabPageSolution";
this.tabPageSolution.Size = new System.Drawing.Size(584, 319);
this.tabPageSolution.TabIndex = 0;
this.tabPageSolution.Text = "Solution";
this.tabPageSolution.Click += new System.EventHandler(this.tabPageSolution_Click);
//
// checkedListBoxProjects
//
this.checkedListBoxProjects.Location = new System.Drawing.Point(152, 128);
this.checkedListBoxProjects.Name = "checkedListBoxProjects";
this.checkedListBoxProjects.Size = new System.Drawing.Size(376, 164);
this.checkedListBoxProjects.TabIndex = 6;
//
// buttonBrowse
//
this.buttonBrowse.Location = new System.Drawing.Point(432, 48);
this.buttonBrowse.Name = "buttonBrowse";
this.buttonBrowse.Size = new System.Drawing.Size(96, 24);
this.buttonBrowse.TabIndex = 4;
this.buttonBrowse.Text = "Browse";
//
// textBoxLocation
//
this.textBoxLocation.Location = new System.Drawing.Point(152, 48);
this.textBoxLocation.Name = "textBoxLocation";
this.textBoxLocation.Size = new System.Drawing.Size(256, 21);
this.textBoxLocation.TabIndex = 3;
this.textBoxLocation.Text = "C:\\Decompiled";
//
// textBoxSolutionName
//
this.textBoxSolutionName.Location = new System.Drawing.Point(152, 16);
this.textBoxSolutionName.Name = "textBoxSolutionName";
this.textBoxSolutionName.Size = new System.Drawing.Size(376, 21);
this.textBoxSolutionName.TabIndex = 2;
this.textBoxSolutionName.Text = "Solution1";
//
// labelLocation
//
this.labelLocation.Location = new System.Drawing.Point(32, 56);
this.labelLocation.Name = "labelLocation";
this.labelLocation.Size = new System.Drawing.Size(104, 16);
this.labelLocation.TabIndex = 1;
this.labelLocation.Text = "Location";
//
// labelSolutionName
//
this.labelSolutionName.Location = new System.Drawing.Point(32, 24);
this.labelSolutionName.Name = "labelSolutionName";
this.labelSolutionName.Size = new System.Drawing.Size(100, 16);
this.labelSolutionName.TabIndex = 0;
this.labelSolutionName.Text = "Solution Name";
//
// buttonLoad
//
this.buttonLoad.Location = new System.Drawing.Point(40, 160);
this.buttonLoad.Name = "buttonLoad";
this.buttonLoad.Size = new System.Drawing.Size(96, 24);
this.buttonLoad.TabIndex = 8;
this.buttonLoad.Text = "Load";
//
// buttonRemove
//
this.buttonRemove.Location = new System.Drawing.Point(40, 232);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(96, 24);
this.buttonRemove.TabIndex = 9;
this.buttonRemove.Text = "Remove";
//
// groupBoxProjects
//
this.groupBoxProjects.Location = new System.Drawing.Point(24, 96);
this.groupBoxProjects.Name = "groupBoxProjects";
this.groupBoxProjects.Size = new System.Drawing.Size(520, 208);
this.groupBoxProjects.TabIndex = 10;
this.groupBoxProjects.TabStop = false;
this.groupBoxProjects.Text = "Projects";
//
// tabPageScrambling
//
this.tabPageScrambling.Location = new System.Drawing.Point(4, 21);
this.tabPageScrambling.Name = "tabPageScrambling";
this.tabPageScrambling.Size = new System.Drawing.Size(584, 319);
this.tabPageScrambling.TabIndex = 1;
this.tabPageScrambling.Text = "Scrambling";
//
// FormDecompileWizard
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(672, 389);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.tabControlDecompilerWizard});
this.Name = "FormDecompileWizard";
this.Text = "Decompile Wizard";
this.tabControlDecompilerWizard.ResumeLayout(false);
this.tabPageSolution.ResumeLayout(false);
this.ResumeLayout(false); }
#endregion /// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new FormDecompileWizard());
} private void tabPageSolution_Click(object sender, System.EventArgs e)
{
} private void tabControlDecompilerWizard_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
}
{
object oRetVal = null;
if ( /*this.ExtendedProperties.Contains("DefaultValue")*/ this.DefaultValue != System.DBNull.Value )
{
//oRetVal = this.ExtendedProperties["DefaultValue"];
oRetVal = this.DefaultValue;
}
else if ( !this.AllowDBNull )
{
switch( this.DataType.ToString() )
{
case "System.Guid" :
oRetVal = Guid.NewGuid();
break;
case "System.Boolean" :
oRetVal = false;
break;
case "System.Byte" :
oRetVal = 0;
break;
case "System.Char" :
oRetVal = "";
break;
case "System.DateTime" :
oRetVal = DateTime.Today;
break;
case "System.Decimal" :
oRetVal = 0;
break;
case "System.Double" :
oRetVal = 0;
break;
case "System.Int16" :
case "System.Int32" :
case "System.Int64" :
oRetVal = 0;
break;
case "System.SByte" :
break;
case "System.Single" :
break;
case "System.String" :
oRetVal = "";
break;
case "System.TimeSpan" :
oRetVal = DateTime.Today;
break;
case "System.UInt16" :
case "System.UInt32" :
case "System.UInt64" :
oRetVal = 0;
break;
default:
break;
}
}
if ( oRetVal == null )
{
oRetVal = System.DBNull.Value;
}
return oRetVal;
} public virtual System.Data.SqlClient.SqlParameter GetCommandParameter()
{
System.Data.SqlClient.SqlParameter parameter;
/*
if ( this.DataBaseType == System.Data.SqlDbType.VarChar )
{
parameter = new System.Data.SqlClient.SqlParameter( "@" + this.ColumnName, this.DataBaseType, this.MaxLength );
}
else
{
parameter = new System.Data.SqlClient.SqlParameter( "@" + this.ColumnName, this.DataBaseType );
}
*/
parameter = new System.Data.SqlClient.SqlParameter( "@" + this.ColumnName, this.DataBaseType, this.ColumnSize );
parameter.SourceColumn = this.ColumnName;
return parameter;
}
public object TransFormValue( string stringValue )
{
object objValue = null;
try
{
switch( this.DataType.ToString() )
{
case "System.Guid" :
if ( stringValue == "" )
{
objValue = DBNull.Value;
}
else
{
objValue = new System.Guid( stringValue );
}
break;
case "System.DateTime" :
if ( stringValue == "" )
{
objValue = System.DBNull.Value;
}
else
{
objValue = System.Convert.ToDateTime( stringValue );
}
break;
case "System.Boolean" :
stringValue = stringValue.ToLower();
if ( stringValue == "true" || stringValue == "-1" )
{
objValue = true;
}
else
{
objValue = false;
}
break;
case "System.Double" :
objValue = System.Convert.ToDecimal( stringValue );
break;
default :
objValue = stringValue;
break;
}
}
catch( Exception e )
{
string errorMessage = e.Message;
}
return objValue;
}