Exemple #1
0
        internal FindPanel(TentacleNApplication app_)
        {
            app           = app_;
            heightDesired = buttonHeight + 2 * pad;
            SizeChanged  += new EventHandler(this.Me_SizeChanged);
            Visible       = false;

            Label labelFind = new Label();

            labelFind.Text  = "Find What:";
            labelFind.Top   = pad + 2;
            labelFind.Left  = 5;
            labelFind.Width = 70;
            Controls.Add(labelFind);

            textFind      = new TextBox();
            textFind.Top  = pad;
            textFind.Left = 80;
            textFind.Size = new Size(100, 20);
            Controls.Add(textFind);

            buttonFind = new Button();
            //buttonFind.Text = "F&ind";
            buttonFind.Text   = "Find";
            buttonFind.Top    = pad;
            buttonFind.Left   = 200;
            buttonFind.Size   = new Size(buttonWidth, 20);
            buttonFind.Click += new EventHandler(Find);
            Controls.Add(buttonFind);
        }
Exemple #2
0
        internal ReplacePanel(TentacleNApplication app_)
        {
            app           = app_;
            heightDesired = buttonHeight * 2 + 3 * pad;
            SizeChanged  += new EventHandler(this.Me_SizeChanged);
            Visible       = false;

            Label labelFind = new Label();

            labelFind.Text  = "Find What:";
            labelFind.Top   = pad + 2;
            labelFind.Left  = 20;
            labelFind.Width = 60;
            Controls.Add(labelFind);

            textFind      = new TextBox();
            textFind.Top  = pad;
            textFind.Left = 80;
            textFind.Size = new Size(100, buttonHeight);
            Controls.Add(textFind);

            buttonFind = new Button();
            //buttonFind.Text = "F&ind";
            buttonFind.Text   = "Find";
            buttonFind.Top    = pad;
            buttonFind.Left   = 200;
            buttonFind.Size   = new Size(buttonWidth, buttonHeight);
            buttonFind.Click += new EventHandler(Find);
            Controls.Add(buttonFind);

            buttonAll = new Button();
            //buttonAll.Text = "Replace &All";
            buttonAll.Text   = "Replace All";
            buttonAll.Top    = pad;
            buttonAll.Left   = 300;
            buttonAll.Size   = new Size(buttonWidth, buttonHeight);
            buttonAll.Click += new EventHandler(ReplaceAll);
            Controls.Add(buttonAll);

            int   line2        = pad + buttonHeight + pad;
            Label labelReplace = new Label();

            labelReplace.Text  = "Replace With:";
            labelReplace.Top   = line2 + 3;
            labelReplace.Left  = 5;
            labelReplace.Width = 75;
            Controls.Add(labelReplace);

            textReplace      = new TextBox();
            textReplace.Top  = line2;
            textReplace.Left = 80;
            textReplace.Size = new Size(100, buttonHeight);
            Controls.Add(textReplace);

            buttonReplace = new Button();
            //buttonReplace.Text = "&Replace";
            buttonReplace.Text   = "Replace";
            buttonReplace.Top    = line2;
            buttonReplace.Left   = 200;
            buttonReplace.Size   = new Size(buttonWidth, buttonHeight);
            buttonReplace.Click += new EventHandler(Replace);
            Controls.Add(buttonReplace);

            buttonInSelection = new Button();
            //buttonInSelection.Text = "I&n Selection";
            buttonInSelection.Text   = "In Selection";
            buttonInSelection.Top    = buttonHeight + pad * 2;
            buttonInSelection.Left   = 300;
            buttonInSelection.Size   = new Size(buttonWidth, buttonHeight);
            buttonInSelection.Click += new EventHandler(ReplaceInSelection);
            Controls.Add(buttonInSelection);
        }