Exemplo n.º 1
0
 public override void Assign(RepositoryItem item)
 {
     BeginUpdate();
     try {
         base.Assign(item);
         RepositoryItemMyTextEdit source = item as RepositoryItemMyTextEdit;
         if (source == null)
         {
             return;
         }
         IncrementalBackColor = source.IncrementalBackColor;
         IncrementalForeColor = source.IncrementalForeColor;
     } finally { EndUpdate(); }
 }
Exemplo n.º 2
0
        protected override void DrawMatchedString(ControlGraphicsInfoArgs info, Rectangle bounds, string text,
                                                  string matchedText, AppearanceObject appearance, bool invert, int containsIndex)
        {
            TextEditViewInfo vi = info.ViewInfo as TextEditViewInfo;

            if (matchedText.Length > text.Length)
            {
                matchedText = text;
            }
            RepositoryItemMyTextEdit properties = (RepositoryItemMyTextEdit)vi.Item;
            AppearanceDefault        highlight  = new AppearanceDefault(properties.IncrementalForeColor, properties.IncrementalBackColor);

            info.Cache.Paint.DrawMultiColorString(info.Cache, bounds, text, matchedText, appearance, appearance.GetTextOptions().GetStringFormat(info.ViewInfo.DefaultTextOptions),
                                                  highlight.ForeColor, highlight.BackColor, invert, containsIndex);
        }
Exemplo n.º 3
0
 static MyTextEdit()
 {
     RepositoryItemMyTextEdit.RegisterMyTextEdit();
 }