⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.cs

📁 可将ACCESS数据库导入到Oracle数据库
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Data.Odbc;
using System.Data.Common;
using System.Data.OleDb;

namespace DataC
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class frmMain : System.Windows.Forms.Form
	{
		public 
			System.Data.OleDb.OleDbConnection oleY;
			System.Data.OleDb.OleDbConnection oleM;
			CTransition trans=null;
			System.Collections.ArrayList _alTargetField=null;
			System.Collections.ArrayList _alSourceField=null;
			System.Collections.Hashtable _htTargetFieldAndType=null;
			System.Collections.Hashtable _htSourceFieldAndType=null;
			System.Collections.ArrayList _alTargetFieldType=null;
			
		private 
			const int WM_SendLog=0x400;//发送日志消息
			const int WM_TransOver=0x500;//转换完成
		private 
			frmYBJG winYBJG=null;
			ContextMenu _ctmTransRule;//列表视图lvMBZD的弹出菜单。
			ContextMenu _ctmTransLog;//转换日志的弹出菜单。
		private System.Windows.Forms.MainMenu mm;
		private System.Windows.Forms.MenuItem MmiPZ;
		private System.Windows.Forms.MenuItem miYSJY;
		private System.Windows.Forms.MenuItem miMBSJY;
		private System.Windows.Forms.Panel panel1;
		private System.Windows.Forms.Splitter splitter2;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.MenuItem menuItem2;
		private System.Windows.Forms.SaveFileDialog sfd;
		private System.Windows.Forms.MenuItem menuItem5;
		private System.Windows.Forms.Panel panel3;
		private System.Windows.Forms.Panel panel5;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Splitter splitter1;
		private System.Windows.Forms.Panel panel6;
		private System.Windows.Forms.Panel panCenter;
		private System.Windows.Forms.ListView lvMBZD;
		private System.Windows.Forms.Splitter splitter3;
		private System.Windows.Forms.Panel panel8;
		private System.Windows.Forms.RichTextBox rtbLog;
		private System.Windows.Forms.Panel panRight;
		private System.Windows.Forms.Panel panLeft;
		private System.Windows.Forms.ListBox lbMBB;
		private System.Windows.Forms.ListBox lbYB;
		private System.Windows.Forms.Label lbTarget;
		private System.Windows.Forms.Label lbSource;
		private System.Windows.Forms.Label lbTransLog;
		private System.ComponentModel.IContainer components;

		public frmMain()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			trans=new CTransition();
			trans.SourceConn=oleY;
			trans.TargetConn=oleM;
			_alTargetField=new ArrayList();
			_alSourceField=new ArrayList();
			_htTargetFieldAndType=new Hashtable();
			_htSourceFieldAndType=new Hashtable();
			_alTargetFieldType=new ArrayList();
			//----设置转换规则的弹出菜单
			MenuItem miModifyTransRule=new MenuItem("修改转换规则");
			MenuItem miDelTransRule=new MenuItem("删除转换规则");
			miModifyTransRule.Click+=new System.EventHandler(this.miModifyTransRule_Click);
			miDelTransRule.Click+=new System.EventHandler(this.miDelTransRule_Click);
			_ctmTransRule=new ContextMenu(new MenuItem[]{miModifyTransRule,miDelTransRule});	
			//----设置转换日志richTextBox的弹出菜单
			MenuItem miSaveLog =new MenuItem("保存转换日志");
			MenuItem miClearLog =new MenuItem("清除转换日志");
			miSaveLog.Click+=new System.EventHandler(this.miSaveLog_Click);
			miClearLog.Click+=new System.EventHandler(this.miClearLog_Click);
			_ctmTransLog=new ContextMenu(new MenuItem[]{miSaveLog,miClearLog});
		}

		/// <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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
			this.mm = new System.Windows.Forms.MainMenu();
			this.MmiPZ = new System.Windows.Forms.MenuItem();
			this.miYSJY = new System.Windows.Forms.MenuItem();
			this.miMBSJY = new System.Windows.Forms.MenuItem();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.menuItem2 = new System.Windows.Forms.MenuItem();
			this.menuItem5 = new System.Windows.Forms.MenuItem();
			this.panel1 = new System.Windows.Forms.Panel();
			this.panel5 = new System.Windows.Forms.Panel();
			this.panCenter = new System.Windows.Forms.Panel();
			this.rtbLog = new System.Windows.Forms.RichTextBox();
			this.panel8 = new System.Windows.Forms.Panel();
			this.lbTransLog = new System.Windows.Forms.Label();
			this.splitter3 = new System.Windows.Forms.Splitter();
			this.lvMBZD = new System.Windows.Forms.ListView();
			this.splitter1 = new System.Windows.Forms.Splitter();
			this.panLeft = new System.Windows.Forms.Panel();
			this.lbMBB = new System.Windows.Forms.ListBox();
			this.panel6 = new System.Windows.Forms.Panel();
			this.lbTarget = new System.Windows.Forms.Label();
			this.splitter2 = new System.Windows.Forms.Splitter();
			this.panRight = new System.Windows.Forms.Panel();
			this.lbYB = new System.Windows.Forms.ListBox();
			this.panel3 = new System.Windows.Forms.Panel();
			this.lbSource = new System.Windows.Forms.Label();
			this.oleY = new System.Data.OleDb.OleDbConnection();
			this.oleM = new System.Data.OleDb.OleDbConnection();
			this.sfd = new System.Windows.Forms.SaveFileDialog();
			this.label2 = new System.Windows.Forms.Label();
			this.panel1.SuspendLayout();
			this.panel5.SuspendLayout();
			this.panCenter.SuspendLayout();
			this.panel8.SuspendLayout();
			this.panLeft.SuspendLayout();
			this.panel6.SuspendLayout();
			this.panRight.SuspendLayout();
			this.panel3.SuspendLayout();
			this.SuspendLayout();
			// 
			// mm
			// 
			this.mm.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																			   this.MmiPZ,
																			   this.menuItem1});
			// 
			// MmiPZ
			// 
			this.MmiPZ.Index = 0;
			this.MmiPZ.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																				  this.miYSJY,
																				  this.miMBSJY});
			this.MmiPZ.Text = "配置";
			// 
			// miYSJY
			// 
			this.miYSJY.Index = 0;
			this.miYSJY.Text = "源数据源...";
			this.miYSJY.Click += new System.EventHandler(this.miYSJY_Click);
			// 
			// miMBSJY
			// 
			this.miMBSJY.Index = 1;
			this.miMBSJY.Text = "目标数据源...";
			this.miMBSJY.Click += new System.EventHandler(this.miMBSJY_Click);
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 1;
			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem2,
																					  this.menuItem5});
			this.menuItem1.Text = "开始";
			// 
			// menuItem2
			// 
			this.menuItem2.Index = 0;
			this.menuItem2.Text = "追加转换";
			this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
			// 
			// menuItem5
			// 
			this.menuItem5.Index = 1;
			this.menuItem5.Text = "更新转换";
			this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
			// 
			// panel1
			// 
			this.panel1.AutoScroll = true;
			this.panel1.Controls.Add(this.panel5);
			this.panel1.Controls.Add(this.splitter2);
			this.panel1.Controls.Add(this.panRight);
			this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.panel1.Location = new System.Drawing.Point(0, 0);
			this.panel1.Name = "panel1";
			this.panel1.Size = new System.Drawing.Size(1024, 704);
			this.panel1.TabIndex = 4;
			// 
			// panel5
			// 
			this.panel5.BackColor = System.Drawing.SystemColors.AppWorkspace;
			this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.panel5.Controls.Add(this.panCenter);
			this.panel5.Controls.Add(this.splitter1);
			this.panel5.Controls.Add(this.panLeft);
			this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
			this.panel5.Location = new System.Drawing.Point(0, 0);
			this.panel5.Name = "panel5";
			this.panel5.Size = new System.Drawing.Size(885, 704);
			this.panel5.TabIndex = 2;
			// 
			// panCenter
			// 
			this.panCenter.Controls.Add(this.rtbLog);
			this.panCenter.Controls.Add(this.panel8);
			this.panCenter.Controls.Add(this.splitter3);
			this.panCenter.Controls.Add(this.lvMBZD);
			this.panCenter.Dock = System.Windows.Forms.DockStyle.Fill;
			this.panCenter.Location = new System.Drawing.Point(155, 0);
			this.panCenter.Name = "panCenter";
			this.panCenter.Size = new System.Drawing.Size(726, 700);
			this.panCenter.TabIndex = 2;
			// 
			// rtbLog
			// 
			this.rtbLog.Dock = System.Windows.Forms.DockStyle.Fill;
			this.rtbLog.Location = new System.Drawing.Point(0, 504);
			this.rtbLog.Name = "rtbLog";
			this.rtbLog.ReadOnly = true;
			this.rtbLog.Size = new System.Drawing.Size(726, 196);
			this.rtbLog.TabIndex = 14;
			this.rtbLog.Text = "";
			this.rtbLog.MouseDown += new System.Windows.Forms.MouseEventHandler(this.rtbLog_MouseDown);
			// 
			// panel8
			// 
			this.panel8.BackColor = System.Drawing.Color.LightSteelBlue;
			this.panel8.Controls.Add(this.lbTransLog);
			this.panel8.Dock = System.Windows.Forms.DockStyle.Top;
			this.panel8.Location = new System.Drawing.Point(0, 483);
			this.panel8.Name = "panel8";
			this.panel8.Size = new System.Drawing.Size(726, 21);
			this.panel8.TabIndex = 13;
			this.panel8.Paint += new System.Windows.Forms.PaintEventHandler(this.panel8_Paint);
			// 
			// lbTransLog
			// 
			this.lbTransLog.AutoSize = true;
			this.lbTransLog.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.lbTransLog.ForeColor = System.Drawing.Color.DarkMagenta;
			this.lbTransLog.Location = new System.Drawing.Point(0, 5);
			this.lbTransLog.Name = "lbTransLog";
			this.lbTransLog.Size = new System.Drawing.Size(135, 19);
			this.lbTransLog.TabIndex = 0;
			this.lbTransLog.Text = "=====转换日志=====";
			// 
			// splitter3
			// 
			this.splitter3.Dock = System.Windows.Forms.DockStyle.Top;
			this.splitter3.Location = new System.Drawing.Point(0, 480);
			this.splitter3.Name = "splitter3";
			this.splitter3.Size = new System.Drawing.Size(726, 3);
			this.splitter3.TabIndex = 10;
			this.splitter3.TabStop = false;
			// 
			// lvMBZD
			// 
			this.lvMBZD.AllowDrop = true;
			this.lvMBZD.BorderStyle = System.Windows.Forms.BorderStyle.None;
			this.lvMBZD.Dock = System.Windows.Forms.DockStyle.Top;
			this.lvMBZD.FullRowSelect = true;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -