Beispiel #1
0
        public MyTabPage(RichTextBoxForm mf, int mode)
        {
            Mode             = mode;
            mainform         = mf;
            _normalEditor    = new System.Windows.Forms.RichTextBoxCtrl(mf);
            _developerEditor = new MyRichTextBox(mf);
            //Mode (0) : Normal
            //Mode (1) : Developer Editor
            if (Mode == 0)
            {
                this._textRuler.Dock = DockStyle.Top;
                this._textRuler.Select();
                this._textRuler.BothLeftIndentsChanged    += new System.Windows.Forms.TextRuler.MultiIndentChangedEventHandler(this.tRuler_BothLeftIndentsChanged);
                this._textRuler.LeftHangingIndentChanging += new System.Windows.Forms.TextRuler.IndentChangedEventHandler(this.tRuler_LeftHangingIndentChanging);
                this._textRuler.LeftIndentChanging        += new System.Windows.Forms.TextRuler.IndentChangedEventHandler(this.tRuler_LeftIndentChanging);
                this._textRuler.RightIndentChanging       += new System.Windows.Forms.TextRuler.IndentChangedEventHandler(this.tRuler_RightIndentChanging);
                this._textRuler.RightMarginChanging       += new System.Windows.Forms.TextRuler.MarginChangedEventHandler(this.tRuler_RightMarginChanging);
                this._textRuler.TabAdded         += new System.Windows.Forms.TextRuler.TabChangedEventHandler(this.tRuler_TabAdded);
                this._textRuler.TabChanged       += new System.Windows.Forms.TextRuler.TabChangedEventHandler(this.tRuler_TabChanged);
                this._textRuler.TabRemoved       += new System.Windows.Forms.TextRuler.TabChangedEventHandler(this.tRuler_TabRemoved);
                this._textRuler.BaseColor         = Color.FromArgb(191, 205, 219);//new Color(RGB());// "191, 205, 219";
                this._textRuler.BorderColor       = Color.FromArgb(191, 205, 219);
                this._textRuler.BackColor         = Color.White;
                this._textRuler.TabsEnabled       = true;
                this._textRuler.RightIndent       = 0;
                this._textRuler.RightMargin       = -1;
                this._textRuler.LeftHangingIndent = 0;
                this._textRuler.LeftIndent        = 0;
                this._textRuler.LeftMargin        = 0;



                this._normalEditor.Dock      = DockStyle.Fill;
                this._normalEditor.TopMargin = 20;
                this._normalEditor.Text      = "";
                _normalEditor.Font           = new System.Drawing.Font("굴림", 11, FontStyle.Regular);
                this._normalEditor.Select();

                _normalEditor.TextChanged      += new EventHandler(this.NormalEditor_TextChanged);
                _normalEditor.CursorChanged    += new EventHandler(this.CursorChange);
                _normalEditor.SelectionChanged += new EventHandler(this.richTextBox1_SelectionChanged);

                _normalEditor.LinkClicked += new LinkClickedEventHandler(this.richTextBox1_LinkClicked);
                this.Controls.Add(_textRuler);
                this.Controls.Add(_normalEditor);
            }
            else
            {
                this._developerEditor.Dock = DockStyle.Fill;
                this._developerEditor.richTextBox1.Text = "";
                _developerEditor.richTextBox1.Font      = new System.Drawing.Font("굴림", 11, FontStyle.Regular);
                this._developerEditor.richTextBox1.Select();
                this._developerEditor.richTextBox1.ImeMode      = ImeMode.Off;
                _developerEditor.richTextBox1.TextChanged      += new EventHandler(this.DeveloperEditor_TextChanged);
                _developerEditor.CursorChanged                 += new EventHandler(this.CursorChange);
                _developerEditor.richTextBox1.SelectionChanged += new EventHandler(this.richTextBox1_SelectionChanged);
                _developerEditor.richTextBox1.KeyPress         += new KeyPressEventHandler(this.DeveloperEditor_KeyEvent);
                _developerEditor.richTextBox1.LinkClicked      += new LinkClickedEventHandler(this.richTextBox1_LinkClicked);

                this.Controls.Add(_developerEditor);
            }
        }
Beispiel #2
0
 public FindDialog(RichTextBoxCtrl _mRTB)
 {
     InitializeComponent();
     richTextBox1 = new RichTextBox();
     richTextBox1.SelectionChanged += new System.EventHandler(richTextBox1_SelectionChanged);
 }