예제 #1
0
        private void CreateMyWidgetItems()
        {
            try
            {
                mListLeftWidgetItems.Clear();

                var list = mListMyWidgetInfos.Where(w => w.IsCenter == false).ToList();
                for (int i = 0; i < list.Count; i++)
                {
                    var info = list[i];

                    WidgetPreviewItem item = new WidgetPreviewItem();
                    item.WidgetInfo  = info;
                    item.WidgetID    = info.WidgetID;
                    item.Name        = info.Name;
                    item.Display     = CurrentApp.GetLanguageInfo(string.Format("1206W{0}", info.WidgetID), info.Name);
                    item.Description = item.Display;
                    item.Icon        = string.Format("/UMPS1206;component/Themes/Default/UMPS1206/Images/Widgets/{0}.png", info.WidgetID);
                    mListLeftWidgetItems.Add(item);
                }

                list = mListMyWidgetInfos.Where(w => w.IsCenter).ToList();
                for (int i = 0; i < list.Count; i++)
                {
                    var info = list[i];

                    WidgetPreviewItem item = new WidgetPreviewItem();
                    item.WidgetInfo  = info;
                    item.WidgetID    = info.WidgetID;
                    item.Name        = info.Name;
                    item.Display     = CurrentApp.GetLanguageInfo(string.Format("1206W{0}", info.WidgetID), info.Name);
                    item.Description = item.Display;
                    item.Icon        = string.Format("/UMPS1206;component/Themes/Default/UMPS1206/Images/Widgets/{0}.png", info.WidgetID);
                    mListCenterWidgetItems.Add(item);
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }
예제 #2
0
        private void CreateAllWidgetItems()
        {
            try
            {
                mListAllWidgetItems.Clear();
                for (int i = 0; i < mListAllWidgetInfos.Count; i++)
                {
                    var info = mListAllWidgetInfos[i];

                    WidgetPreviewItem item = new WidgetPreviewItem();
                    item.WidgetInfo  = info;
                    item.WidgetID    = info.WidgetID;
                    item.Name        = info.Name;
                    item.Display     = CurrentApp.GetLanguageInfo(string.Format("1206W{0}", info.WidgetID), info.Name);
                    item.Description = item.Display;
                    item.Icon        = string.Format("/UMPS1206;component/Themes/Default/UMPS1206/Images/Widgets/{0}.png", info.WidgetID);
                    mListAllWidgetItems.Add(item);
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }