Ignore:
Timestamp:
Feb 15, 2009, 7:59:43 PM (13 years ago)
Author:
Thomas Schmid
Message:
  • Editor: connections can now be switched by dragging the source point
  • TextInput / TextOutput now use radio buttons to display settings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/Caesar/CaesarSettings.cs

    r162 r224  
    212212        }
    213213
     214        [SettingsFormat(0, "Normal")]
     215        [PropertySaveOrder(9)]
     216        [TaskPane("Alphabet", "This is the used alphabet.", null, 6, false, DisplayLevel.Expert, ControlType.TextBox, "")]
     217        public string AlphabetSymbols
     218        {
     219          get { return this.alphabet; }
     220          set
     221          {
     222            string a = removeEqualChars(value);
     223            if (a.Length == 0) // cannot accept empty alphabets
     224            {
     225              LogMessage("Ignoring empty alphabet from user! Using previous alphabet: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
     226            }
     227            else if (!alphabet.Equals(a))
     228            {
     229              HasChanges = true;
     230              this.alphabet = a;
     231              setKeyByValue(shiftValue); //re-evaluate if the shiftvalue is still within the range
     232              LogMessage("Accepted new alphabet from user: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
     233              OnPropertyChanged("AlphabetSymbols");
     234            }
     235          }
     236        }
     237
    214238        /// <summary>
    215239        /// Visible setting how to deal with alphabet case. 0 = case insentive, 1 = case sensitive
     
    261285        }
    262286
    263         [SettingsFormat(0, "Bold")]
    264         [PropertySaveOrder(9)]
    265         [TaskPane("Alphabet", "This is the used alphabet.", null, 6, false, DisplayLevel.Expert, ControlType.TextBox, "")]
    266         public string AlphabetSymbols
    267         {
    268             get { return this.alphabet; }
    269             set
    270             {
    271                 string a = removeEqualChars(value);
    272                 if (a.Length == 0) // cannot accept empty alphabets
    273                 {
    274                     LogMessage("Ignoring empty alphabet from user! Using previous alphabet: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
    275                 }
    276                 else if (!alphabet.Equals(a))
    277                 {
    278                     HasChanges = true;
    279                     this.alphabet = a;
    280                     setKeyByValue(shiftValue); //re-evaluate if the shiftvalue is still within the range
    281                     LogMessage("Accepted new alphabet from user: \"" + alphabet + "\" (" + alphabet.Length.ToString() + " Symbols)", NotificationLevel.Info);
    282                     OnPropertyChanged("AlphabetSymbols");
    283                 }
    284                 //else if (a != value)
    285                 //{
    286                 //  // chars were removed -> force GUI update
    287                 //  OnPropertyChanged("AlphabetSymbols");
    288                 //}
    289             }
    290         }
    291 
    292287        #endregion
    293288
Note: See TracChangeset for help on using the changeset viewer.