#region
using System;
using System.Windows.Forms;
using CSFrameworkV5.Common;
using CSFrameworkV5.Language;
#endregion
namespace CSFrameworkV5.Library
{
///
/// 模块主窗体容器
///
public partial class frmModuleContainer : frmBaseChild
{
public frmModuleContainer()
{
InitializeComponent();
}
public override void DoCreateShortCut()
{
Msg.Warning(LanLib.Get("当前窗体不能设置!"));
}
private void frmModuleContainer_Load(object sender, EventArgs e)
{
SetLanguage();
}
///
/// 显示模块主窗体容器的按钮
///
public override void InitButtons()
{
//模块容器,要禁用关闭按钮
_buttons.GetButtonByName("btnClose").Enable = false;
ControlBox = false;
}
public override void SetLanguage()
{
base.SetLanguage();
//模块容器窗体与主窗体结合并存的,实际是设置主窗体的语言
_buttons.GetButtonByName("btnHelp").Caption = LanLib.Get("帮助");
_buttons.GetButtonByName("btnAbout").Caption = LanLib.Get("关于");
_buttons.GetButtonByName("btnListItem").Caption =
LanLib.Get("列表样式");
_buttons.GetButtonByName("btnTree").Caption = LanLib.Get("树形样式");
_buttons.GetButtonByName("btnLanguage").Caption =
LanLib.Get("设置语言");
if (xtraTabControl1.SelectedTabPage != null)
{
var moduleForm = (Form)xtraTabControl1.SelectedTabPage.Tag;
Text = LanLib.Get(moduleForm.GetType().FullName,
moduleForm.Text);
}
}
}
}