Ejemplo n.º 1
0
        private void cb_presetSelection_SelectedIndexChanged(object sender, EventArgs e)
        {
            btn_presetRemove.Enabled = true;

            presetIndex = cb_presetSelection.SelectedIndex;
            clockForm.applyPreset(presetList[presetIndex]);     // Size type, customSize

            sizeType   = presetList[presetIndex].SizeType;
            customSize = presetList[presetIndex].Size;

            clockForm.setSecondState(presetList[presetIndex].DisplaySeconds);
            clockForm.setLocation(presetList[presetIndex].LocationX, presetList[presetIndex].LocationY);    // Location


            assignGlobalRadioState(presetList[presetIndex].ClockType);    // clock type

            clockForm.monitorSetupIsChanged();

            clockForm.applyNewAnalogLayout(presetList[presetIndex].AnalogClockLayout);
            storedAnalogLayout = presetList[presetIndex].AnalogClockLayout;

            setRadioButton(presetList[presetIndex].ClockType);

            clockForm.setColourScheme(presetList[presetIndex].DigitalColours);
            digitalColours = presetList[presetIndex].DigitalColours;

            Data_Config.SavedConfigs.setPresetIndex(presetIndex, presetList.Size() - 1);
            Data_Config.SavedConfigs.saveData();
        }
Ejemplo n.º 2
0
        // Triggers if the apply button is hit
        private void advancedOptions_applied(object sender, EventArgs e)
        {
            //  Sets the default preset clock type
            presetList[0].ClockType = advForm.DefaultDisplayType;
            presetList.saveToFile();

            // Store values
            customSize     = advForm.CustomSize;
            sizeType       = advForm.SizeType;
            displaySeconds = advForm.DisplaySeconds;

            // Main Form settings
            setDefaultRadioButton();
            setDeadlineMinutes();

            digitalColours = (advForm.DigitalColours != null) ? advForm.DigitalColours : new ColourScheme();

            if (advForm.isAnalogLayoutApplied())
            {
                if (advForm.AnalogClockLayout != null)
                {
                    storedAnalogLayout = advForm.AnalogClockLayout;
                }
                else
                {
                    storedAnalogLayout = new AnalogLayout(new AnalogClock.AnalogClock());
                }
            }

            // Clock form settings
            clockForm.setSizeType(sizeType);
            clockForm.setCustomSize(customSize);
            clockForm.setColourScheme(digitalColours);
            clockForm.setSecondState(displaySeconds);
            clockForm.resizeForm();

            if (storedAnalogLayout != null)
            {
                clockForm.applyNewAnalogLayout(storedAnalogLayout);
            }

            advForm.resetAnalogLayoutAppliance();
        }
Ejemplo n.º 3
0
        public PresetSettingsForm(PresetList presets, int xLocation, int yLocation, int typeOfSize, int size, int radioIndex, AnalogLayout layout, ColourScheme clockColours, bool seconds)
        {
            InitializeComponent();

            mPresetList = presets;
            populatePresetView();


            x          = xLocation;
            y          = yLocation;
            sizeType   = typeOfSize;
            customSize = size;

            clockType = radioIndex;

            analogLayout = layout;

            digitalColours = clockColours;

            displaySeconds = seconds;
        }