コード例 #1
0
ファイル: MxUi.cs プロジェクト: Athari/DisneySecondScreen
 public void insertSubview(MXUIView view)
 {
     subviews.Add(view);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: Athari/DisneySecondScreen
 private void DownloadAssets(ICollection<string> files, string file, MXUIView view)
 {
     view.buttons.ForEach(o => DownloadAssets(files, file, o));
     view.layers.ForEach(o => DownloadAssets(files, file, o));
     view.sliders.ForEach(o => DownloadAssets(files, file, o));
     view.subviews.ForEach(o => DownloadAssets(files, file, o));
     var gallery = view as MXUIGallery;
     if (gallery != null) {
         MXUIView galleryButtonGroup = gallery.subviews.SingleOrDefault(v => v.layerInfo.name == "gallery_button_group");
         if (galleryButtonGroup != null) { // can be null for deleted scene module
             string dir = _context.Config.SecondScreenAssetBase;
             IEnumerable<MXUIButton> galleryInfoButtons = galleryButtonGroup.buttons.Where(b => b.layerInfo.name.Contains("info"));
             IEnumerable<string> infoImageNames = galleryInfoButtons.Select(b => b.layerInfo.name.Split('_').Take(3).JoinString("_"));
             files.AddRange(infoImageNames.Select(name => dir + name + "_info_segment.mxcsi"));
         }
     }
     var flipbook = view as MXUIFlipbook;
     if (flipbook != null) {
         string eventId = new Regex(@"^(IS_\d+)_flipbook$").Match(file).Groups[1].Value;
         for (int i = 0; i < flipbook.sequenceCount; i++)
             files.Add(_context.Config.FlipbookBase + eventId + "_FB_" + i + ".swf");
     }
     var video = view as MXUIVideo;
     if (video != null) {
         files.Add(_context.Config.VideoBase + video.filename);
     }
 }