Esempio n. 1
0
        private Dictionary <string, List <MyCinemaTalk> > Arrange(Cinematalk_Test datas)
        {
            Dictionary <string, List <MyCinemaTalk> > ndatas = new Dictionary <string, List <MyCinemaTalk> >();
            var groupIDs = GetGroupIDs(datas);

            foreach (var groupID in groupIDs)
            {
                var temp  = datas.VCinemaTalk.Where(o => o.CinemaTalk_GroupID == groupID).ToList();
                var temp2 = temp.OrderBy(o => Convert.ToInt32(o.GroupStep)).ToList();

                List <MyCinemaTalk> temp3 = new List <MyCinemaTalk>();
                foreach (var tmp in temp2)
                {
                    string ttt  = tmp.ObjectFmodEventName01;
                    var    aaa  = tmp.ObjectFmodEventName01.Split(new string[] { "/" }, StringSplitOptions.None);
                    string name = aaa[aaa.Length - 1].Split(new string[] { "_" }, StringSplitOptions.None)[0];
                    temp3.Add(new MyCinemaTalk
                    {
                        Maze_EpisodeNumber       = tmp.Maze_EpisodeNumber,
                        Quest_ID                 = tmp.Quest_ID,
                        Entity_Type              = tmp.Entity_Type,
                        SituationStringStep01_ID = tmp.SituationStringStep01_ID,
                        ObjectFaceType           = tmp.ObjectFaceType,
                        ObjectFmodEventName01    = name
                    });
                }

                ndatas.Add(groupID, temp3);
            }

            return(ndatas);
        }
Esempio n. 2
0
        private List <string> GetGroupIDs(Cinematalk_Test datas)
        {
            Dictionary <string, int> lists = new Dictionary <string, int>();

            foreach (var data in datas.VCinemaTalk)
            {
                if (!lists.ContainsKey(data.CinemaTalk_GroupID))
                {
                    lists.Add(data.CinemaTalk_GroupID, 0);
                }
            }

            List <string> result = new List <string>();

            foreach (var list in lists)
            {
                result.Add(list.Key);
            }
            return(result);
        }