예제 #1
0
 public ViewInfo()
 {
     customTextBox = null;
     btns          = null;
     active        = false;
     fileName      = "";
 }
예제 #2
0
        /// <summary>
        /// 操作後情報の保存
        /// </summary>
        /// <param name="p">キャレット位置</param>
        /// <param name="ope">操作(挿入・削除・キャレット移動)</param>
        /// <param name="str">操作文字列</param>
        /// <param name="ee">実行クラス</param>
        public void ProUndoRedo(Point p, int ope, string str, CEEditView ee)
        {
            if (m_UndoRedoData == null)
            {
                // Undo/Redo 情報がない場合は何もしない
                return;
            }

            // Undo/Redo 操作保存
            m_UndoRedoData.m_ope = ope;

            // Undo/Redo 操作後のキャレット位置保存(論理位置として保存)
            int lRow, lCol;

            ee.m_doc.PtoLPos(p.Y, p.X, out lRow, out lCol); // 物理位置→論理位置
            m_UndoRedoData.m_aftCaret.X = lCol;
            m_UndoRedoData.m_aftCaret.Y = lRow;

            // Undo/Redo 操作データ保存
            m_UndoRedoData.m_pcmemData = str;

            // Undo/Redo 保存
            this.Append(m_UndoRedoData);

            // Undo/Redo 情報削除
            m_UndoRedoData = null;
        }
예제 #3
0
        /// <summary>
        /// 新規ウィンドウにタブビュー分離
        /// </summary>
        /// <param name="editView">分離するビュー</param>
        /// <param name="fileName">分離するファイル名</param>
        public void TabViewSeparation(CEEditView editView, string fileName)
        {
            TextEditor te = new TextEditor(this);

            te.FormClosing += new FormClosingEventHandler(this.FormClosingEvent);
            m_viewTextEditor.Add(te);

            m_viewTextEditor[m_viewTextEditor.Count - 1].AddTabView(editView, fileName);
            m_viewTextEditor[m_viewTextEditor.Count - 1].Show();
        }
예제 #4
0
        public ViewInfoMng()
        {
            customTextBox = null;
            button        = null;
            active        = false;
            fileName      = "";
#if false // 検索パネル未使用
            findPanel = null;
#endif
        }
예제 #5
0
 /// <summary>
 /// 別ウィンドウにタブビューを移動
 /// </summary>
 /// <param name="te"></param>
 /// <param name="ev"></param>
 /// <param name="fn"></param>
 public void TabViewAnotherWinMove(TextEditor te, CEEditView ev, string fn)
 {
     for (int idx = 0; idx < m_viewTextEditor.Count; idx++)
     {
         if (m_viewTextEditor[idx] == te)
         {
             m_viewTextEditor[idx].AddTabView(ev, fn);
             m_viewTextEditor[idx].Show();
             break;
         }
     }
 }
예제 #6
0
        /// <summary>
        /// 操作前情報の保存
        /// </summary>
        /// <param name="p">キャレット位置(物理)</param>
        /// <param name="ee">実行クラス</param>
        public void PreUndoRedo(Point p, int selectType, CEEditView ee)
        {
            // Undo/Redo 不要な操作情報削除
            this.DelOpe();

            // Undo/Redo 操作情報格納エリア確保
            if (m_UndoRedoData == null)
            {
                m_UndoRedoData = new CEUndoRedoData();
            }

            // Undo/Redo 操作前のキャレット位置保存(論理位置として保存)
            int lRow, lCol;

            ee.m_doc.PtoLPos(p.Y, p.X, out lRow, out lCol); // 物理位置→論理位置
            m_UndoRedoData.m_preCaret.X = lCol;
            m_UndoRedoData.m_preCaret.Y = lRow;
            m_UndoRedoData.m_selectType = selectType;
        }
