Exemple #1
0
        private void SubFormFindAndReplaceEvent(object sender, SledFindAndReplaceEventArgs e)
        {
            // Run find or replace event
            ((SledFindAndReplaceService)m_findAndReplaceService.Get).Run(e);

            var bMakeSound = true;

            // Check result
            switch (e.Result)
            {
            // Do nothing
            case SledFindAndReplaceResult.Success:
                bMakeSound = false;
                break;

            // No results were found
            case SledFindAndReplaceResult.NothingFound:
                SledOutDevice.OutLine(SledMessageType.Info, Localization.SledFindAndReplaceErrorNothingFound);
                break;

            // No documents to search in
            case SledFindAndReplaceResult.NothingToSearch:
                SledOutDevice.OutLine(SledMessageType.Info, Localization.SledFindAndReplaceErrorNoDocsToSearch);
                break;

            default: NotifyMissingResultProperty(this); break;
            }

            // Beep if not successful
            if (bMakeSound)
            {
                // Beep like VS does
                System.Media.SystemSounds.Exclamation.Play();
            }
        }
        private void SubFormFindAndReplaceEvent(object sender, SledFindAndReplaceEventArgs e)
        {
            // Run find or replace event
            ((SledFindAndReplaceService)m_findAndReplaceService.Get).Run(e);

            var bMakeSound = true;

            // Check result
            switch (e.Result)
            {
                    // Do nothing
                case SledFindAndReplaceResult.Success:
                    bMakeSound = false;
                    break;

                    // No results were found
                case SledFindAndReplaceResult.NothingFound:
                    SledOutDevice.OutLine(SledMessageType.Info, Localization.SledFindAndReplaceErrorNothingFound);
                    break;

                    // No documents to search in
                case SledFindAndReplaceResult.NothingToSearch:
                    SledOutDevice.OutLine(SledMessageType.Info, Localization.SledFindAndReplaceErrorNoDocsToSearch);
                    break;

                default: NotifyMissingResultProperty(this); break;
            }

            // Beep if not successful
            if (bMakeSound)
            {
                // Beep like VS does
                System.Media.SystemSounds.Exclamation.Play();
            }
        }