Exemple #1
0
        public Activity Generator()
        {
            Activity activity = new Activity();

            activity.ent_id = 1;

            string[] images = new string[177];

            for (int i = 0; i < 177; i++)
            {
                images[i] = (i + 1) + ".png";
            }

            activity._image = "activity\\" + images[Random.Range(0, images.Length)];

            string[] names = { "2018年春夏巴黎时装秀", "巴黎时装周(Paris Fashion Week)1910年,由法国时装协会主办。", "在米兰和伦敦的时装周相当保守,它们更喜欢本土的设计" };
            activity._name = names[Random.Range(0, names.Length - 1)];

            string[] descriptions = { "由法国时装协会主办", "它们更喜欢本土的设计" };
            activity._description = descriptions[Random.Range(0, descriptions.Length - 1)];

            _activityDetails = new List <ActivityDetail>();
            ActivityDetail activityDetail = new ActivityDetail();

            _activityDetails.Add(activityDetail.Generator());
            _activityDetails.Add(activityDetail.Generator());
            _activityDetails.Add(activityDetail.Generator());

            activity.ActivityDetails = _activityDetails;

            return(activity);
        }
Exemple #2
0
        public List <ActivityDetail> GetActivityDetails(int act_id)
        {
            List <ActivityDetail> activityDetails = new List <ActivityDetail>();
            string sql = "select * from activity where act_id='" + act_id + "'" + " and status = 1";

            var    row      = _theDataSource.SelectOne(sql);
            string material = row["material"].ToString();

            List <MWMaterial> mWMaterials = (List <MWMaterial>)DaoUtil.ConvertMaterialJson(material);

            for (int i = 0; i < mWMaterials.Count; i++)
            {
                MWMaterial data = mWMaterials[i];
                //Debug.Log(data[i]["cuteffect_id"]);
                ActivityDetail activityDetail = new ActivityDetail();
                if (data.type == "video")
                {
                    activityDetail.Type     = 1;
                    activityDetail.Image    = data.cover;
                    activityDetail.VideoUrl = data.path;
                }
                else if (data.type == "image")
                {
                    activityDetail.Type  = 0;
                    activityDetail.Image = data.path;
                }
                activityDetail.Description = data.description;
                activityDetails.Add(activityDetail);
            }

            return(activityDetails);
        }
Exemple #3
0
        public void LoadActivityDetail(ActivityDetail activityDetail)
        {
            _id          = activityDetail.Id;
            _isImage     = activityDetail.IsImage();
            _description = activityDetail.Description;
            _likes       = _manager.daoServiceFactory.GetLikes(activityDetail.Image);
            _image       = activityDetail.Image;
            _type        = 1;

            if (!_isImage)
            {
                _videoUrl = activityDetail.VideoUrl;
            }
        }
Exemple #4
0
        public List <ActivityDetail> GetActivityDetails(int act_id)
        {
            List <ActivityDetail> activity1s = new List <ActivityDetail>();
            ActivityDetail        activity1  = new ActivityDetail();

            activity1.SetImageType();
            activity1.Image       = "activity\\detail\\1-1.jpg";
            activity1.Description = "源赖光肩负着家族的未来。幼时经历的一场大火,让他下定决心肃清灵族。一场大战一触即发。";
            activity1s.Add(activity1);
            ActivityDetail activity2 = new ActivityDetail();

            activity2.SetImageType();
            activity2.Image       = "activity\\detail\\1-2.jpg";
            activity2.Description = "阴阳师·晴明为了阻止两界之间的战争,创造一个和平共存的世界,他开始调查源氏家族的真相。";
            activity1s.Add(activity2);
            ActivityDetail productDetail5 = new ActivityDetail();

            productDetail5.SetVideoType();
            productDetail5.Image       = "video\\1.png";
            productDetail5.Description = "video-1。";
            productDetail5.VideoUrl    = "video\\1.mp4";
            activity1s.Add(productDetail5);

            List <ActivityDetail> activity2s = new List <ActivityDetail>();
            ActivityDetail        activity11 = new ActivityDetail();

            activity11.SetImageType();
            activity11.Image       = "activity\\detail\\2-1.jpg";
            activity11.Description = "作为坂本龙一的学生,肖瀛此次将汇同国内顶尖演奏高手,助力美声男团四位“蓝声”";
            activity2s.Add(activity11);
            ActivityDetail activity12 = new ActivityDetail();

            activity12.SetImageType();
            activity12.Image       = "activity\\detail\\2-2.jpg";
            activity12.Description = "玩转咏叹调、宣叙调、世界音乐、自由爵士、古典融合电子……";
            activity2s.Add(activity12);
            ActivityDetail activity13 = new ActivityDetail();

            activity13.SetImageType();
            activity13.Image       = "activity\\detail\\2-3.jpg";
            activity13.Description = "并特邀英国巡演版《歌剧魅影》音乐总监、英国皇家音乐学院音乐剧系系主任比约恩•多布拉";
            activity2s.Add(activity13);
            ActivityDetail activity14 = new ActivityDetail();

            activity14.SetVideoType();
            activity14.Image       = "video\\2.png";
            activity14.Description = "video-2。";
            activity14.VideoUrl    = "video\\2.mp4";
            activity2s.Add(activity14);


            List <ActivityDetail> activity3s      = new List <ActivityDetail>();
            ActivityDetail        productDetail31 = new ActivityDetail();

            productDetail31.SetImageType();
            productDetail31.Image       = "activity\\detail\\3-1.jpg";
            productDetail31.Description = "诗情话剧《漫长的告白》取材于法国著名剧作家埃德蒙·罗斯丹的经典悲喜剧《大鼻子情圣》,导演徐俊倾力呈现浪漫唯美的诗情美学,用诗化的戏剧语言敲响钢琴黑白键间满溢的音乐诗篇,吟唱80年代纯真激荡的时代风情。";
            activity3s.Add(productDetail31);
            ActivityDetail productDetail32 = new ActivityDetail();

            productDetail32.SetImageType();
            productDetail32.Image       = "activity\\detail\\3-2.jpg";
            productDetail32.Description = "知名自媒体人傅踢踢、视觉艺术家马良、著名音乐人李泉鼎力加盟,四个来自60后、70后、80后的上海男人首次跨界合作,倾情演绎永不褪色的“上海爱情故事”。";
            activity3s.Add(productDetail32);
            ActivityDetail productDetail33 = new ActivityDetail();

            productDetail33.SetImageType();
            productDetail33.Image       = "activity\\detail\\3-3.jpg";
            productDetail33.Description = "故事发生在文艺精神盛行的80年代,在青春激昂的校园里,一群情感真挚,富有理想的青年热诚又果敢地追索着人生的真谛。";
            activity3s.Add(productDetail33);

            List <ActivityDetail>[] pdArra = { activity1s, activity2s, activity3s };
            return(pdArra[Random.Range(0, pdArra.Length)]);
        }