예제 #7
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public FindPanel(CEEditView ev)
        {
            // 対象となるビュー保存
            m_editView = ev;

            // サイズと色
            this.Size      = new Size(300, 47);
            this.BackColor = Color.Gainsboro;

            // 検索ボックス
            findComboBox                  = new ComboBox();
            findComboBox.Size             = new Size(200, 21);
            findComboBox.Location         = new Point(4, 2);
            findComboBox.MaxDropDownItems = 10;
            this.Controls.Add(findComboBox);

#if false // 入力補完テスト
            findTextBox.DataSource         = GetDataSource();
            findTextBox.DisplayMember      = "Key";
            findTextBox.ValueMember        = "Value";
            findTextBox.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            findTextBox.AutoCompleteSource = AutoCompleteSource.ListItems;
#endif

            // 大文字・小文字トグルラベル
            ULLabel           = new Label();
            ULLabel.Text      = "Aa";
            ULLabel.TextAlign = ContentAlignment.MiddleCenter;
            ULLabel.Size      = new Size(30, 19);
            ULLabel.Location  = new Point(4, 25);
            //ULLabel.BorderStyle = BorderStyle.None;
            ULLabel.BackColor = Color.Gainsboro;
            ULToggle          = false;
            ULLabel.Click    += new EventHandler(ULLabel_Click);
            ToolTip ULLabelToolTip = new ToolTip();
            ULLabelToolTip.SetToolTip(ULLabel, "大文字・小文字判別");
            this.Controls.Add(ULLabel);

            // 単語単位トグルラベル
            wordLabel           = new Label();
            wordLabel.Text      = "|A|";
            wordLabel.TextAlign = ContentAlignment.MiddleCenter;
            wordLabel.Size      = new Size(30, 19);
            wordLabel.Location  = new Point(36, 25);
            //wordLabel.BorderStyle = BorderStyle.None;
            wordLabel.BackColor = Color.Gainsboro;
            wordToggle          = false;
            wordLabel.Click    += new EventHandler(wordLabel_Click);
            ToolTip wordLabelToolTip = new ToolTip();
            wordLabelToolTip.SetToolTip(wordLabel, "単語単位");
            this.Controls.Add(wordLabel);

            // 正規表現トグルラベル
            regLabel           = new Label();
            regLabel.Text      = "${";
            regLabel.TextAlign = ContentAlignment.MiddleCenter;
            regLabel.Size      = new Size(30, 19);
            regLabel.Location  = new Point(68, 25);
            //regLabel.BorderStyle = BorderStyle.None;
            regLabel.BackColor = Color.Gainsboro;
            regToggle          = false;
            regLabel.Click    += new EventHandler(regLabel_Click);
            ToolTip regLabelToolTip = new ToolTip();
            regLabelToolTip.SetToolTip(regLabel, "正規表現");
            this.Controls.Add(regLabel);

            // 閉じるボタン
            closeLabel           = new Label();
            closeLabel.Font      = new Font("MS ゴシック", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(128)));
            closeLabel.Text      = "×";
            closeLabel.TextAlign = ContentAlignment.MiddleCenter;
            closeLabel.Size      = new Size(21, 21);
            closeLabel.Location  = new Point(this.Width - closeLabel.Width - 2, 2);
            closeLabel.Click    += new EventHandler(closeLabel_Click);
            ToolTip closeLabelToolTip = new ToolTip();
            closeLabelToolTip.SetToolTip(closeLabel, "閉じる");
            this.Controls.Add(closeLabel);

            // 検索
            findLabel           = new Label();
            findLabel.Text      = "⇒";
            findLabel.TextAlign = ContentAlignment.MiddleCenter;
            findLabel.Size      = new Size(21, 21);
            findLabel.Location  = new Point(findComboBox.Width + 6, 2);
            findLabel.Click    += new EventHandler(findLabel_Click);
            ToolTip findLabelToolTip = new ToolTip();
            findLabelToolTip.SetToolTip(findLabel, "検索");
            this.Controls.Add(findLabel);

            // マウスポインタ変更
#if false
            this.MouseEnter += new EventHandler(mouseEnter);
#endif
            this.MouseEnter += (sender, e) =>
            {
                Cursor = Cursors.Default;
            };
        }