Monday, November 5, 2012

Font Settings Save to Database in C# windows application


 private void btnfont_Click(object sender, EventArgs e)
        {
            try
            {
                if (fontDialog1.ShowDialog() == DialogResult.OK)
                {
                    Font font = fontDialog1.Font;


                    TypeConverter tc = TypeDescriptor.GetConverter(typeof(Font));
                    string fontString = tc.ConvertToString(font);

                 
                    txtFont.Text = fontString;
                }
            }
            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 {     ...