Guest User

Untitled

a guest
Jul 12th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.69 KB | None | 0 0
  1. public class CustomPaintRichText : RichTextBox, IUnderlineableSpellingControl
  2.     {
  3.         public Dictionary<int, int> underlinedSections;
  4.         public Dictionary<int, int> protectedSections;
  5.         public Dictionary<int, int> ignoredSections;
  6.         public Dictionary<int, int> UnderlinedSections
  7.         {
  8.             get
  9.             {
  10.                 if (underlinedSections == null)
  11.                     underlinedSections = new Dictionary<int, int>();
  12.                 return underlinedSections;
  13.             }
  14.             set { underlinedSections = value; }
  15.         }
  16.  
  17.         public Dictionary<int, int> ProtectedSections
  18.         {
  19.             set { protectedSections = value; }
  20.         }
  21.  
  22.         public Dictionary<int, int> IgnoredSections
  23.         {
  24.             set { ignoredSections = value; }
  25.         }
  26.  
  27.         private bool spellingEnabled;
  28.         private bool spellingAutoEnabled;
  29.         private bool isPassWordProtected;
  30.  
  31.         private Pen penColour;
  32.         public Pen WhatPenColour
  33.         {
  34.             get { return penColour; }
  35.             set { penColour = value; }
  36.         }
  37.  
  38.         public bool IsSpellingEnabled
  39.         {
  40.             get { return spellingEnabled; }
  41.             set { spellingEnabled = value; }
  42.         }
  43.  
  44.         public bool IsSpellingAutoEnabled
  45.         {
  46.             get { return spellingAutoEnabled; }
  47.             set
  48.             {
  49.                 spellingAutoEnabled = value;
  50.                 if (!spellingEnabled) spellingEnabled = value;
  51.             }
  52.         }
  53.  
  54.         public bool IsPassWordProtected
  55.         {
  56.             get { return isPassWordProtected; }
  57.             set { isPassWordProtected = value; }
  58.         }
  59.     }
Advertisement
Add Comment
Please, Sign In to add comment