Ignore:
Timestamp:
Sep 24, 2009, 11:46:11 AM (12 years ago)
Author:
Matthäus Wander
Message:

Substring:

  • review and minor changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Substring/Substring.cs

    r513 r571  
    2626using System.ComponentModel;
    2727
     28/*
     29 * Note:
     30 * Enhancement #64 is counterproductive for this plugin, as the settings are set to 0 on connection removal.
     31 * Enhancement #81 (open issue currently) would be probably more useful instead.
     32 */
     33
    2834namespace Cryptool.Plugins.Substring
    2935{
     
    7278            if (inputString != null)
    7379            {
    74                     ProgressChanged(0.5, 1.0);
    75                     if ((settings.IntegerStartValue <= inputString.Length) & ((settings.IntegerStartValue + settings.IntegerLengthValue) <= inputString.Length))
    76                     {
    77                         OutputString = inputString.Substring(settings.IntegerStartValue, settings.IntegerLengthValue);
    78                         ProgressChanged(1.0, 1.0);
    79                         return;
    80                     }
    81                     else
    82                     {
    83                         GuiLogMessage("Your Startposition and/or Length for Substring are invalid", NotificationLevel.Error);
    84                     }
    85                
    86             }
    87            
     80                ProgressChanged(0.5, 1.0);
     81                if ((settings.IntegerStartValue <= inputString.Length) & ((settings.IntegerStartValue + settings.IntegerLengthValue) <= inputString.Length))
     82                {
     83                    OutputString = inputString.Substring(settings.IntegerStartValue, settings.IntegerLengthValue);
     84                    ProgressChanged(1.0, 1.0);
     85                    return;
     86                }
     87                else
     88                {
     89                    GuiLogMessage("Your Startposition and/or Length for Substring are invalid", NotificationLevel.Error);
     90                }
     91            }
    8892        }
    8993
     
    118122        #region SubstringInOut
    119123
    120         [PropertyInfo(Direction.InputData, "String Input", "Input your String here", "", DisplayLevel.Beginner)]
     124        [PropertyInfo(Direction.InputData, "String Input", "Input your String here", "", true, false, DisplayLevel.Beginner, QuickWatchFormat.Text, null)]
    121125        public String InputString
    122126        {
Note: See TracChangeset for help on using the changeset viewer.