示例#1
0
        /// <summary>
        /// Public constructor that defines the required delegates
        /// Delegates must be defined for the find and replace to operate
        /// </summary>
        public FindReplaceForm(string initText, FindReplaceResetDelegate resetDelegate, FindFirstDelegate findFirstDelegate, FindNextDelegate findNextDelegate, FindReplaceOneDelegate replaceOneDelegate, FindReplaceAllDelegate replaceAllDelegate, bool findOrReplace)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // Define the initial state of the form assuming a Find command to be displayed first
            DefineFindWindow(findOrReplace);
            DefineOptionsWindow(options);

            // ensure buttons not initially enabled
            this.bFindNext.Enabled   = false;
            this.bReplace.Enabled    = false;
            this.bReplaceAll.Enabled = false;

            // save the delegates used to perform find and replcae operations
            this.FindReplaceReset = resetDelegate;
            this.FindFirst        = findFirstDelegate;
            this.FindNext         = findNextDelegate;
            this.FindReplaceOne   = replaceOneDelegate;
            this.FindReplaceAll   = replaceAllDelegate;

            // define the original text
            this.textFind.Text = initText;
        } //FindReplaceForm
示例#2
0
        // public constructor that defines the required delegates
        // delegates must be defined for the find and replace to operate
        public FindReplaceForm(string initText, FindReplaceResetDelegate resetDelegate,
                               FindFirstDelegate findFirstDelegate, FindNextDelegate findNextDelegate,
                               FindReplaceOneDelegate replaceOneDelegate, FindReplaceAllDelegate replaceAllDelegate)
        {
            InitializeComponent();

            // Define the initial state of the form assuming a Find command to be displayed first
            DefineFindWindow(findNotReplace);
            DefineOptionsWindow(options);

            // ensure buttons not initially enabled
            bFindNext.Enabled   = false;
            bReplace.Enabled    = false;
            bReplaceAll.Enabled = false;

            // save the delegates used to perform find and replcae operations
            FindReplaceReset = resetDelegate;
            //FindFirst = findFirstDelegate;
            FindNext       = findNextDelegate;
            FindReplaceOne = replaceOneDelegate;
            FindReplaceAll = replaceAllDelegate;

            // define the original text
            textFind.Text = initText;
        }
示例#3
0
        /// <summary>
        /// Public constructor that defines the required delegates
        /// Delegates must be defined for the find and replace to operate
        /// </summary>
        public FindReplaceForm(string initText, FindReplaceResetDelegate resetDelegate, FindFirstDelegate findFirstDelegate, FindNextDelegate findNextDelegate, FindReplaceOneDelegate replaceOneDelegate, FindReplaceAllDelegate replaceAllDelegate)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // Define the initial state of the form assuming a Find command to be displayed first
            DefineFindWindow(findNotReplace);
            DefineOptionsWindow(options);

            // ensure buttons not initially enabled
            this.bFindNext.Enabled = false;
            this.bReplace.Enabled = false;
            this.bReplaceAll.Enabled = false;

            // save the delegates used to perform find and replcae operations
            this.FindReplaceReset = resetDelegate;
            this.FindFirst = findFirstDelegate;
            this.FindNext = findNextDelegate;
            this.FindReplaceOne = replaceOneDelegate;
            this.FindReplaceAll = replaceAllDelegate;

            // define the original text
            this.textFind.Text = initText;

        } //FindReplaceForm
示例#4
0
        // public constructor that defines the required delegates
        // delegates must be defined for the find and replace to operate
        public FindReplaceForm(string initText, FindReplaceResetDelegate resetDelegate, FindFirstDelegate findFirstDelegate, FindNextDelegate findNextDelegate, FindReplaceOneDelegate replaceOneDelegate, FindReplaceAllDelegate replaceAllDelegate)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.Text                   = IHMUtile.getText(1232); // "Find and Replace";
            this.tabFind.Text           = IHMUtile.getText(1233); // "Find";
            this.tabFind.ToolTipText    = IHMUtile.getText(1234); // "Find Text";
            this.tabReplace.Text        = IHMUtile.getText(1235); // "Replace";
            this.tabReplace.ToolTipText = IHMUtile.getText(1236); // "Find and Replace Text";
            this.labelFind.Text         = IHMUtile.getText(1237); // "Find What:";
            this.labelReplace.Text      = IHMUtile.getText(1238); // "Replace  With:";
            this.optionMatchCase.Text   = IHMUtile.getText(1239); // "Match Exact Case";
            this.optionMatchWhole.Text  = IHMUtile.getText(1240); // "Match Whole Word Only";
            this.bOptions.Text          = IHMUtile.getText(1241); // "Options";
            this.bFindNext.Text         = IHMUtile.getText(1243); // "Find Next";
            this.bReplace.Text          = IHMUtile.getText(1235); // "Replace";
            this.bReplaceAll.Text       = IHMUtile.getText(1244); // "Replace All";

            // Define the initial state of the form assuming a Find command to be displayed first
            DefineFindWindow(findNotReplace);
            DefineOptionsWindow(options);

            // ensure buttons not initially enabled
            this.bFindNext.Enabled   = false;
            this.bReplace.Enabled    = false;
            this.bReplaceAll.Enabled = false;

            // save the delegates used to perform find and replcae operations
            this.FindReplaceReset = resetDelegate;
            this.FindFirst        = findFirstDelegate;
            this.FindNext         = findNextDelegate;
            this.FindReplaceOne   = replaceOneDelegate;
            this.FindReplaceAll   = replaceAllDelegate;

            // define the original text
            this.textFind.Text = initText;

            //permitem deplasarea ecranului si deschidem la pozitia mouse-ului in stanga jos
            DeschidereMouseStangaJosCuDeplasare();
        }         //FindReplaceForm