Example #1
0
 public override Widget build(BuildContext context)
 {
     D.assert(this.widget.builder != null);
     return(new MetaData(
                metaData: this,
                behavior: HitTestBehavior.translucent,
                child: this.widget.builder(context, DragUtils._mapAvatarsToData(this._candidateAvatars),
                                           DragUtils._mapAvatarsToData(this._rejectedAvatars))));
 }
Example #2
0
        private bool InitMovieTitle(DragEventArgs e)
        {
            if (HasImageFile || HasImageUri)
            {
                return(false);
            }

            var movieTitle = (DragUtils.GetUnicodeText(e) ?? "").Trim();

            if (string.IsNullOrWhiteSpace(movieTitle))
            {
                return(false);
            }

            MovieTitle = movieTitle;
            return(true);
        }
Example #3
0
        private bool InitImageUri(DragEventArgs e)
        {
            if (HasImageFile)
            {
                return(false);
            }

            var imageUri = DragUtils.GetUnicodeText(e);

            if (IsImageFilePath(imageUri))
            {
                ImageUri = imageUri;
                return(true);
            }

            if (Uri.IsWellFormedUriString(imageUri, UriKind.Absolute))
            {
                ImageUri = imageUri;
                return(true);
            }

            return(false);
        }
Example #4
0
 private static string GetFirstBDROMDirectory(DragEventArgs e)
 {
     return(DragUtils.GetPaths(e).Select(BDFileUtils.GetBDROMDirectory).FirstOrDefault(s => s != null));
 }
Example #5
0
 private bool InitImageFiles(DragEventArgs e)
 {
     ImageFiles = DragUtils.GetFilesWithExtension(e, _imageExtensions);
     return(ImageFiles.Any());
 }