Esempio n. 1
0
        private void btnOpenErrorPrompt_Click(object sender, EventArgs e)
        {
            BLIO.Log("btnOpenErrorPrompt_Click");
            string text = MaterialRemindMePrompt.ShowText("Enter a message");
            MaterialExceptionPopup pop = new MaterialExceptionPopup(new ReminderException("Test", null), text);

            pop.Show();
        }
Esempio n. 2
0
        private void bunifuFlatButton2_Click(object sender, EventArgs e)
        {
            string text = MaterialRemindMePrompt.ShowText("Enter a message");

            if (!string.IsNullOrWhiteSpace(text))
            {
                MaterialMessageFormManager.MakeMessagePopup(text, 11);
            }
            else
            {
                MaterialMessageFormManager.MakeMessagePopup("This is a test.", 4);
            }
        }
Esempio n. 3
0
        private void btnSaveTheme_Click(object sender, EventArgs e)
        {
            if (currentSelectedTheme != null)
            {
                if (MaterialRemindMeBox.Show
                        ("Do you want to update the current theme, or save it under a new name? Press YES to update the current theme (\"" + currentSelectedTheme.ThemeName + "\"), and NO to save it under a new name.",
                        RemindMeBoxReason.YesNo) == DialogResult.Yes)
                {
                    if (currentSelectedTheme.IsDefault == 1)
                    {
                        MaterialRemindMeBox.Show("The selected theme is a default theme. You can't edit this theme. If you want to " +
                                                 "save this theme, save it under a different name instead (Press NO after saving)");

                        return;
                    }

                    //Update current theme
                    currentSelectedTheme.Primary      = (int)Enum.Parse(typeof(Primary), cbPrimary.SelectedItem.ToString());
                    currentSelectedTheme.DarkPrimary  = (int)Enum.Parse(typeof(Primary), cbDarkPrimary.SelectedItem.ToString());
                    currentSelectedTheme.LightPrimary = (int)Enum.Parse(typeof(Primary), cbLightPrimary.SelectedItem.ToString());
                    currentSelectedTheme.Accent       = (int)Enum.Parse(typeof(Accent), cbAccent.SelectedItem.ToString());
                    currentSelectedTheme.TextShade    = (int)Enum.Parse(typeof(TextShade), cbTextShade.SelectedItem.ToString());

                    currentSelectedTheme.Mode = (int)MaterialSkinManager.Instance.Theme;

                    BLLocalDatabase.Theme.UpdateTheme(currentSelectedTheme);
                    MaterialMessageFormManager.MakeMessagePopup("Succesfully updated theme \"" + currentSelectedTheme.ThemeName + "\"", 5);
                }
                else
                {
                    SaveNewTheme(MaterialRemindMePrompt.ShowText("Give this theme a name "));
                }
            }
            else //No currently selected thme, save as new theme
            {
                SaveNewTheme(MaterialRemindMePrompt.ShowText("Give this theme a name "));
            }
        }