Exemplo n.º 1
0
        public object ProvideValue(IServiceProvider serviceProvider)
        {
            if (Text == null)
            {
                return(null);
            }

            // Do your translation lookup here, using whatever method you require
            var translated = CultureUtility.GetResxNameByValue(Text);

            return(translated);
        }
        /// <summary>
        /// Dummy data for side panel
        /// </summary>
        /// <returns></returns>
        private List <SimpleObject> PreparedObject()
        {
            var dummyData = new List <SimpleObject>();

            SimpleObject obj = new SimpleObject();

            obj.HeaderText = CultureUtility.GetResxNameByValue("Submissions");
            obj.ChildItemList.Add(new ChildItems {
                TextValue = CultureUtility.GetResxNameByValue("ManageSubmissions"), DataValue = "MS1"
            });
            dummyData.Add(obj);

            obj            = new SimpleObject();
            obj.HeaderText = CultureUtility.GetResxNameByValue("Timesheet");
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "View Timesheet", DataValue = "T1"
            });
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Create Timesheet", DataValue = "T2", BubbleCount = 5
            });
            dummyData.Add(obj);

            obj            = new SimpleObject();
            obj.HeaderText = "Expense";
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "View Expense Report", DataValue = "E1"
            });
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Create Expense Report", DataValue = "E2"
            });
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Approve Expense Report", DataValue = "E3", BubbleCount = 2
            });
            dummyData.Add(obj);

            obj            = new SimpleObject();
            obj.HeaderText = "Engagement";
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "View Engagement", DataValue = "Eg1"
            });

            dummyData.Add(obj);

            obj            = new SimpleObject();
            obj.HeaderText = "Payment";
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "View Payment History", DataValue = "P1"
            });
            dummyData.Add(obj);

            obj            = new SimpleObject();
            obj.HeaderText = "Dossier";
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Information", DataValue = "D1"
            });
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Security", DataValue = "D2"
            });
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Contact Us", DataValue = "D3"
            });
            dummyData.Add(obj);

            obj            = new SimpleObject();
            obj.HeaderText = "Dashboard";
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Dashboard", DataValue = "D1"
            });
            dummyData.Add(obj);

            obj            = new SimpleObject();
            obj.HeaderText = "Logout";
            obj.ChildItemList.Add(new ChildItems {
                TextValue = "Logout", DataValue = "D1"
            });
            dummyData.Add(obj);

            return(dummyData);
        }