public MainFrm() { InitializeComponent(); Language.InitFormLanguage(this, StringResources.GetValue("lang")); ToolStripButtonGroup modeBtnGroup = new ToolStripButtonGroup(toolStrip); modeBtnGroup.AddButton(toolStripButton_BrowseMode); modeBtnGroup.AddButton(toolStripButton_EditLabelMode); modeBtnGroup.AddButton(toolStripButton_InputMode); modeBtnGroup.AddButton(toolStripButton_CheckMode); wsp_control_apt = new WorkspaceControlAdpter( modeBtnGroup, toolStripComboBox_File, TranslateTextBox, TextBox_GroupBox, new ListViewAdpter(listView, wsp.GroupDefine), picView, contextMenuStripQuickText, toolStrip, wsp); zoomAdaptor = new ZoomAdaptor(picView, toolStripButton_ZoomPlus, toolStripButton_ZoomMinus, toolStripComboBox_Zoom); langComboxApt = new LangComboxAdaptor(langToolStripComboBox, this); SetLayout(); }
private void combox_SelectedIndexChanged(object sender, EventArgs e) { try { if (combox.SelectedIndex >= 0) { string lang = getLangFromString(combox.Text); if (lang != null) { try { Language.InitFormLanguage(frm, lang); Language.InitStringResouce(lang); } catch { // if error,do not alter setting return; } StringResources.SetValue("lang", lang); Language.WriteDefaultLanguage(lang); } } } catch { } }
public ImageOutputFrm(Workspace wsp, PicView pv) { this.wsp = wsp; this.pv = pv; InitializeComponent(); Language.InitFormLanguage(this, StringResources.GetValue("lang")); }
public ManageImageFrm(Workspace wsp) { this.wsp = wsp; InitializeComponent(); Language.InitFormLanguage(this, StringResources.GetValue("lang")); }