Ejemplo n.º 1
0
        private void lstPlaylist_Drop(object sender, System.Windows.DragEventArgs e)
        {
            List <string> list = new List <string>(e.Data.GetData(System.Windows.DataFormats.FileDrop, true) as string[]);

            list.Sort();

            foreach (var item in list)
            {
                if (System.IO.Path.GetExtension(item) == ".xmu")
                {
                    Playlist plist = DialogsOpen.OpenPlaylist(item);
                    DialogsOpen.AddToPlaylist(plist, lstPlaylist, m_current.Plugin, false);
                }
                else
                {
                    OpenFile(item);
                }
            }
        }
Ejemplo n.º 2
0
        private void frmMain_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                m_host.LoadPlugins(App.GetPluginPath());
                m_current.IsChecked = true;
                if (m_current.Plugin.Create(PluginSystem.SoundSystemConfig.FromXML(App.GetConfigPath())))
                {
                    this.visual.MenuItem = m_current;

                    m_updateTimer          = new DispatcherTimer();
                    m_updateTimer.Interval = new TimeSpan(0, 0, 0, 0, 900);
                    m_updateTimer.Tick    += dispatcherTimer_Tick;

                    m_updateSystemTimer          = new DispatcherTimer();
                    m_updateSystemTimer.Interval = new TimeSpan(0, 0, 0, 0, 5);
                    m_updateSystemTimer.Tick    += m_updateSystemTimer_Tick;
                    m_updateSystemTimer.Start();

                    if (File.Exists(App.GetLastPlaylistPath()))
                    {
                        Playlist list = DialogsOpen.OpenPlaylist(App.GetLastPlaylistPath());
                        DialogsOpen.AddToPlaylist(list, lstPlaylist, m_current.Plugin);
                    }

                    DialogsOpen.AddToPlaylist(m_args, lstPlaylist, m_current.Plugin, false);
                }
                else
                {
                    frmMessageBox.ShowDialog("Audio system can not create", "Ramona Audio Player");
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                frmMessageBox.ShowDialog(ex.ToString(), "Ramona Audio Player");
                this.Close();
            }
        }
Ejemplo n.º 3
0
        private void menuLoadPlaylis_Click(object sender, RoutedEventArgs e)
        {
            Playlist list = DialogsOpen.OpenPlaylist();

            DialogsOpen.AddToPlaylist(list, lstPlaylist, m_current.Plugin);
        }