public override void ApplyResources(string cultureCode) { ResourcesList.Clear(); foreach (Control ctl in Controls) { var action = ctl.Tag as ActionMetaItem; if (action != null) { string s = action.CaptionId(BusinessObject, Permissions); var resValue = CommonResourcesCache.Get(CommonResource.BvMessages.ToString(), cultureCode, s, GetViewNameForSplittedResources()); var propName = TranslationToolHelper.GetPropertyName(ctl.Name, TranslationToolHelper.TextPropName); if (resValue == null && Messages != null) { resValue = CommonResourcesCache.Get(Messages.GetType().Name, cultureCode, s, GetViewNameForSplittedResources()); } if (resValue != null) { ResourcesList.Add(propName, resValue); ctl.Text = resValue.Value.ToString(); if (!EditableControlsList.ContainsKey(propName)) { EditableControlsList.Add(propName, ctl); } } } else if (BasePanel != null && !(ctl is TranslationButton)) { TranslationToolHelperWinClient.ApplyResources(ctl, BasePanel as ITranslationView, cultureCode); } } }
public override void ApplyResources(string cultureCode) { base.ApplyResources(cultureCode); var resValues = TranslationToolHelper.ReadResxFile(ParentBasePanel.GetType().Name, cultureCode, null, null); if (resValues.ContainsKey("$this.Caption")) { CaptionLabel.Text = resValues["$this.Caption"].Value.ToString(); if (!EditableControlsList.ContainsKey("$this.Caption")) { EditableControlsList.Add("$this.Caption", this); } } }