Exemple #1
0
 private Movie convertFileURLToMovieItem(string url)
 {
     int len = url.Length, dividePoint = 0;
     bool findName = false;
     for (int i = len - 1; i >= 0; i --)
     {
         if (url[i] == '\\' && !findName)
         {
             dividePoint = i;
             break;
         }
     }
     string Locate = url.Substring(0, dividePoint);
     string Artist = "";
     string Name = url.Substring(dividePoint + 1, len - dividePoint - 1);
     var addMovie = new Movie {Artist = Artist, Location = Locate, Name = Name};
     return addMovie;
 }
Exemple #2
0
 private void ListView_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count == 0) return;
     selectMovie = (Movie) e.AddedItems[0];
 }