public void ScrollToBottom()
 {
     ScrollingRichTextBox.SendMessage(base.Handle, 277u, new IntPtr(7), new IntPtr(0));
 }
 public void ScrollLineUp()
 {
     ScrollingRichTextBox.SendMessage(base.Handle, 277u, new IntPtr(0), new IntPtr(0));
 }
Exemplo n.º 3
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(DocumentPanel));

            this.commentContextMenuStrip             = new ContextMenuStrip(this.components);
            this.markForReviewToolStripMenuItem      = new ToolStripMenuItem();
            this.clearNoteToolStripMenuItem          = new ToolStripMenuItem();
            this.toolStripSeparator1                 = new ToolStripSeparator();
            this.insertBlankLinesToolStripMenuItem   = new ToolStripMenuItem();
            this.addToVietPhraseContextMenuStrip     = new ContextMenuStrip(this.components);
            this.addToVietPhraseToolStripMenuItem    = new ToolStripMenuItem();
            this.addToNameToolStripMenuItem          = new ToolStripMenuItem();
            this.updateNamePhuToolStripMenuItem      = new ToolStripMenuItem();
            this.updatePhienAmToolStripMenuItem      = new ToolStripMenuItem();
            this.toolStripSeparator2                 = new ToolStripSeparator();
            this.baikeingToolStripMenuItem           = new ToolStripMenuItem();
            this.ncikuToolStripMenuItem              = new ToolStripMenuItem();
            this.toolStripSeparator3                 = new ToolStripSeparator();
            this.copyToVietToolStripMenuItem         = new ToolStripMenuItem();
            this.copyToClipboardToolStripMenuItem    = new ToolStripMenuItem();
            this.deleteSelectedTextToolStripMenuItem = new ToolStripMenuItem();
            this.deleteRememberToolStripMenuItem     = new ToolStripMenuItem();
            this.contentRichTextBox            = new ScrollingRichTextBox();
            this.chooseMeaningContextMenuStrip = new ContextMenuStrip(this.components);
            this.commentContextMenuStrip.SuspendLayout();
            this.addToVietPhraseContextMenuStrip.SuspendLayout();
            base.SuspendLayout();
            this.commentContextMenuStrip.Items.AddRange(new ToolStripItem[]
            {
                this.markForReviewToolStripMenuItem,
                this.clearNoteToolStripMenuItem,
                this.toolStripSeparator1,
                this.insertBlankLinesToolStripMenuItem
            });
            this.commentContextMenuStrip.Name            = "contextMenuStrip";
            this.commentContextMenuStrip.Size            = new Size(186, 76);
            this.markForReviewToolStripMenuItem.Name     = "markForReviewToolStripMenuItem";
            this.markForReviewToolStripMenuItem.Overflow = ToolStripItemOverflow.AsNeeded;
            this.markForReviewToolStripMenuItem.Size     = new Size(185, 22);
            this.markForReviewToolStripMenuItem.Text     = "Chú ý cho biên dịch";
            this.markForReviewToolStripMenuItem.Click   += new EventHandler(this.MarkForReviewToolStripMenuItemClick);
            this.clearNoteToolStripMenuItem.Name         = "clearNoteToolStripMenuItem";
            this.clearNoteToolStripMenuItem.Size         = new Size(185, 22);
            this.clearNoteToolStripMenuItem.Text         = "Bỏ chú ý";
            this.clearNoteToolStripMenuItem.Click       += new EventHandler(this.ClearNoteToolStripMenuItemClick);
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new Size(182, 6);
            this.insertBlankLinesToolStripMenuItem.Name   = "insertBlankLinesToolStripMenuItem";
            this.insertBlankLinesToolStripMenuItem.Size   = new Size(185, 22);
            this.insertBlankLinesToolStripMenuItem.Text   = "Chèn các dòng trắng";
            this.insertBlankLinesToolStripMenuItem.Click += new EventHandler(this.InsertBlankLinesToolStripMenuItemClick);
            this.addToVietPhraseContextMenuStrip.Items.AddRange(new ToolStripItem[]
            {
                this.addToVietPhraseToolStripMenuItem,
                this.addToNameToolStripMenuItem,
                this.updateNamePhuToolStripMenuItem,
                this.updatePhienAmToolStripMenuItem,
                this.toolStripSeparator2,
                this.baikeingToolStripMenuItem,
                this.ncikuToolStripMenuItem,
                this.toolStripSeparator3,
                this.copyToVietToolStripMenuItem,
                this.copyToClipboardToolStripMenuItem,
                this.deleteSelectedTextToolStripMenuItem,
                this.deleteRememberToolStripMenuItem
            });
            this.addToVietPhraseContextMenuStrip.Name          = "addToVietPhraseContextMenuStrip";
            this.addToVietPhraseContextMenuStrip.Size          = new Size(241, 258);
            this.addToVietPhraseContextMenuStrip.Opening      += new CancelEventHandler(this.AddToVietPhraseContextMenuStripOpening);
            this.addToVietPhraseToolStripMenuItem.Name         = "addToVietPhraseToolStripMenuItem";
            this.addToVietPhraseToolStripMenuItem.ShortcutKeys = (Keys)262230;
            this.addToVietPhraseToolStripMenuItem.Size         = new Size(240, 22);
            this.addToVietPhraseToolStripMenuItem.Text         = "Update &VietPhrase";
            this.addToVietPhraseToolStripMenuItem.Click       += new EventHandler(this.AddToVietPhraseToolStripMenuItemClick);
            this.addToNameToolStripMenuItem.Name             = "addToNameToolStripMenuItem";
            this.addToNameToolStripMenuItem.ShortcutKeys     = (Keys)262222;
            this.addToNameToolStripMenuItem.Size             = new Size(240, 22);
            this.addToNameToolStripMenuItem.Text             = "Update &Name (chính)";
            this.addToNameToolStripMenuItem.Click           += new EventHandler(this.AddToNameToolStripMenuItemClick);
            this.updateNamePhuToolStripMenuItem.Name         = "updateNamePhuToolStripMenuItem";
            this.updateNamePhuToolStripMenuItem.ShortcutKeys = (Keys)262221;
            this.updateNamePhuToolStripMenuItem.Size         = new Size(240, 22);
            this.updateNamePhuToolStripMenuItem.Text         = "Update Name (phụ)";
            this.updateNamePhuToolStripMenuItem.Click       += new EventHandler(this.UpdateNamePhuToolStripMenuItemClick);
            this.updatePhienAmToolStripMenuItem.Name         = "updatePhienAmToolStripMenuItem";
            this.updatePhienAmToolStripMenuItem.ShortcutKeys = (Keys)262224;
            this.updatePhienAmToolStripMenuItem.Size         = new Size(240, 22);
            this.updatePhienAmToolStripMenuItem.Text         = "Update &Phiên Âm";
            this.updatePhienAmToolStripMenuItem.Click       += new EventHandler(this.UpdatePhienAmToolStripMenuItemClick);
            this.toolStripSeparator2.Name                         = "toolStripSeparator2";
            this.toolStripSeparator2.Size                         = new Size(237, 6);
            this.baikeingToolStripMenuItem.Name                   = "baikeingToolStripMenuItem";
            this.baikeingToolStripMenuItem.ShortcutKeys           = (Keys)262210;
            this.baikeingToolStripMenuItem.Size                   = new Size(240, 22);
            this.baikeingToolStripMenuItem.Text                   = "&Baike-ing";
            this.baikeingToolStripMenuItem.Click                 += new EventHandler(this.BaikeingToolStripMenuItemClick);
            this.ncikuToolStripMenuItem.Name                      = "ncikuToolStripMenuItem";
            this.ncikuToolStripMenuItem.ShortcutKeys              = (Keys)262229;
            this.ncikuToolStripMenuItem.Size                      = new Size(240, 22);
            this.ncikuToolStripMenuItem.Text                      = "Ncik&u-ing";
            this.ncikuToolStripMenuItem.Click                    += new EventHandler(this.NcikuToolStripMenuItemClick);
            this.toolStripSeparator3.Name                         = "toolStripSeparator3";
            this.toolStripSeparator3.Size                         = new Size(237, 6);
            this.copyToVietToolStripMenuItem.Name                 = "copyToVietToolStripMenuItem";
            this.copyToVietToolStripMenuItem.ShortcutKeys         = (Keys)262211;
            this.copyToVietToolStripMenuItem.Size                 = new Size(240, 22);
            this.copyToVietToolStripMenuItem.Text                 = "&Copy To Việt";
            this.copyToVietToolStripMenuItem.Click               += new EventHandler(this.CopyToVietToolStripMenuItemClick);
            this.copyToClipboardToolStripMenuItem.Name            = "copyToClipboardToolStripMenuItem";
            this.copyToClipboardToolStripMenuItem.ShortcutKeys    = (Keys)131139;
            this.copyToClipboardToolStripMenuItem.Size            = new Size(240, 22);
            this.copyToClipboardToolStripMenuItem.Text            = "Copy To Clipboard";
            this.copyToClipboardToolStripMenuItem.Click          += new EventHandler(this.CopyToClipboardToolStripMenuItemClick);
            this.deleteSelectedTextToolStripMenuItem.Enabled      = false;
            this.deleteSelectedTextToolStripMenuItem.Name         = "deleteSelectedTextToolStripMenuItem";
            this.deleteSelectedTextToolStripMenuItem.ShortcutKeys = (Keys)262232;
            this.deleteSelectedTextToolStripMenuItem.Size         = new Size(240, 22);
            this.deleteSelectedTextToolStripMenuItem.Text         = "&Delete Selected Text";
            this.deleteSelectedTextToolStripMenuItem.Visible      = false;
            this.deleteSelectedTextToolStripMenuItem.Click       += new EventHandler(this.DeleteSelectedTextToolStripMenuItemClick);
            this.deleteRememberToolStripMenuItem.Enabled          = false;
            this.deleteRememberToolStripMenuItem.Name             = "deleteRememberToolStripMenuItem";
            this.deleteRememberToolStripMenuItem.ShortcutKeys     = (Keys)393304;
            this.deleteRememberToolStripMenuItem.Size             = new Size(240, 22);
            this.deleteRememberToolStripMenuItem.Text             = "Delete (Remember)";
            this.deleteRememberToolStripMenuItem.Visible          = false;
            this.deleteRememberToolStripMenuItem.Click           += new EventHandler(this.DeleteRememberToolStripMenuItemClick);
            this.contentRichTextBox.BorderStyle                   = BorderStyle.FixedSingle;
            this.contentRichTextBox.Dock                = DockStyle.Fill;
            this.contentRichTextBox.Font                = new Font("Arial Unicode MS", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 163);
            this.contentRichTextBox.HideSelection       = false;
            this.contentRichTextBox.Location            = new Point(0, 0);
            this.contentRichTextBox.Name                = "contentRichTextBox";
            this.contentRichTextBox.ScrollBars          = RichTextBoxScrollBars.ForcedVertical;
            this.contentRichTextBox.ShowSelectionMargin = true;
            this.contentRichTextBox.Size                = new Size(434, 365);
            this.contentRichTextBox.TabIndex            = 0;
            this.contentRichTextBox.Text                = "";
            this.contentRichTextBox.KeyPress           += new KeyPressEventHandler(this.contentRichTextBox_KeyPress);
            this.contentRichTextBox.MouseMove          += new MouseEventHandler(this.ContentRichTextBoxMouseMove);
            this.contentRichTextBox.MouseUp            += new MouseEventHandler(this.ContentRichTextBoxMouseUp);
            this.chooseMeaningContextMenuStrip.Name     = "chooseMeaningContextMenuStrip";
            this.chooseMeaningContextMenuStrip.Size     = new Size(61, 4);
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode       = AutoScaleMode.Font;
            base.ClientSize          = new Size(434, 365);
            base.Controls.Add(this.contentRichTextBox);
            this.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, 128);
//			base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
            base.Name     = "DocumentPanel";
            this.Text     = "DocumentPanel";
            base.KeyDown += new KeyEventHandler(this.DocumentPanelKeyDown);
            this.commentContextMenuStrip.ResumeLayout(false);
            this.addToVietPhraseContextMenuStrip.ResumeLayout(false);
            base.ResumeLayout(false);
        }