public TreeNodeLocalizeResource(ResourcePointer owner, CultureInfo culture)
 {
     _pointer = owner;
     _culture = culture;
     Text     = string.Format(System.Globalization.CultureInfo.InvariantCulture,
                              "{0} [{1}]", _culture.NativeName, _culture.Name);
     ImageIndex         = TreeViewObjectExplorer.GetLangaugeImageByName(_culture.Name);
     SelectedImageIndex = ImageIndex;
 }
 public TreeNodeLocalizeResource(ResourcePointer owner, string culture)
 {
     _pointer = owner;
     _name    = culture;
     if (string.CompareOrdinal("zh", _name) == 0)
     {
         _culture           = CultureInfo.GetCultureInfo("zh-CHT");
         Text               = "中文 zh";
         ImageIndex         = TreeViewObjectExplorer.GetLangaugeImageByName(_name);
         SelectedImageIndex = ImageIndex;
     }
 }
 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;
     }
 }