コード例 #1
0
        private static void OnTreeListPopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e)
        {
            var tree = sender as TreeList;

            var hitInfo = tree.CalcHitInfo(e.Point);

            if (hitInfo.Column.OptionsColumn.AllowMoveToCustomizationForm)
            {
                int index = 0;
                for (; index < e.Menu.Items.Count - 1; index++)
                {
                    var it = e.Menu.Items[index];
                    if (TreeListStringId.MenuColumnColumnCustomization.Equals(it.Tag))
                    {
                        index++;
                        break;
                    }
                }
                var item = new DXMenuItem(XtraStrings.Get("GridStringId.MenuColumnRemoveColumn", "Remove column"),
                                          RemoveTreeListColumn);
                {
                    e.Menu.Items[index - 1].BeginGroup = false;
                    e.Menu.Items.Insert(index - 1, item);
                    e.Menu.Items[index - 1].BeginGroup = true;
                }
                item.Tag = hitInfo.Column;
            }
        }
コード例 #2
0
 public override string GetLocalizedString(StringId id)
 {
     Utils.CollectUsedResource("StringId." + id.ToString());
     //If (Localizer.Language = Localizer.lngEn) Then
     //    Return MyBase.GetLocalizedString(id)
     //End If
     return(XtraStrings.Get("StringId." + id.ToString(), base.GetLocalizedString(id)));
 }
コード例 #3
0
 public override string GetLocalizedString(ASPxTreeListStringId id)
 {
     bv.common.Core.Utils.CollectUsedResource("ASPxTreeListStringId." + id.ToString());
     if (ModelUserContext.CurrentLanguage == Localizer.lngEn)
     {
         return(base.GetLocalizedString(id));
     }
     return(XtraStrings.Get("ASPxTreeListStringId." + id.ToString(), base.GetLocalizedString(id)));
 }
コード例 #4
0
        static private void OnShowCustomizationForm(object sender, EventArgs e)
        {
            var view = sender as GridView;

            if (view != null)
            {
                view.CustomizationForm.Text = XtraStrings.Get("GridStringId.MenuColumnColumnCustomization", "Column Chooser");
            }
        }
コード例 #5
0
 public override string GetLocalizedString(ChartStringId id)
 {
     Utils.CollectUsedResource("ChartStringId." + id.ToString());
     if (ModelUserContext.CurrentLanguage == Localizer.lngEn)
     {
         return(base.GetLocalizedString(id));
     }
     return(XtraStrings.Get("ChartStringId." + id.ToString(), base.GetLocalizedString(id)));
 }
コード例 #6
0
 public override string GetLocalizedString(DevExpress.XtraGrid.Localization.GridStringId id)
 {
     Utils.CollectUsedResource("GridStringId." + id.ToString());
     if (ModelUserContext.CurrentLanguage == Localizer.lngEn && id != GridStringId.FindControlClearButton)
     {
         return(base.GetLocalizedString(id));
     }
     return(XtraStrings.Get("GridStringId." + id.ToString(), base.GetLocalizedString(id)));
 }
コード例 #7
0
 public override string GetLocalizedString(DevExpress.XtraBars.Localization.BarString id)
 {
     Utils.CollectUsedResource("BarString." + id.ToString());
     if (ModelUserContext.CurrentLanguage == Localizer.lngEn)
     {
         return(base.GetLocalizedString(id));
     }
     return(XtraStrings.Get("BarString." + id.ToString(), base.GetLocalizedString(id)));
 }
