Guest User

Untitled

a guest
Jan 23rd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. FontStyle fs = button1.Font.Style;
  2.  
  3. if (Bold.Checked == true)
  4. fs |= FontStyle.Bold;
  5. else
  6. fs &= ~FontStyle.Bold;
  7. if (Underline.Checked == true)
  8. fs |= FontStyle.Underline;
  9. else
  10. fs &= ~FontStyle.Underline;
  11. if (Italic.Checked == true)
  12. fs |= FontStyle.Italic;
  13. else
  14. fs &= ~FontStyle.Italic;
  15. if (Strikeout.Checked == true)
  16. fs |= FontStyle.Strikeout;
  17. else
  18. fs &= ~FontStyle.Strikeout;
  19.  
  20. button1.Font = new Font("Tahoma", (float)27.75, fs);
  21.  
  22. var fs = (Bold.Checked) ? FontStyle.Bold : FontStyle.Normal;
  23. fs |= (Underline.Checked) ? FontStyle.Underline : FontStyle.Normal;
  24. fs |= (Italic.Checked) ? FontStyle.Italic : FontStyle.Normal;
  25. fs |= (Strikeout.Checked) ? FontStyle.Strikeout : FontStyle.Normal;
  26.  
  27. button1.Font = new Font("Tahoma", (float)27.75, fs);
Add Comment
Please, Sign In to add comment