private void mn_setLanguage(object sender, EventArgs e) { if (string.IsNullOrEmpty(_name)) { _resman.DesignerLanguageName = _culture.Name; } else { _resman.DesignerLanguageName = _name; } TreeNode np = this.Parent; if (np != null) { for (int i = 0; i < np.Nodes.Count; i++) { TreeNodeCulture tnc = np.Nodes[i] as TreeNodeCulture; if (tnc != null) { tnc.ResetImageIndex(); } } } ResetImageIndex(); }
private void mn_setToDefault(object sender, EventArgs e) { _resman.DesignerLanguageName = string.Empty; for (int i = 0; i < Nodes.Count; i++) { TreeNodeCulture tnc = Nodes[i] as TreeNodeCulture; if (tnc != null) { tnc.ResetImageIndex(); } } }
public void LoadLanguages() { Nodes.Clear(); IList <string> ls = _resman.Languages; for (int i = 0; i < ls.Count; i++) { CultureInfo cif; if (string.CompareOrdinal("zh", ls[i]) == 0) { TreeNodeCulture tn = new TreeNodeCulture("zh", _resman); Nodes.Add(tn); } else { cif = CultureInfo.GetCultureInfo(ls[i]); if (cif != null) { Nodes.Add(new TreeNodeCulture(cif, _resman)); } } } }