示例#1
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;
             }
         }
     }
 }
示例#2
0
 public EditorDocument(HtmlEditor editor)
 {
     this._editor = editor;
 }
示例#3
0
 protected virtual void InitializeUserInterface()
 {
     this._editor = this.CreateEditor();
     this._editor.Dock = DockStyle.Fill;
     this._editor.DesignModeEnabled = true;
     this._editor.BordersVisible = true;
     this._editor.ScrollBarsEnabled = true;
     this._editor.FlatScrollBars = true;
     this._editor.ScriptEnabled = false;
     this._editor.Border3d = false;
     this._editor.ReadyStateComplete += new EventHandler(this.OnEditorReadyStateComplete);
     base.Controls.Add(this._editor);
     this.OnEditorCreated();
 }
示例#4
0
 protected virtual void InitializeUserInterface()
 {
     this._editor = this.CreateEditor();
     this._editor.Dock = DockStyle.Fill;
     this._editor.DesignModeEnabled = true;
     this._editor.MultipleSelectionEnabled = true;
     this._editor.AbsolutePositioningEnabled = true;
     this._editor.BordersVisible = true;
     this._editor.ScrollBarsEnabled = true;
     this._editor.FlatScrollBars = true;
     this._editor.ScriptEnabled = false;
     this._editor.Border3d = false;
     this._editor.DataObjectConverter = this.DataObjectConverter;
     this._editor.Glyphs.AddStandardGlyphs();
     foreach (EditorGlyph glyph in this._editor.Glyphs.StandardGlyphs)
     {
         if (!glyph.Tag.Equals("form"))
         {
             glyph.Visible = false;
         }
     }
     this._editor.Selection.SelectionChanged += new EventHandler(this.OnEditorSelectionChanged);
     this._editor.ReadyStateComplete += new EventHandler(this.OnEditorReadyStateComplete);
     this._editor.ShowContextMenu += new ShowContextMenuEventHandler(this.OnEditorShowContextMenu);
     base.Controls.Add(this._editor);
     this.OnEditorCreated();
     this._timer = new Timer();
     this._timer.Interval = 500;
     this._timer.Tick += new EventHandler(this.OnTimerTick);
 }
示例#5
0
 public EditorSelection(HtmlEditor editor)
 {
     this._editor = editor;
     this._minZIndex = 100;
     this._maxZIndex = 0x63;
 }
示例#6
0
 public EditorTextFormatting(HtmlEditor editor)
 {
     this._editor = editor;
 }