Exemple #1
0
 private void ShowRenameDialog()
 {
     if (this.MainListBox.SelectedIndex != -1)
     {
         EnterNameForm enterNameForm = new EnterNameForm(this);
         enterNameForm.ShowDialog();
         if (!String.IsNullOrEmpty(CurrentName))
         {
             (this.MainListBox.SelectedItem as PlaylistData).Title = CurrentName;
         }
         var items = this.MainListBox.Items.Cast <PlaylistData>().ToList();
         this.MainListBox.Items.Clear();
         foreach (var item in items)
         {
             this.MainListBox.Items.Add(item);
         }
     }
 }
Exemple #2
0
        private void SetNameDialog()
        {
            EnterNameForm enterNameForm = new EnterNameForm(this);

            enterNameForm.ShowDialog();
        }