Inheritance: System.Windows.Forms.ToolStrip
示例#1
0
        public void EditorToolStripItemClicked(EditorToolStrip instance, ToolStripItem item)
        {
            Debug.WriteLine("Item Clicked: {0}", new object[] { item });

            switch (item.Text)
            {
            case "Open File...":
                (this.Owner as MainWindow).Open();
                break;

            case "View HTML...":
                using (var frm = new SourceWindow(this._renderedDocument.HTMLResult))
                {
                    frm.ShowDialog(this);
                }
                break;

            case "Default":
            case "GitHub":
                // TODO: Delegate this to a factory or something...
                if (item.Text == "Default")
                {
                    this._watchDog.Processor = new DefaultProcessor();
                }
                else
                {
                    this._watchDog.Processor = new GitHubProcessor();
                }

                this._watchDog.Notify();
                break;
            }
        }
示例#2
0
 public ToolStripItem EditorToolStripItemForIndex(EditorToolStrip instance, int index)
 {
     return(this._editorItems[index]);
 }
示例#3
0
 public int NumberOfEditorToolStripItems(EditorToolStrip instance)
 {
     return(this._editorItems.Length);
 }