Ejemplo n.º 1
0
        /// <summary>
        /// Creates the internal table layout from current table
        /// </summary>
        /// <param name="table"></param>
        public TableLayoutInfo(Interop.IHTMLTable table)
        {
            this._table = table;
            int i = table.rows.GetLength();

            this._rows = new ArrayList(i);
            for (int j = 0; j < i; j++)
            {
                this._rows.Add(new ArrayList());
            }
            this._cells          = new HybridDictionary();
            this.CellCoordinates = new ArrayList();
        }
Ejemplo n.º 2
0
 public EditorTable(HtmlEditor editor, EditorSelection selection)
 {
     this._editor = editor;
     this._selection = selection;
     if (!IsTableSelection(selection))
     {
         throw new ArgumentException();
     }
     ICollection items = selection.Items;
     if (items.Count == 1)
     {
         IEnumerator enumerator = items.GetEnumerator();
         enumerator.MoveNext();
         for (Interop.IHTMLElement element = (Interop.IHTMLElement) enumerator.Current; element != null; element = element.GetParentElement())
         {
             if (string.Compare(element.GetTagName(), "td", true) == 0)
             {
                 this._element = element;
                 this._table = element.GetParentElement().GetParentElement().GetParentElement() as Interop.IHTMLTable;
                 return;
             }
             if (string.Compare(element.GetTagName(), "tr", true) == 0)
             {
                 this._element = element;
                 this._table = element.GetParentElement().GetParentElement() as Interop.IHTMLTable;
                 return;
             }
             if (string.Compare(element.GetTagName(), "tbody", true) == 0)
             {
                 this._element = element;
                 this._table = element.GetParentElement() as Interop.IHTMLTable;
                 return;
             }
             if (string.Compare(element.GetTagName(), "table", true) == 0)
             {
                 this._element = element;
                 this._table = element as Interop.IHTMLTable;
                 return;
             }
         }
     }
 }
Ejemplo n.º 3
0
 internal TableCellSelectionEventArgs(Interop.IHTMLTable t, HighLightCellList cellStack, IHtmlEditor htmlEditor)
 {
     _t              = t;
     _cellStack      = cellStack;
     this.htmlEditor = htmlEditor;
 }
Ejemplo n.º 4
0
 public TableLayoutInfo(Interop.IHTMLTable table)
 {
     this._table = table;
     int length = table.GetRows().GetLength();
     this._rows = new ArrayList(length);
     for (int i = 0; i < length; i++)
     {
         this._rows.Add(new ArrayList());
     }
     this._cells = new HybridDictionary();
 }
Ejemplo n.º 5
0
 internal HighLightCells(Interop.IHTMLTable Table, Color HighLightColor, Color HighLightBorderColor, IHtmlEditor htmlEditor)
 {
     m_HighLightCellFactory = new HighLightCellFactory(HighLightColor, HighLightBorderColor, htmlEditor);
     m_Tab        = Table;
     CellComparer = new HighLightCellComparer();
 }