Monday, November 5, 2012

Color Settings save to Database in C# windows application


 private void btnColor_Click(object sender, EventArgs e)
        {
            try
            {
                if (colorDialog1.ShowDialog() == DialogResult.OK)
                {
                    string color = colorDialog1.Color.ToArgb().ToString("x");
                    //color = color.Substring(2, 6);
                    //color = "#" + color;

                    txtColor.Text = color;
                }
            }
            catch (Exception ex)
            {
                Utils.LogHandler.HandleError(ex);
            }
        }

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...