コード例 #1
0
        //NOT ALL KEYWORDS ARE done LIKE "RETURN"  or datatypes
        private void UpperCase(object sender, EventArgs e)
        {
            var text = GetCurrentDocumentText();

            if (String.IsNullOrEmpty(text))
            {
                return;
            }

            var newText = KeywordCaser.KeywordsToUpper(text);

            if (text != newText)
            {
                SetCurrentDocumentText(newText);
                OutputPane.WriteMessage("Changed keywords to UPPER CASE");
            }
        }
コード例 #2
0
        //NOT ALL KEYWORDS ARE done LIKE "RETURN"  or datatypes
        private void UpperCase(object sender, EventArgs e)
        {
            try
            {
                var text = GetCurrentDocumentText();
                if (String.IsNullOrEmpty(text))
                {
                    return;
                }

                var newText = KeywordCaser.KeywordsToUpper(text);

                if (text != newText)
                {
                    SetCurrentDocumentText(newText);
                    OutputPane.WriteMessage("Changed keywords to UPPER CASE");
                }
            }
            catch (Exception ex)
            {
                OutputPane.WriteMessage("Exception changing keywords to UPPER CASE, error: {0}", ex.Message);
            }
        }