Example #1
0
 private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
 {
     listView1.BeginUpdate();
     foreach (string item in openFileDialog1.FileNames)
     {
         if (item.EndsWith(".m3u"))
         {
             CommonInterface.ReadPlayList(item);
         }
         else
         {
             CommonInterface.AddTrackOrURL(item);
         }
     }
     listView1.EndUpdate();
 }
Example #2
0
        static void StartupNextInstanceHandler(object sender, StartupNextInstanceEventArgs e)
        {
            switch (e.CommandLine.Count)
            {
            case 2:
                foreach (Form item in Application.OpenForms)
                {
                    if (item is Form1)
                    {
                        if (Directory.Exists(e.CommandLine[1]))
                        {
                            CommonInterface.GetFilesFromFolder(e.CommandLine[1]);
                        }
                        else if (File.Exists(e.CommandLine[1]))
                        {
                            CommonInterface.AddTrackOrURL(e.CommandLine[1]);
                        }
                        break;
                    }
                }
                break;

            case 3:
                if (e.CommandLine[1].ToLower().Equals("radio"))
                {
                    foreach (Form item in Application.OpenForms)
                    {
                        if (item is Form2)
                        {
                            if (Directory.Exists(e.CommandLine[2]))
                            {
                                CommonInterface.GetFilesFromFolder(e.CommandLine[2], true);
                            }
                            else if (File.Exists(e.CommandLine[2]))
                            {
                                CommonInterface.ReadPlayList(e.CommandLine[2], true);
                            }
                            break;
                        }
                    }
                }
                break;

            default:
                break;
            }
        }
Example #3
0
 public Form2(string path, bool isFile = false)
 {
     InitializeComponent();
     CommonInterface.Link2  = this;
     colorSlider1.Value     = Properties.Settings.Default.Volume;
     checkBox2.Checked      = Properties.Settings.Default.SoundOff;
     CommonInterface.Volume = Properties.Settings.Default.Volume2;
     Audio.Volume           = colorSlider1.Value;
     if (isFile)
     {
         CommonInterface.ReadPlayList(path, true);
     }
     else
     {
         CommonInterface.GetFilesFromFolder(path, true);
     }
 }
Example #4
0
 private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
 {
     CommonInterface.ReadPlayList(openFileDialog1.FileName, true);
 }