예제 #1
0
        private void UpdateDisplay()
        {
            //Debug.Log("UpdateDisplay");
            _renderers.Clear();
            _titles.Clear();

            var filteredCategories = new List <string>();

            foreach (var key in _categoriesDict.Keys)
            {
                if (_categoriesDict[key]) // == true
                {
                    filteredCategories.Add(key);
                }
            }

            //Debug.Log("filteredCategories: " + filteredCategories.Count);

            List <InfoMessage> filteredData = new List <InfoMessage>();

            foreach (InfoMessage infoMessage in _data)
            {
                if (filteredCategories.Contains(infoMessage.Category))
                {
                    filteredData.Add(infoMessage);
                }
            }

            var index = 0;
            var count = filteredData.Count;

            foreach (InfoMessage data in filteredData)
            {
                var step = new UpdateCheckStep(data);
                _renderers.Add(step);
                _titles.Add(string.Format("Update {0}/{1}: " + data.Title, index + 1, count));
                index++;
            }

            //Debug.Log("Renderers: " + _renderers.Count);

            //Debug.Log("_categoriesDict: " + _categoriesDict.Count);

            Step = 0;
        }
예제 #2
0
        private void UpdateDisplay()
        {
            //Debug.Log("UpdateDisplay");
            _renderers.Clear();
            _titles.Clear();

            var filteredCategories = new List<string>();
            foreach (var key in _categoriesDict.Keys)
            {
                if (_categoriesDict[key]) // == true
                {
                    filteredCategories.Add(key);
                }
            }

            //Debug.Log("filteredCategories: " + filteredCategories.Count);

            List<InfoMessage> filteredData = new List<InfoMessage>();
            foreach (InfoMessage infoMessage in _data)
            {
                if (filteredCategories.Contains(infoMessage.Category))
                {
                    filteredData.Add(infoMessage);
                }
            }

            var index = 0;
            var count = filteredData.Count;
            foreach (InfoMessage data in filteredData)
            {
                var step = new UpdateCheckStep(data);
                _renderers.Add(step);
                _titles.Add(string.Format("Update {0}/{1}: " + data.Title, index + 1, count));
                index++;
            }

            //Debug.Log("Renderers: " + _renderers.Count);

            //Debug.Log("_categoriesDict: " + _categoriesDict.Count);

            Step = 0;
        }