Beispiel #1
0
        private void init()
        {
            LedManager.init();
            LedManager.direction = true;
            lightEnabled.Checked = Properties.Settings.Default.lightEnabled;
            LedManager.enabled   = lightEnabled.Checked;
            ArduinoCommunication.init(setDeviceStatus);

            modes = new List <DisplayMode>();
            tabControl.SelectedIndexChanged -= tabControl_SelectedIndexChanged;

            addModeTab(new StaticColorMode());
            addModeTab(new MusicMode());
            addModeTab(new ScreenCaptureMode());
        }
Beispiel #2
0
        private void cleanUp()
        {
            Properties.Settings.Default.lastMode = getActiveModeIndex();

            foreach (DisplayMode mode in modes)
            {
                mode.deactivate();
                mode.cleanUp();
            }

            LedManager.setColor(Color.Black);

            Thread.Sleep(30);
            ArduinoCommunication.cleanUp();

            Properties.Settings.Default.ledCount     = LedManager.ledCount;
            Properties.Settings.Default.lightEnabled = LedManager.enabled;
            Properties.Settings.Default.Save();
        }