public void ResetImageIndex() { if (string.IsNullOrEmpty(_name)) { ImageIndex = TreeViewObjectExplorer.GetSelectedImageIndex(TreeViewObjectExplorer.GetLangaugeImageByName(_culture.Name)); } else { ImageIndex = TreeViewObjectExplorer.GetSelectedImageIndex(TreeViewObjectExplorer.GetLangaugeImageByName(_name)); } SelectedImageIndex = ImageIndex; }
public TreeNodeCulture(CultureInfo c, ProjectResources rm) { _culture = c; _resman = rm; Text = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0} [{1}]", c.NativeName, c.Name); if (string.CompareOrdinal(_culture.Name, _resman.DesignerLanguageName) == 0) { ImageIndex = TreeViewObjectExplorer.GetSelectedImageIndex(TreeViewObjectExplorer.GetLangaugeImageByName(_culture.Name)); } else { ImageIndex = TreeViewObjectExplorer.GetLangaugeImageByName(_culture.Name); } SelectedImageIndex = ImageIndex; }
public TreeNodeCulture(string nm, ProjectResources rm) { _name = nm; _resman = rm; if (string.CompareOrdinal("zh", nm) == 0) { _culture = CultureInfo.GetCultureInfo("zh-CHT"); Text = "中文 zh"; if (string.CompareOrdinal(_culture.Name, _resman.DesignerLanguageName) == 0) { ImageIndex = TreeViewObjectExplorer.GetSelectedImageIndex(TreeViewObjectExplorer.GetLangaugeImageByName(_culture.Name)); } else { ImageIndex = TreeViewObjectExplorer.GetLangaugeImageByName(_culture.Name); } SelectedImageIndex = ImageIndex; } }