Example #1
0
 public void Init()
 {
     _repo = new PlayListMemory();
     pl0 = new PlayList { Name = "pl0", Description = "zero playlist" };
     pl1 = new PlayList { Name = "pl1", Description = "first playlist" };
     pl2 = new PlayList { Name = "pl2", Description = "second playlist" };
 }
Example #2
0
        public void Add(PlayList pl)
        {
            if (_playlist.Values.Select(p => p.Name).Contains(pl.Name))
                throw new ArgumentException();

            pl.Id = _playid;
            _playlist.Add(_playid++, pl);
        }
Example #3
0
 public EditPlayListView(PlayList pl , String option)
     : base("EditPlayList",
         H1(Text("Edit "+pl.Name+" PlayList")),
         Form("post", "/playlist/"+pl.Id+"/edit",
         Label("name", "Name : "), P(), EditInputText("name_input" , pl.Name), 
         Label("Exists" , option) , P(),
         Label("desc", "Description : "), P(), EditInputText("desc_input" , pl.Description), P(),
         InputSubmit("Submit")))
 {
 }
Example #4
0
 public void Remove(PlayList pl)
 {
     _playlist.Remove(pl.Id);
 }
Example #5
0
 public void UpdateValue(PlayList pl)
 {
     _playlist[pl.Id] = pl;
 }