Beispiel #1
0
        private void itemoutput_click(object sender, RoutedEventArgs e)
        {
            OutputMenuItem clicked = ((OutputMenuItem)sender);

            if (clicked == m_current)
            {
                clicked.IsChecked = true;
            }
            else
            {
                if (m_curPlaying != null)
                {
                    this.cmdStop_Click(sender, e);
                }

                m_current.Plugin.Destroy();
                m_current.IsChecked = false;
                m_current           = clicked;

                m_current.Plugin.Create(PluginSystem.SoundSystemConfig.FromXML(App.GetConfigPath()));
                m_current.IsChecked  = true;
                this.visual.MenuItem = m_current;

                foreach (Plalistitem item in lstPlaylist.Items)
                {
                    item.UpdateSystem(m_current.Plugin);
                }
            }
        }
Beispiel #2
0
        public void AddOutputToMenu(object sender, PluginSystem.IPlugin plugin)
        {
            if (plugin.Type == PluginType.SoundOutPlugin)
            {
                OutputMenuItem item = new OutputMenuItem(plugin as IOutPlugin);

                item.Click += (itemoutput_click);

                if (m_current == null && item.Name.Contains("Dummy") == false)
                {
                    m_current = item;
                }

                menuOutput.Items.Add(item);
            }
            else if (plugin.Type == PluginType.VisualRendererPlugin)
            {
                visual.RegisterVisualPlugin(plugin as IVisualRenderer);
            }
        }