Ignore:
Timestamp:
May 19, 2010, 5:03:58 PM (12 years ago)
Author:
nolte
Message:

Expanded the Vigenere plugin with a full working autokey modus

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Vigenere/VigenereSettings.cs

    r1259 r1444  
    8787        private bool hasChanges;
    8888        private int selectedAction = 0;
     89        private int selectedModus = 0;
    8990        private string upperAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    9091        private string lowerAlphabet = "abcdefghijklmnopqrstuvwxyz";
     
    217218
    218219        [PropertySaveOrder(3)]
    219         [ContextMenu("Action","Select the Algorithm action",1,DisplayLevel.Beginner,ContextMenuControlType.ComboBox,new int[]{1,2},"Encrypt","Decrypt")]
    220         [TaskPane("Action", "Select the Algorithm action", null, 1, false, DisplayLevel.Beginner, ControlType.ComboBox, new string[] { "Encrypt", "Decrypt"})]
     220        [ContextMenu("Modus", "Select the Algorithm action", 1, DisplayLevel.Beginner, ContextMenuControlType.ComboBox, new int[] { 1, 2 }, "Classic", "Autokey")]
     221        [TaskPane("Modus", "Select the Algorithm action", null, 1, false, DisplayLevel.Beginner, ControlType.ComboBox, new string[] { "Classic", "Autokey" })]
     222        public int Modus
     223        {
     224            get { return this.selectedModus; }
     225            set
     226            {
     227                if (value != selectedModus) HasChanges = true;
     228                this.selectedModus = value;
     229                OnPropertyChanged("Modus");
     230            }
     231        }
     232
     233
     234        [PropertySaveOrder(4)]
     235        [ContextMenu("Action","Select the Algorithm action",2,DisplayLevel.Beginner,ContextMenuControlType.ComboBox,new int[]{1,2},"Encrypt","Decrypt")]
     236        [TaskPane("Action", "Select the Algorithm action", null, 2, false, DisplayLevel.Beginner, ControlType.ComboBox, new string[] { "Encrypt", "Decrypt"})]
    221237        public int Action
    222238        {
     
    230246        }
    231247
    232         [PropertySaveOrder(4)]
    233         [TaskPane("Shift value (integer)", "Enter the numbers of letters to shift seperated by comma.", null, 2, false, DisplayLevel.Beginner, ControlType.TextBox, null)]
     248        [PropertySaveOrder(5)]
     249        [TaskPane("Shift value (integer)", "Enter the numbers of letters to shift seperated by comma.", null, 3, false, DisplayLevel.Beginner, ControlType.TextBox, null)]
    234250        public string ShiftValue
    235251        {
     
    248264        }
    249265
    250         [PropertySaveOrder(5)]
    251         [TaskPane("Shift key (multiple letters)", "Enter multiple letters as the key", null, 3, false, DisplayLevel.Experienced, ControlType.TextBox, null)]
     266        [PropertySaveOrder(6)]
     267        [TaskPane("Shift key (multiple letters)", "Enter multiple letters as the key", null, 4, false, DisplayLevel.Experienced, ControlType.TextBox, null)]
    252268        public string ShiftChar
    253269        {
     
    256272        }
    257273
    258         [PropertySaveOrder(6)]
    259         [ContextMenu("Unknown symbol handling","What should be done with ecountered characters at the input which are not in the alphabet?",4,DisplayLevel.Beginner,ContextMenuControlType.ComboBox,null,"Ignore (leave unmodified)","Remove","Replace with \'?\'")]
    260         [TaskPane("Unknown symbol handling", "What should be done with encountered characters at the input which are not in the alphabet?", null, 4, false, DisplayLevel.Expert, ControlType.ComboBox, new string[] { "Ignore (leave unmodified)", "Remove", "Replace with \'?\'" })]
     274        [PropertySaveOrder(7)]
     275        [ContextMenu("Unknown symbol handling","What should be done with ecountered characters at the input which are not in the alphabet?",5,DisplayLevel.Beginner,ContextMenuControlType.ComboBox,null,"Ignore (leave unmodified)","Remove","Replace with \'?\'")]
     276        [TaskPane("Unknown symbol handling", "What should be done with encountered characters at the input which are not in the alphabet?", null, 5, false, DisplayLevel.Expert, ControlType.ComboBox, new string[] { "Ignore (leave unmodified)", "Remove", "Replace with \'?\'" })]
    261277        public int UnknownSymbolHandling
    262278        {
     
    270286        }
    271287
    272         [PropertySaveOrder(7)]
    273         [ContextMenu("Alphabet case sensitive","Should upper and lower case be treated differently? (Should a == A)",7,DisplayLevel.Beginner,ContextMenuControlType.ComboBox,null, "Case insensitive","Case sensitive")]
    274         [TaskPane("Alphabet case sensitive", "Should upper and lower case be treated differently? (Should a == A)", null, 7, false, DisplayLevel.Expert, ControlType.ComboBox, new string[] { "Case insensitive", "Case sensitive" })]
     288        [PropertySaveOrder(8)]
     289        [ContextMenu("Alphabet case sensitive","Should upper and lower case be treated differently? (Should a == A)",8,DisplayLevel.Beginner,ContextMenuControlType.ComboBox,null, "Case insensitive","Case sensitive")]
     290        [TaskPane("Alphabet case sensitive", "Should upper and lower case be treated differently? (Should a == A)", null, 8, false, DisplayLevel.Expert, ControlType.ComboBox, new string[] { "Case insensitive", "Case sensitive" })]
    275291        public int AlphabetCase
    276292        {
     
    314330        }
    315331
    316         [PropertySaveOrder(8)]
    317         [TaskPane("Alphabet", "This is the used alphabet.", null, 6, false, DisplayLevel.Expert, ControlType.TextBox, null)]
     332        [PropertySaveOrder(9)]
     333        [TaskPane("Alphabet", "This is the used alphabet.", null, 7, false, DisplayLevel.Expert, ControlType.TextBox, null)]
    318334        public string AlphabetSymbols
    319335        {
Note: See TracChangeset for help on using the changeset viewer.