三、VB.NET 多语言版本的开发之From窗体调用

来源:互联网 发布:阿里云服务器 tls升级 编辑:程序博客网 时间:2024/05/17 09:09
frmlogin窗体
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace MuchLanguage
{
    
/// <summary>
    
/// Form1 的摘要说明。
    
/// </summary>
    
public class Frmlogin : System.Windows.Forms.Form
    {
        
private System.Windows.Forms.Label lblusername;
        
private System.Windows.Forms.Label lblpassword;
        
private System.Windows.Forms.Label lbllanguage;
        
private System.Windows.Forms.Button btnlogon;
        
private System.Windows.Forms.Button btncancel;
        
private System.Windows.Forms.Button btnchagepwd;
        
private System.Windows.Forms.ComboBox CbxSelectLanguage;
        
private System.Windows.Forms.TextBox TxtUsername;
        
private System.Windows.Forms.TextBox TxtPasswrod;
        
private System.Windows.Forms.GroupBox gBox;

        ReadDefaultLanguage Rdla
=new ReadDefaultLanguage();
        
private string DefaultLanguage;
        
private System.Windows.Forms.LinkLabel llblSetLanguageDefine;

        
/// <summary>
        
/// 必需的设计器变量。
        
/// </summary>
        
private System.ComponentModel.Container components = null;

        
public Frmlogin()
        {
            
//
            
// Windows 窗体设计器支持所必需的
            
//
            InitializeComponent();

            
//
            
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
            
//
        }

        
/// <summary>
        
/// 清理所有正在使用的资源。
        
/// </summary>
        
protected override void Dispose( bool disposing )
        {
            
if( disposing )
            {
                
if (components != null) 
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }

        
Windows 窗体设计器生成的代码
 

frmSetLanguage窗体-设置默认语言
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace MuchLanguage
{
    
/// <summary>
    
/// SetLanguageOption 的摘要说明。
    
/// </summary>
    
public class FrmSetLanguage : System.Windows.Forms.Form
    {
        
private System.Windows.Forms.Button BtnOK;
        
private System.Windows.Forms.Button BtnExit;
        
private System.Windows.Forms.GroupBox gBox;
        
/// <summary>
        
/// 必需的设计器变量。
        
/// </summary>
        
private System.ComponentModel.Container components = null;
        ReadDefaultLanguage Rdla
=new ReadDefaultLanguage();
        
private string DefaultLanguage;
        
private System.Windows.Forms.ListBox Lboxlang;
        
private System.Windows.Forms.Label lblSet;
        
private System.Windows.Forms.Label lblOKinfo;
        
private System.Windows.Forms.Label lblSetinfo;
        
private System.Windows.Forms.Label lblOK;
        
private string RbtnTxt;
        
        
public FrmSetLanguage()
        {
            
//
            
// Windows 窗体设计器支持所必需的
            
//
            InitializeComponent();

            
//
            
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
            
//
        }

        
/// <summary>
        
/// 清理所有正在使用的资源。
        
/// </summary>
        
protected override void Dispose( bool disposing )
        {
            
if( disposing )
            {
                
if(components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }

        
Windows 窗体设计器生成的代码