Esempio n. 1
0
 private void DisplayAlert_Clicked(object sender, EventArgs e)
 {
     try
     {
         ModernAlertsHelper.GetInstance().DisplayAlert(Color.Red, Color.White, "Modern", "Modern Alerts Simple </br> Alert </br>Body ", "OK", null, null, (obj) =>
         {
             //Logic
         }, iscontentleftalign: true);
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 2
0
 private void DisplayConfirmation_Clicked(object sender, EventArgs e)
 {
     try
     {
         ModernAlertsHelper.GetInstance().DisplayAlert(Color.Red, Color.White, "Modern Alert Confirmation Header", "Modern Alert Confirmation Body", "Yes", "No", null, (obj) =>
         {
             if (obj == null)
             {
                 return;
             }
             //Logic
         });
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 3
0
 private void DisplayActionSheet_Clicked(object sender, EventArgs e)
 {
     try
     {
         string[] numbersarray = new string[] { "1", "2", "3", "4" };
         ModernAlertsHelper.GetInstance().ActionSheet(Color.Red, Color.White, "Modern Alerts ActionSheet", numbersarray, "Cancel", (obj) =>
         {
             if (obj == null || (obj != null && obj == "Cancel"))
             {
                 return;
             }
             //Logic
         });
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 4
0
        private void GetInput_Clicked(object sender, EventArgs e)
        {
            try
            {
                var noteInput = new InputConfig()
                {
                    BackgroundColor = Color.White,
                    keyboard        = Keyboard.Text,
                    FontColor       = Color.Red,
                    isMultipleLine  = true,
                    DefaultValue    = "Test"
                };
                ModernAlertsHelper.GetInstance().DisplayAlert(Color.Black, Color.White, "Add Note", "", "save", "Cancel", null, (obj) =>
                {
                    if (string.IsNullOrEmpty(obj))
                    {
                        return;
                    }
                    if (obj != "Cancel")
                    {
                    }
                }, true, noteInput);



                //InputConfig getInputConfig = new InputConfig();
                //getInputConfig.BackgroundColor = Color.Black;
                //getInputConfig.keyboard = Keyboard.Telephone;
                //getInputConfig.MaxLength = 30;
                //getInputConfig.MinLength = 10;
                //getInputConfig.placeholder = "Enter asdf";
                //getInputConfig.FontColor = Color.White;
                //getInputConfig.DefaultValue = "Default Value";
                //ModernAlertsHelper.GetInstance().DisplayAlert(Color.Black, Color.White, "Modern Alerts Simple Alert", "Modern Alerts Simple Alert Body", "OK", "CANCEL",null, (obj) =>
                //{
                //    //Logic
                //},true, getInputConfig);
            }
            catch (Exception ex)
            {
            }
        }