Exemplo n.º 1
0
 public void Remove(FormatRange item)
 {
     this.List.Remove(item);
 }
Exemplo n.º 2
0
        public FormatRange MergeFormats(int x, int y)
        {
            FormatRange fr = null;

            foreach (FormatRange frang in this)
            {
                if (frang.Contains(x, y) != 0)
                {
                    continue;
                }

                if (frang.BackColor != Color.Empty)
                {
                    if (fr == null)
                    {
                        fr = new FormatRange();
                    }

                    fr.BackColor = frang.BackColor;
                }

                if (frang.ForeColor != Color.Empty)
                {
                    if (fr == null)
                    {
                        fr = new FormatRange();
                    }

                    fr.ForeColor = frang.ForeColor;
                }

                if (frang.WaveColor != Color.Empty)
                {
                    if (fr == null)
                    {
                        fr = new FormatRange();
                    }

                    fr.WaveColor = frang.WaveColor;
                }

                if (frang.InfoTip.Length > 0)
                {
                    if (fr == null)
                    {
                        fr = new FormatRange();
                    }

                    if (fr.InfoTip.Length > 0)
                    {
                        fr.InfoTip += Environment.NewLine + Environment.NewLine + frang.InfoTip;
                    }
                    else
                    {
                        fr.InfoTip = frang.InfoTip;
                    }
                }
            }

            return(fr);
        }
Exemplo n.º 3
0
 public int Add(FormatRange item)
 {
     item.Document = this.Document;
     item.Apply();
     return(this.List.Add(item));
 }