private void Inits() { #region 初始化信息 tsm_SystemManagement.Text = ChangeLanguage.getLanguage("SystemManage"); tsm_NoteManagement.Text = ChangeLanguage.getLanguage("NoteBookManage"); tsm_DocManagement.Text = ChangeLanguage.getLanguage("DocManage"); tsm_FormManagement.Text = ChangeLanguage.getLanguage("FormManage"); tsm_Language.Text = ChangeLanguage.getLanguage("Language"); tsm_Chinese.Text = ChangeLanguage.getLanguage("Chinese"); tsm_English.Text = ChangeLanguage.getLanguage("English"); tsm_Help.Text = ChangeLanguage.getLanguage("Help"); tsm_About.Text = ChangeLanguage.getLanguage("About"); tsm_Contact.Text = ChangeLanguage.getLanguage("Contact"); tsm_Close.Text = ChangeLanguage.getLanguage("DropOut"); tsm_SplitNote.Text = ChangeLanguage.getLanguage("NoteSplit"); tsm_MergeNote.Text = ChangeLanguage.getLanguage("NoteMerge"); tsm_SplitDoc.Text = ChangeLanguage.getLanguage("DocSplit"); tsm_MergeDoc.Text = ChangeLanguage.getLanguage("DocMerge"); tsm_SplitForm.Text = ChangeLanguage.getLanguage("FormSplit"); tsm_MergeForm.Text = ChangeLanguage.getLanguage("FormMerge"); tsm_ToolManagement.Text = ChangeLanguage.getLanguage("ToolManage"); tsm_TranslationTool.Text = ChangeLanguage.getLanguage("TranslationTool"); tsm_SimpleCalculator.Text = ChangeLanguage.getLanguage("SimpleCalculator"); tsm_FileFormatConversionTool.Text = ChangeLanguage.getLanguage("FileFormatConversionTool"); tbp_Index.Text = ChangeLanguage.getLanguage("Home"); this.Text = ChangeLanguage.getLanguage("FileManageTool"); #endregion #region 窗体实例化与样式设置 //文本分割 splitNote = new NoteBookManage.NoteSplitForm(); InitFormMethod(splitNote); //文本合并 mergeNote = new NoteBookManage.NoteMergeForm(); InitFormMethod(mergeNote); //文档分割 splitDoc = new DocumentManage.DocSplitForm(); InitFormMethod(splitDoc); //文档合并 mergeDoc = new DocumentManage.DocMergeForm(); InitFormMethod(mergeDoc); //表格分割 splitSheet = new SheetManage.SheetSplitForm(); InitFormMethod(splitSheet); //表格合并 mergeSheet = new SheetManage.SheetMergeForm(); InitFormMethod(mergeSheet); #endregion }
private void tsm_Chinese_Click(object sender, EventArgs e) { if (Properties.Settings.Default.DefaultLanguage == "en-us") { ChangeLanguage.SetDefaultLanguage("zh-cn"); int index = tb_Main.SelectedIndex; this.FileManagementTool_Load(null, null); RefreshTabPage(); tb_Main.SelectedIndex = index; } }
/// <summary> /// 展示窗体方法 /// </summary> /// <param name="tabPage">tabPage</param> /// <param name="pageText">名称</param> /// <param name="pageName">Name</param> /// <param name="tabIndex">索引</param> /// <param name="form">窗体</param> private void InitTabMethod(TabPage tabPage, string pageText, string pageName, int tabIndex, Form form) { if (!tb_Main.TabPages.ContainsKey(pageName)) { tabPage.Text = ChangeLanguage.getLanguage(pageText); tabPage.Name = pageName; tabPage.TabIndex = tabIndex; tabPage.Controls.Add(form); tb_Main.Controls.Add(tabPage); tb_Main.SelectedTab = tabPage; form.Show(); } else { tb_Main.SelectedTab = tabPage; } }
private void timer1_Tick(object sender, EventArgs e) { this.lbl_CurrDate.Text = ChangeLanguage.getLanguage("CurrDate") + ":" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); }
public FileManagementTool() { InitializeComponent(); ChangeLanguage.SetDefaultLanguage(Properties.Settings.Default.DefaultLanguage); }