Changeset 299


Ignore:
Timestamp:
Apr 30, 2009, 10:01:34 PM (13 years ago)
Author:
Arno Wacker
Message:
  • Alphabets: Fix: now alphabets-plugin starts and shows progress. (Seems nobody really used that, since ..well it did not start..)
  • Substitution: Renamed some inputs and extend the description of these inputs to reflect what they are really doing, i.e. replaced "Shift value" (probably copy and paste from Caesar) with key - for a general substitution a shift value does not make any sense.
Location:
trunk/CrypPlugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Alphabets/Alphabet.cs

    r136 r299  
    210210using System.Windows.Controls;
    211211using Cryptool.PluginBase.IO;
     212using Cryptool.PluginBase.Miscellaneous;
    212213
    213214namespace Cryptool.Alphabets
    214215{
    215   [Author("Sebastian Przybylski", "sebastian@przybylski.org", "Uni-Siegen", "http://www.uni-siegen.de")]
    216     [PluginInfo(false, "Alphabets", "Alphabets Plugin", "", "Alphabets/icon.gif")]   
     216    [Author("Sebastian Przybylski", "sebastian@przybylski.org", "Uni-Siegen", "http://www.uni-siegen.de")]
     217    [PluginInfo(true, "Alphabets", "Alphabets Plugin", "", "Alphabets/icon.gif")]   
    217218    public class Alphabet : IInput
    218219    {
     
    292293#pragma warning disable 67
    293294                        public event StatusChangedEventHandler OnPluginStatusChanged;
    294                         public event GuiLogNotificationEventHandler OnGuiLogNotificationOccured;
    295                         public event PluginProgressChangedEventHandler OnPluginProgressChanged;
    296295#pragma warning restore
    297                
     296            public event GuiLogNotificationEventHandler OnGuiLogNotificationOccured;
     297            public event PluginProgressChangedEventHandler OnPluginProgressChanged;
    298298     
    299299      private void GuiLogMessage(string message, NotificationLevel logLevel)
     
    311311
    312312      public void Execute()
    313       {       
     313      {
     314          OnPropertyChanged("AlphabetOutput");
     315          ShowProgress(100, 100);
    314316      }
    315317
     
    319321      }
    320322
     323      #endregion
     324
     325      #region Private
     326      private void ShowProgress(double value, double max)
     327      {
     328          EventsHelper.ProgressChanged(OnPluginProgressChanged, this, new PluginProgressEventArgs(value, max));
     329      }
    321330      #endregion
    322331    }
  • trunk/CrypPlugins/Substitution/Substitution.cs

    r213 r299  
    296296        }
    297297
    298         [PropertyInfo(Direction.Input, "External alphabet input","Input a string containing the alphabet which should be used by Substitution.\nIf no alphabet is provided on the input, the internal alphabet will be used.", null, false, false, DisplayLevel.Expert, QuickWatchFormat.Text, null)]
     298        [PropertyInfo(Direction.Input, "Plaintext Alphabet","Input a string containing the plaintext-alphabet which should be used by Substitution.\nIf no alphabet is provided on the input, the internal alphabet will be used.", null, false, false, DisplayLevel.Expert, QuickWatchFormat.Text, null)]
    299299        public string InputAlphabet
    300300        {
     
    310310        }
    311311
    312         [PropertyInfo(Direction.Input, "Shift value (integer)","Same setting as key value in Settings-Pane but as dynamic input.", null, false, false,DisplayLevel.Expert, QuickWatchFormat.Text, null)]
     312        [PropertyInfo(Direction.Input, "Key (or substitution/cipher alphabet)","Same setting as key value in settings. \nIf you use a key shorter than the plaintext-alphabet, \nthe remaining characters of the cipher-alphabet will be filled up \naccording to the setting in the plug-ins settings pane. \nIf your key has the same length as the plaintext-alphabet, \nyou can perform the most general monoalphabetic substitution.", null, false, false,DisplayLevel.Expert, QuickWatchFormat.Text, null)]
    313313        public string KeyValue
    314314        {
Note: See TracChangeset for help on using the changeset viewer.