コード例 #8
0
        public static void ForceResourceAdding()
        {
            Activate();
            string tmp;
            string tmpOriginal;

            BaseStringsStorage.ForceAbsentResourceAdding = true;
            foreach (string s in Enum.GetNames(typeof(ASPxGridViewStringId)))
            {
                tmp         = (string)(XtraStrings.Get("ASPxGridViewStringId." + s, XtraGridLocalizer.Active.GetLocalizedString((ASPxGridViewStringId)(Enum.Parse(typeof(ASPxGridViewStringId), s)))));
                tmpOriginal = ((XtraGridLocalizer)XtraGridLocalizer.Active).GetDefLocalizedString((ASPxGridViewStringId)(Enum.Parse(typeof(ASPxGridViewStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "ASPxGridViewStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(ASPxTreeListStringId)))
            {
                tmp         = (string)(XtraStrings.Get("ASPxTreeListStringId." + s, XtraTreeViewLocalizer.Active.GetLocalizedString((ASPxTreeListStringId)(Enum.Parse(typeof(ASPxTreeListStringId), s)))));
                tmpOriginal = ((XtraTreeViewLocalizer)ASPxTreeListLocalizer.Active).GetDefLocalizedString((ASPxTreeListStringId)(Enum.Parse(typeof(ASPxTreeListStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "ASPxTreeListStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(ASPxperienceStringId)))
            {
                tmp         = (string)(XtraStrings.Get("ASPxperienceStringId." + s, XtraASPxperienceLocalizer.Active.GetLocalizedString((ASPxperienceStringId)(Enum.Parse(typeof(ASPxperienceStringId), s)))));
                tmpOriginal = ((XtraASPxperienceLocalizer)XtraASPxperienceLocalizer.Active).GetDefLocalizedString((ASPxperienceStringId)(Enum.Parse(typeof(ASPxperienceStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "ASPxperienceStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(ASPxEditorsStringId)))
            {
                tmp         = (string)(XtraStrings.Get("ASPxEditorsStringId." + s, XtraEditorsLocalizer.Active.GetLocalizedString((ASPxEditorsStringId)(Enum.Parse(typeof(ASPxEditorsStringId), s)))));
                tmpOriginal = ((XtraEditorsLocalizer)XtraEditorsLocalizer.Active).GetDefLocalizedString((ASPxEditorsStringId)(Enum.Parse(typeof(ASPxEditorsStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "ASPxEditorsStringId." + s, tmpOriginal, tmp);
                }
            }
            BaseStringsStorage.ForceAbsentResourceAdding = false;
        }
コード例 #9
0
        public static void ForceResourceAdding()
        {
            Init();
            string tmp;
            string tmpOriginal;

            BaseStringsStorage.ForceAbsentResourceAdding = true;
            foreach (string s in Enum.GetNames(typeof(GridStringId)))
            {
                tmp         = (string)(XtraStrings.Get("GridStringId." + s, GridLocalizer.Active.GetLocalizedString((GridStringId)(Enum.Parse(typeof(GridStringId), s)))));
                tmpOriginal = ((XtraGridLocalizer)GridLocalizer.Active).GetDefLocalizedString((GridStringId)(Enum.Parse(typeof(GridStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "GridStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(StringId)))
            {
                tmp         = (string)(XtraStrings.Get("StringId." + s, Localizer.Active.GetLocalizedString((StringId)(Enum.Parse(typeof(StringId), s)))));
                tmpOriginal = ((EditorsLocalizer)Localizer.Active).GetDefLocalizedString((StringId)(Enum.Parse(typeof(StringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "StringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(BarString)))
            {
                tmp         = (string)(XtraStrings.Get("BarString." + s, BarLocalizer.Active.GetLocalizedString((BarString)(Enum.Parse(typeof(BarString), s)))));
                tmpOriginal = ((XtraBarLocalizer)BarLocalizer.Active).GetDefLocalizedString((BarString)(Enum.Parse(typeof(BarString), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "BarString." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(NavBarStringId)))
            {
                tmp         = (string)(XtraStrings.Get("NavBarStringId." + s, NavBarLocalizer.Active.GetLocalizedString((NavBarStringId)(Enum.Parse(typeof(NavBarStringId), s)))));
                tmpOriginal = ((XtraNavBarLocalizer)NavBarLocalizer.Active).GetDefLocalizedString((NavBarStringId)(Enum.Parse(typeof(NavBarStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "NavBarStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(TreeListStringId)))
            {
                tmp         = (string)(XtraStrings.Get("TreeListStringId." + s, TreeListLocalizer.Active.GetLocalizedString((TreeListStringId)(Enum.Parse(typeof(TreeListStringId), s)))));
                tmpOriginal = ((XtraTreeLocalizer)TreeListLocalizer.Active).GetDefLocalizedString((TreeListStringId)(Enum.Parse(typeof(TreeListStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "TreeListStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(PivotGridStringId)))
            {
                tmp         = (string)(XtraStrings.Get("PivotGridStringId." + s, XtraPivotGridLocalizer.Active.GetLocalizedString((PivotGridStringId)(Enum.Parse(typeof(PivotGridStringId), s)))));
                tmpOriginal = ((XtraPivotGridLocalizer)PivotGridLocalizer.Active).GetDefLocalizedString((PivotGridStringId)(Enum.Parse(typeof(PivotGridStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "PivotGridStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(ChartStringId)))
            {
                tmp         = (string)(XtraStrings.Get("ChartStringId." + s, XtraChartLocalizer.Active.GetLocalizedString((ChartStringId)(Enum.Parse(typeof(ChartStringId), s)))));
                tmpOriginal = ((XtraChartLocalizer)ChartLocalizer.Active).GetDefLocalizedString((ChartStringId)(Enum.Parse(typeof(ChartStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "ChartStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(ReportStringId)))
            {
                tmp         = (string)(XtraStrings.Get("ReportStringId." + s, XtraReportLocalizer.Active.GetLocalizedString((ReportStringId)(Enum.Parse(typeof(ReportStringId), s)))));
                tmpOriginal = ((XtraReportLocalizer)ReportLocalizer.Active).GetDefLocalizedString((ReportStringId)(Enum.Parse(typeof(ReportStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "ReportStringId." + s, tmpOriginal, tmp);
                }
            }
            foreach (string s in Enum.GetNames(typeof(PreviewStringId)))
            {
                tmp         = (string)(XtraStrings.Get("PreviewStringId." + s, XtraPrintingLocalizer.Active.GetLocalizedString((PreviewStringId)(Enum.Parse(typeof(PreviewStringId), s)))));
                tmpOriginal = ((XtraPrintingLocalizer)PreviewLocalizer.Active).GetDefLocalizedString((PreviewStringId)(Enum.Parse(typeof(PreviewStringId), s)));
                if (tmpOriginal != tmp)
                {
                    Dbg.Debug("Resource {0} is different: original - <{1}>, our - <{2}>", "PreviewStringId." + s, tmpOriginal, tmp);
                }
            }
            BaseStringsStorage.ForceAbsentResourceAdding = false;
        }