Example #1
0
        private async void GUI_MenuDeletePersonalPresetButtonPressed(object sender, string presetName)
        {
            if (DeletePresetKVP(presetName))
            {
                await Delay(200);

                PersonalPresetsListChanged?.Invoke(this, EventArgs.Empty);
                Screen.ShowNotification($"{ScriptName}: Personal preset ~r~{presetName}~w~ deleted");
            }
        }
Example #2
0
        private async void GUI_MenuSavePersonalPresetButtonPressed(object sender, string presetName)
        {
            if (SavePresetAsKVP(presetName, CurrentPreset))
            {
                await Delay(200);

                PersonalPresetsListChanged?.Invoke(this, EventArgs.Empty);
                Screen.ShowNotification($"{ScriptName}: Personal preset ~g~{presetName}~w~ saved");
            }
            else
            {
                Screen.ShowNotification($"{ScriptName}: The name {presetName} is invalid or already used.");
            }
        }