Esempio n. 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (FormPromptNumber dialog = new FormPromptNumber("Add Index...", "Index")) {
         if (dialog.ShowDialog(this) == DialogResult.OK)
         {
             PlaylistItem item = new PlaylistItem(dialog.Value1);
             if (!list.Contains(item))
             {
                 list.Add(item);
             }
         }
     }
 }
Esempio n. 2
0
 private void btnAddRange_Click(object sender, EventArgs e)
 {
     using (FormPromptNumber dialog = new FormPromptNumber("Add Index Range...", "Start")) {
         dialog.SetInput2("End");
         if (dialog.ShowDialog(this) == DialogResult.OK)
         {
             PlaylistItem item = new PlaylistItem(dialog.Value1, dialog.Value2);
             if (!list.Contains(item))
             {
                 list.Add(item);
             }
         }
     }
 }
Esempio n. 3
0
        private void btnAddRange_Click(object sender, EventArgs e)
        {
            using (FormPromptNumber dialog = new FormPromptNumber(true)) {
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    PlaylistItem item = new PlaylistItem(dialog.Value1, dialog.Value2);

                    if (!list.Contains(item))
                    {
                        list.Add(item);
                    }
                }
            }

            DialogResult = DialogResult.None;
        }