Ejemplo n.º 1
0
        public mainForm()
        {
            InitializeComponent();
            AddTrackBarItems();
            mainNotifyIcon.Icon = this.Icon;

            visualizer = new KeyboardVisualizer();
            if (!visualizer.InitKeyboard())
            {
                System.Windows.Forms.MessageBox.Show("Unable to initialize CUE support!", "Error", System.Windows.Forms.MessageBoxButtons.OK);
                Application.Exit();
            }
            try
            {
                visualizer.UpdateFromSettings();
            }
            catch (ModeNotFoundException)
            {
                //On a ModeNotFoundException, reset the default mode to "Spectrum,Spectrum". This mode is built-in, and should never not be found
                Properties.Settings.Default.VisualizerMode = "Spectrum,Spectrum";
                visualizer.UpdateFromSettings();
            }
            AddValidWasapiDevices();
            AddVisualizerModes();
            ShowNotifyIcon();
        }
Ejemplo n.º 2
0
        public mainForm()
        {
            InitializeComponent();
            AddTrackBarItems();
            mainNotifyIcon.Icon = this.Icon;

            visualizer = new KeyboardVisualizer();
            if (!visualizer.InitKeyboard())
            {
                System.Windows.Forms.MessageBox.Show("Unable to initialize CUE support!", "Error", System.Windows.Forms.MessageBoxButtons.OK);
                Application.Exit();
            }
            try
            {
                visualizer.UpdateFromSettings();
            }
            catch (ModeNotFoundException)
            {
                //On a ModeNotFoundException, reset the default mode to "Spectrum,Spectrum". This mode is built-in, and should never not be found
                Properties.Settings.Default.VisualizerMode = "Spectrum,Spectrum";
                visualizer.UpdateFromSettings();
            }
            AddValidWasapiDevices();
            AddVisualizerModes();
            ShowNotifyIcon();
        }